b6dafdaf674e09dad523563909bb510935b5f655,magpie/evaluation/utils.py,,remove_unguessable_answers,#Any#Any#,1

Before Change


    :param ontology: an Ontology object
    :return: Nothing, it operates on the answers object
    
    for doc_id, kw_set in answers.items():
        to_remove = set()
        for kw in kw_set:
            if not ontology.exact_match(kw):
                to_remove.add(kw)
        answers[doc_id] = kw_set - to_remove

After Change


    :param ontology: an Ontology object
    :return: a filtered set
    
    return {kw for kw in answers if ontology.exact_match(kw)}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: inspirehep/magpie
Commit Name: b6dafdaf674e09dad523563909bb510935b5f655
Time: 2016-01-08
Author: jan.stypka@cern.ch
File Name: magpie/evaluation/utils.py
Class Name:
Method Name: remove_unguessable_answers


Project Name: OpenMined/PySyft
Commit Name: 0d66931e6da93fda1c07388e6a2ed16d9a129040
Time: 2020-08-29
Author: jason.paumier@gmail.com
File Name: src/syft/core/store/store_memory.py
Class Name: MemoryStore
Method Name: get_objects_of_type


Project Name: cmu-db/ottertune
Commit Name: 944a0ccc8dc9110516192b0b41a12e8f9612f7ef
Time: 2020-02-20
Author: dvanaken@cs.cmu.edu
File Name: server/website/website/db/base/parser.py
Class Name: BaseParser
Method Name: extract_valid_variables