Commit 40272b64 authored by Bruno Guillaume's avatar Bruno Guillaume
Browse files

add count in tests

parent 115719b9
......@@ -8,6 +8,7 @@ test:
cd commands/manipulate_modified_edge && test.py && cd -
cd commands/ordering && test.py && cd -
cd grep && test.py && cd -
cd count && test.py && cd -
cd lexicons/pattern && test.py && cd -
cd lexicons/percent && test.py && cd -
cd matching/matching_complex_edges && test.py && cd -
......
File mode changed from 100644 to 100755
Corpus # sentences ADJ_NOUN NOUN_ADJ
UD_English-PUD 1000 1114 12
UD_French-PUD 1000 423 935
UD_Chinese-PUD 1000 364 0
Corpus Plur Sing undefined
UD_English-PUD 224 423 0
UD_French-PUD 146 208 0
UD_Chinese-PUD 0 0 299
pattern { A[upos=ADJ]; N[upos=NOUN]; N -[amod]-> A; A << N }
pattern { A[upos=ADJ]; N[upos=NOUN]; N -[amod]-> A; N << A }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{ "corpora": [
{ "id": "UD_English-PUD",
"directory": "data",
"files": ["en_pud-ud-test.conllu"]
},
{ "id": "UD_French-PUD",
"directory": "data",
"files": ["fr_pud-ud-test.conllu"]
},
{ "id": "UD_Chinese-PUD",
"directory": "data",
"files": ["zh_pud-ud-test.conllu"]
} ]
}
pattern {
V [upos=V];
V -[a_obj]-> A;
V -[de_obj]-> DE;
}
#! /usr/bin/env python3
import sys
import os
sys.path.append(os.getcwd() + '/..')
from utils import *
print ("--------------- count 01 ---------------")
success("grew_dev compile -i en_fr_zh.json && grew_dev count -patterns \"ADJ_NOUN.pat NOUN_ADJ.pat\" -i en_fr_zh.json", "01_expected.tsv")
print ("--------------- count 02 ---------------")
success("grew_dev compile -i en_fr_zh.json && grew_dev count -patterns ADJ_NOUN.pat -key N.Number -i en_fr_zh.json", "02_expected.tsv")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment