fb50688c503567c5db6207e45e2c5e2ee1ad33df,tgen/features.py,,rep_nodes_per_rep_dai,#,74

Before Change


    @return: dictionary with one key ("") and the target number as a value
    
    node_count = defaultdict(int)
    for node in scope_func(cur_node, incremental=incremental):
        node_count[node.t_lemma + "\n" + node.formeme] += 1
    dai_count = defaultdict(int)
    for dai in context["da"]:
        dai_count[dai] += 1
    rep_nodes = sum(count for count in node_count.itervalues() if count > 1)

After Change


    
    node_count = defaultdict(int)
    for node in tree.nodes:
        node_count[node] += 1
    dai_count = defaultdict(int)
    for dai in context["da"]:
        dai_count[dai] += 1
    rep_nodes = sum(count for count in node_count.itervalues() if count > 1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: UFAL-DSG/tgen
Commit Name: fb50688c503567c5db6207e45e2c5e2ee1ad33df
Time: 2014-08-25
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/features.py
Class Name:
Method Name: rep_nodes_per_rep_dai


Project Name: UFAL-DSG/tgen
Commit Name: fb50688c503567c5db6207e45e2c5e2ee1ad33df
Time: 2014-08-25
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/features.py
Class Name:
Method Name: depth


Project Name: UFAL-DSG/tgen
Commit Name: fb50688c503567c5db6207e45e2c5e2ee1ad33df
Time: 2014-08-25
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/features.py
Class Name:
Method Name: rep_nodes