diff options
author | Wu, Ke <wuke@cs.umd.edu> | 2014-12-17 16:15:13 -0500 |
---|---|---|
committer | Wu, Ke <wuke@cs.umd.edu> | 2014-12-17 16:15:13 -0500 |
commit | 6829a0bc624b02ebefc79f8cf9ec89d7d64a7c30 (patch) | |
tree | 125dfb20f73342873476c793995397b26fd202dd /tests/system_tests | |
parent | b455a108a21f4ba5a58ab1bc53a8d2bf4d829067 (diff) | |
parent | 7468e8d85e99b4619442c7afaf4a0d92870111bb (diff) |
Merge branch 'const_reorder_2' into softsyn_2
Diffstat (limited to 'tests/system_tests')
-rw-r--r-- | tests/system_tests/cfg_rescore/input.txt | 2 | ||||
-rw-r--r-- | tests/system_tests/cfg_rescore/input0.hg.bin.gz | bin | 0 -> 403 bytes | |||
-rw-r--r-- | tests/system_tests/conll/README | 8 | ||||
-rw-r--r-- | tests/system_tests/conll/cdec.ini | 13 | ||||
-rw-r--r-- | tests/system_tests/conll/gold.statistics | 20 | ||||
-rw-r--r-- | tests/system_tests/conll/gold.stdout | 0 | ||||
-rw-r--r-- | tests/system_tests/conll/input.conll | 13 | ||||
-rw-r--r-- | tests/system_tests/conll/input.txt | 2 | ||||
-rw-r--r-- | tests/system_tests/conll/tagset.txt | 1 | ||||
-rw-r--r-- | tests/system_tests/conll/weights | 64 | ||||
-rw-r--r-- | tests/system_tests/ftrans/input.txt | 2 | ||||
-rw-r--r-- | tests/system_tests/ftrans/input0.hg.bin.gz | bin | 0 -> 225 bytes |
12 files changed, 123 insertions, 2 deletions
diff --git a/tests/system_tests/cfg_rescore/input.txt b/tests/system_tests/cfg_rescore/input.txt index 2999a5fb..99624d85 100644 --- a/tests/system_tests/cfg_rescore/input.txt +++ b/tests/system_tests/cfg_rescore/input.txt @@ -1 +1 @@ -{"rules":[1,"[S] ||| [NP1] [VP] ||| [1] [2] ||| Active=1",2,"[S] ||| [NP2] [VPSV] by [NP1] ||| [1] [2] by [3] ||| Passive=1",3,"[VP] ||| [V] [NP2] ||| [1] [2]",4,"[V] ||| ate ||| ate",5,"[VPSV] ||| was eaten ||| was eaten",6,"[NP1] ||| John ||| John",7,"[NP2] ||| broccoli ||| broccoli",8,"[NP2] ||| the broccoli ||| the broccoli ||| Definite=1",9,"[Goal] ||| [X] ||| [1]"],"features":["PhraseModel_0","PhraseModel_1","PhraseModel_2","PhraseModel_3","PhraseModel_4","PhraseModel_5","PhraseModel_6","PhraseModel_7","PhraseModel_8","PhraseModel_9","PhraseModel_10","PhraseModel_11","PhraseModel_12","PhraseModel_13","PhraseModel_14","PhraseModel_15","PhraseModel_16","PhraseModel_17","PhraseModel_18","PhraseModel_19","PhraseModel_20","PhraseModel_21","PhraseModel_22","PhraseModel_23","PhraseModel_24","PhraseModel_25","PhraseModel_26","PhraseModel_27","PhraseModel_28","PhraseModel_29","PhraseModel_30","PhraseModel_31","PhraseModel_32","PhraseModel_33","PhraseModel_34","PhraseModel_35","PhraseModel_36","PhraseModel_37","PhraseModel_38","PhraseModel_39","PhraseModel_40","PhraseModel_41","PhraseModel_42","PhraseModel_43","PhraseModel_44","PhraseModel_45","PhraseModel_46","PhraseModel_47","PhraseModel_48","PhraseModel_49","PhraseModel_50","PhraseModel_51","PhraseModel_52","PhraseModel_53","PhraseModel_54","PhraseModel_55","PhraseModel_56","PhraseModel_57","PhraseModel_58","PhraseModel_59","PhraseModel_60","PhraseModel_61","PhraseModel_62","PhraseModel_63","PhraseModel_64","PhraseModel_65","PhraseModel_66","PhraseModel_67","PhraseModel_68","PhraseModel_69","PhraseModel_70","PhraseModel_71","PhraseModel_72","PhraseModel_73","PhraseModel_74","PhraseModel_75","PhraseModel_76","PhraseModel_77","PhraseModel_78","PhraseModel_79","PhraseModel_80","PhraseModel_81","PhraseModel_82","PhraseModel_83","PhraseModel_84","PhraseModel_85","PhraseModel_86","PhraseModel_87","PhraseModel_88","PhraseModel_89","PhraseModel_90","PhraseModel_91","PhraseModel_92","PhraseModel_93","PhraseModel_94","PhraseModel_95","PhraseModel_96","PhraseModel_97","PhraseModel_98","PhraseModel_99","Active","Passive","Definite"],"edges":[{"tail":[],"spans":[-1,-1,-1,-1],"feats":[],"rule":6}],"node":{"in_edges":[0],"cat":"NP1","node_hash":"0000000000000006"},"edges":[{"tail":[],"spans":[-1,-1,-1,-1],"feats":[],"rule":4}],"node":{"in_edges":[1],"cat":"V","node_hash":"0000000000000004"},"edges":[{"tail":[],"spans":[-1,-1,-1,-1],"feats":[],"rule":7},{"tail":[],"spans":[-1,-1,-1,-1],"feats":[102,1],"rule":8}],"node":{"in_edges":[2,3],"cat":"NP2","node_hash":"0000000000000008"},"edges":[{"tail":[1,2],"spans":[-1,-1,-1,-1],"feats":[],"rule":3}],"node":{"in_edges":[4],"cat":"VP","node_hash":"0000000000000003"},"edges":[{"tail":[],"spans":[-1,-1,-1,-1],"feats":[],"rule":5}],"node":{"in_edges":[5],"cat":"VPSV","node_hash":"0000000000000005"},"edges":[{"tail":[0,3],"spans":[-1,-1,-1,-1],"feats":[100,1],"rule":1},{"tail":[2,4,0],"spans":[-1,-1,-1,-1],"feats":[101,1],"rule":2}],"node":{"in_edges":[6,7],"cat":"S","node_hash":"0000000000000002"},"edges":[{"tail":[5],"spans":[-1,-1,-1,-1],"feats":[],"rule":9}],"node":{"in_edges":[8],"cat":"Goal","node_hash":"000000000000003D"}} +::forest:: input0.hg.bin.gz diff --git a/tests/system_tests/cfg_rescore/input0.hg.bin.gz b/tests/system_tests/cfg_rescore/input0.hg.bin.gz Binary files differnew file mode 100644 index 00000000..051e1e32 --- /dev/null +++ b/tests/system_tests/cfg_rescore/input0.hg.bin.gz diff --git a/tests/system_tests/conll/README b/tests/system_tests/conll/README new file mode 100644 index 00000000..261e6a05 --- /dev/null +++ b/tests/system_tests/conll/README @@ -0,0 +1,8 @@ +To generate the input file, run: + + ~/cdec/corpus/conll2cdec.pl input.conll > input.txt + +This will create a training corpus (i.e., an input is present as well as +gold standard output is present) in input.txt. + +See cdec.ini for examples of how to include features in the model. diff --git a/tests/system_tests/conll/cdec.ini b/tests/system_tests/conll/cdec.ini new file mode 100644 index 00000000..f214857a --- /dev/null +++ b/tests/system_tests/conll/cdec.ini @@ -0,0 +1,13 @@ +formalism=tagger +tagger_tagset=tagset.txt + +# grab the second feature column from the conll input (-w 2) and +# create a feature of i-1,i-2 conjoined with y_i +feature_function=CoNLLFeatures -w 2 -t xxy:%x[-1]_%x[0]:%y[0] + +# grab the second feature column from the conll input (-w 2) and +# create a feature of i-1,i-2 conjoined with y_i +feature_function=CoNLLFeatures -w 1 -t xy:%x[0]:%y[0] + +intersection_strategy=full + diff --git a/tests/system_tests/conll/gold.statistics b/tests/system_tests/conll/gold.statistics new file mode 100644 index 00000000..17366689 --- /dev/null +++ b/tests/system_tests/conll/gold.statistics @@ -0,0 +1,20 @@ +-lm_nodes 12 +-lm_edges 24 +-lm_paths 729 ++lm_nodes 12 ++lm_edges 24 ++lm_paths 729 ++lm_trans O O O B I O +constr_nodes 12 +constr_edges 12 +constr_paths 1 +-lm_nodes 10 +-lm_edges 20 +-lm_paths 243 ++lm_nodes 10 ++lm_edges 20 ++lm_paths 243 ++lm_trans O B I I O +constr_nodes 10 +constr_edges 10 +constr_paths 1 diff --git a/tests/system_tests/conll/gold.stdout b/tests/system_tests/conll/gold.stdout new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/tests/system_tests/conll/gold.stdout diff --git a/tests/system_tests/conll/input.conll b/tests/system_tests/conll/input.conll new file mode 100644 index 00000000..507510ca --- /dev/null +++ b/tests/system_tests/conll/input.conll @@ -0,0 +1,13 @@ +the the DT O +angry angry JJ O +dog dog NN O +bit bite VBD B +me I PRN I +. . . O + +i i PRN O +ate eat VBD B +some some DT I +pie pie NN I +. . . O + diff --git a/tests/system_tests/conll/input.txt b/tests/system_tests/conll/input.txt new file mode 100644 index 00000000..6a1a0230 --- /dev/null +++ b/tests/system_tests/conll/input.txt @@ -0,0 +1,2 @@ +<seg id="0" feat1="the angry dog bite I ." feat2="DT JJ NN VBD PRN ."> the angry dog bit me . ||| O O O B I O </seg> +<seg id="1" feat1="i eat some pie ." feat2="PRN VBD DT NN ."> i ate some pie . ||| O B I I O </seg> diff --git a/tests/system_tests/conll/tagset.txt b/tests/system_tests/conll/tagset.txt new file mode 100644 index 00000000..bd0e6b60 --- /dev/null +++ b/tests/system_tests/conll/tagset.txt @@ -0,0 +1 @@ +B I O diff --git a/tests/system_tests/conll/weights b/tests/system_tests/conll/weights new file mode 100644 index 00000000..de130cb6 --- /dev/null +++ b/tests/system_tests/conll/weights @@ -0,0 +1,64 @@ +# Objective = 7.63544 (eval count=5) +xxy:<s>_DT:B -0.19295226006843877 +xy:the:B -0.19295226006843877 +xxy:<s>_DT:I -0.19295226006843877 +xy:the:I -0.19295226006843877 +xxy:<s>_DT:O 0.38590452013687793 +xy:the:O 0.38590452013687793 +xxy:DT_JJ:B -0.19295226006843877 +xy:angry:B -0.19295226006843877 +xxy:DT_JJ:I -0.19295226006843877 +xy:angry:I -0.19295226006843877 +xxy:DT_JJ:O 0.38590452013687793 +xy:angry:O 0.38590452013687793 +xxy:JJ_NN:B -0.19295226006843885 +xy:dog:B -0.19295226006843885 +xxy:JJ_NN:I -0.19295226006843885 +xy:dog:I -0.19295226006843885 +xxy:JJ_NN:O 0.38590452013687765 +xy:dog:O 0.38590452013687765 +xxy:NN_VBD:B 0.38590452013687765 +xy:bite:B 0.38590452013687765 +xxy:NN_VBD:I -0.19295226006843885 +xy:bite:I -0.19295226006843885 +xxy:NN_VBD:O -0.19295226006843885 +xy:bite:O -0.19295226006843885 +xxy:VBD_PRN:B -0.19295226006843885 +xy:I:B -0.19295226006843885 +xxy:VBD_PRN:I 0.38590452013687765 +xy:I:I 0.38590452013687765 +xxy:VBD_PRN:O -0.19295226006843885 +xy:I:O -0.19295226006843885 +xxy:PRN_.:B -0.16038191506717553 +xy:.:B -0.32076383013435106 +xxy:PRN_.:I -0.16038191506717553 +xy:.:I -0.32076383013435106 +xxy:PRN_.:O 0.32076383013435134 +xy:.:O 0.64152766026870267 +xxy:<s>_PRN:B -0.19295226006843871 +xy:i:B -0.19295226006843871 +xxy:<s>_PRN:I -0.19295226006843871 +xy:i:I -0.19295226006843871 +xxy:<s>_PRN:O 0.38590452013687804 +xy:i:O 0.38590452013687804 +xxy:PRN_VBD:B 0.38590452013687804 +xy:eat:B 0.38590452013687804 +xxy:PRN_VBD:I -0.19295226006843871 +xy:eat:I -0.19295226006843871 +xxy:PRN_VBD:O -0.19295226006843871 +xy:eat:O -0.19295226006843871 +xxy:VBD_DT:B -0.19295226006843877 +xy:some:B -0.19295226006843877 +xxy:VBD_DT:I 0.38590452013687798 +xy:some:I 0.38590452013687798 +xxy:VBD_DT:O -0.19295226006843877 +xy:some:O -0.19295226006843877 +xxy:DT_NN:B -0.19295226006843877 +xy:pie:B -0.19295226006843877 +xxy:DT_NN:I 0.38590452013687798 +xy:pie:I 0.38590452013687798 +xxy:DT_NN:O -0.19295226006843877 +xy:pie:O -0.19295226006843877 +xxy:NN_.:B -0.16038191506717553 +xxy:NN_.:I -0.16038191506717553 +xxy:NN_.:O 0.32076383013435134 diff --git a/tests/system_tests/ftrans/input.txt b/tests/system_tests/ftrans/input.txt index aa37b2e7..99624d85 100644 --- a/tests/system_tests/ftrans/input.txt +++ b/tests/system_tests/ftrans/input.txt @@ -1 +1 @@ -{"rules":[1,"[B] ||| b ||| b",2,"[C] ||| c ||| c",3,"[A] ||| [B,1] [C,2] ||| [1] [2] ||| Mono=1",4,"[A] ||| [C,1] [B,2] ||| [1] [2] ||| Inv=1",5,"[S] ||| [A,1] ||| [1]"],"features":["Mono","Inv"],"edges":[{"tail":[],"feats":[],"rule":1}],"node":{"in_edges":[0],"cat":"B"},"edges":[{"tail":[],"feats":[],"rule":2}],"node":{"in_edges":[1],"cat":"C"},"edges":[{"tail":[0,1],"feats":[0,1],"rule":3},{"tail":[1,0],"feats":[1,1],"rule":4}],"node":{"in_edges":[2,3],"cat":"A"},"edges":[{"tail":[2],"feats":[],"rule":5}],"node":{"in_edges":[4],"cat":"S"}} +::forest:: input0.hg.bin.gz diff --git a/tests/system_tests/ftrans/input0.hg.bin.gz b/tests/system_tests/ftrans/input0.hg.bin.gz Binary files differnew file mode 100644 index 00000000..210f4a44 --- /dev/null +++ b/tests/system_tests/ftrans/input0.hg.bin.gz |