83e3c6a5607103193850086933b2c0e63f698366,knowledge.py,,get_tokens_from_ccg_tree,#Any#,23

Before Change


def get_tokens_from_ccg_tree(ccg_xml_tree):
    tokens_node = ccg_xml_tree.find(".//tokens")
    tokens = [token.get("base") for token in tokens_node]
    for i in range(len(tokens)):
        tokens[i] = re.sub(r"DOT", r".", tokens[i])
        tokens[i] = re.sub(r"COMMA", r",", tokens[i])
        if tokens[i].startswith("_"):
            tokens[i] = tokens[i][1:]
    return tokens

def create_antonym_axioms(relations_to_pairs):
    relation = "antonym"

After Change


from normalization import denormalize_token

def get_tokens_from_ccg_tree(ccg_xml_tree):
    tokens = [denormalize_token(t) for t in ccg_xml_tree.xpath("//token/@base")]
    return tokens

def create_antonym_axioms(relations_to_pairs):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: mynlp/ccg2lambda
Commit Name: 83e3c6a5607103193850086933b2c0e63f698366
Time: 2016-04-01
Author: pascual@nii.ac.jp
File Name: knowledge.py
Class Name:
Method Name: get_tokens_from_ccg_tree


Project Name: mynlp/ccg2lambda
Commit Name: 83e3c6a5607103193850086933b2c0e63f698366
Time: 2016-04-01
Author: pascual@nii.ac.jp
File Name: prove.py
Class Name:
Method Name: main


Project Name: mynlp/ccg2lambda
Commit Name: 83e3c6a5607103193850086933b2c0e63f698366
Time: 2016-04-01
Author: pascual@nii.ac.jp
File Name: semantic_types.py
Class Name:
Method Name: merge_dynamic_libraries