5b5d9a9aedf8e11b9609d28b26b6488bc20cb08b,scripts/semantic_types.py,,merge_dynamic_libraries,#Any#Any#Any#Any#,309

Before Change


    base_forms = get_tokens_from_xml_node(doc)
    required_predicates = set(normalize_token(t) for t in base_forms)
    // required_predicates = set(normalize_token(t) for t in doc.xpath("//token/@base"))
    coq_lib_index = {coq_lib_entry.split()[1] : coq_lib_entry \
                       for coq_lib_entry in coq_lib}
    nltk_lib_index = {nltk_lib_entry.split()[1] : nltk_lib_entry \
                        for nltk_lib_entry in nltk_lib}
    result_lib = []
    for predicate in required_predicates:

After Change


    sig_merged = sig_auto
    sig_merged.update(sig_arbi) // overwrites automatically inferred types.
    // Remove predicates that are reserved or not required (e.g. variables).
    preds_to_remove = set()
    preds_to_remove.update(reserved_predicates)
    for pred in sig_merged:
        if pred not in required_predicates and not re.match(r"\S+_[0-9]", pred):
            preds_to_remove.add(pred)
    for pred in preds_to_remove:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: mynlp/ccg2lambda
Commit Name: 5b5d9a9aedf8e11b9609d28b26b6488bc20cb08b
Time: 2017-03-24
Author: pascual@nii.ac.jp
File Name: scripts/semantic_types.py
Class Name:
Method Name: merge_dynamic_libraries


Project Name: PIQuIL/QuCumber
Commit Name: a928b335169dc3c706e6c51f03c6471d995af061
Time: 2018-06-19
Author: emerali@users.noreply.github.com
File Name: rbm/callbacks.py
Class Name: ComputeMetrics
Method Name: __call__


Project Name: openai/pixel-cnn
Commit Name: 420747a2f5f6f23b84f62f9a00481ef53a4a4623
Time: 2016-11-11
Author: tim@Tims-MacBook-Pro.local
File Name: train.py
Class Name:
Method Name:


Project Name: snorkel-team/snorkel
Commit Name: 19ae606b4608957335ce16b8bd2a9bd2ecd7e098
Time: 2016-07-01
Author: ajratner@gmail.com
File Name: tutorial/load_dictionaries.py
Class Name:
Method Name: load_acronym_dictionary