def greedy(yet_to_be_covered, set2label, set2score):
    """
    Greedy set coverage.
    :param yet_to_be_covered: set of interest
    :param set2label: dict {set: label} available sets and their labels
    :param set2score: dict {set: score}
    :return: iterator of tuples (set, label) corresponding to the selected sets for the coverage
    """
    yet_to_be_covered = set(yet_to_be_covered)
    while yet_to_be_covered and set2label:
        s = max(set2label.keys(), key=lambda candidate_terms: (len(set(
            candidate_terms) & yet_to_be_covered), set2score[candidate_terms]))
        result = set(s)
        yield result & yet_to_be_covered, set2label[s]
        yet_to_be_covered -= result
        del set2label[s]
