a7c5e5d9552e3a49c7c9b158ebfc03733dc9d446,scripts/knowledge.py,,get_lexical_relations,#Any#,40

Before Change


def get_lexical_relations(ccg_xml_trees):
    // Get tokens from all CCG trees and de-normalize them.
    // (e.g. remove the preceding underscore).
    tokens = list(itertools.chain(*[get_tokens_from_ccg_tree(ccg) for ccg in ccg_xml_trees]))
    // For every token pair, extract linguistic relationships.
    relations_to_pairs = defaultdict(list)
    token_pairs = list(itertools.product(tokens, tokens))
    for i, (t1, t2) in enumerate(token_pairs):

After Change


def get_lexical_relations(doc):
    // Get tokens from all CCG trees and de-normalize them.
    // (e.g. remove the preceding underscore).
    tokens = doc.xpath("//token/@base")
    // For every token pair, extract linguistic relationships.
    relations_to_pairs = defaultdict(list)
    token_pairs = list(itertools.product(tokens, tokens))
    for i, (t1, t2) in enumerate(token_pairs):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: mynlp/ccg2lambda
Commit Name: a7c5e5d9552e3a49c7c9b158ebfc03733dc9d446
Time: 2016-11-18
Author: pasmargo@users.noreply.github.com
File Name: scripts/knowledge.py
Class Name:
Method Name: get_lexical_relations


Project Name: mynlp/ccg2lambda
Commit Name: e3d04b13aed7abcfab08449618aacece0e6e22a0
Time: 2019-04-21
Author: mineshima.koji@ocha.ac.jp
File Name: scripts/convert_formulas.py
Class Name:
Method Name: get_formulas_from_xml


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