From 8780a924a060ced3468b71a088409d5ef83fc985 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Fri, 4 Dec 2009 20:32:11 -0500 Subject: oops, forgot to add tests --- tests/system_tests/ftrans/cdec.ini | 3 +++ tests/system_tests/ftrans/ftrans.pt | 4 ++++ tests/system_tests/ftrans/gold.statistics | 5 +++++ tests/system_tests/ftrans/gold.stdout | 4 ++++ tests/system_tests/ftrans/input.cfg | 5 +++++ tests/system_tests/ftrans/input.txt | 1 + tests/system_tests/ftrans/weights | 5 +++++ 7 files changed, 27 insertions(+) create mode 100644 tests/system_tests/ftrans/cdec.ini create mode 100644 tests/system_tests/ftrans/ftrans.pt create mode 100644 tests/system_tests/ftrans/gold.statistics create mode 100644 tests/system_tests/ftrans/gold.stdout create mode 100644 tests/system_tests/ftrans/input.cfg create mode 100644 tests/system_tests/ftrans/input.txt create mode 100644 tests/system_tests/ftrans/weights (limited to 'tests/system_tests/ftrans') diff --git a/tests/system_tests/ftrans/cdec.ini b/tests/system_tests/ftrans/cdec.ini new file mode 100644 index 00000000..e8e004d6 --- /dev/null +++ b/tests/system_tests/ftrans/cdec.ini @@ -0,0 +1,3 @@ +formalism=fst +k_best=1000 +grammar=ftrans.pt diff --git a/tests/system_tests/ftrans/ftrans.pt b/tests/system_tests/ftrans/ftrans.pt new file mode 100644 index 00000000..7e8c6f59 --- /dev/null +++ b/tests/system_tests/ftrans/ftrans.pt @@ -0,0 +1,4 @@ +b ||| B ||| F1=1 OtherFeat=1 +c ||| C ||| F2=0.2 +b c ||| BC ||| F3=0.4 +c b ||| CB ||| F4=1 diff --git a/tests/system_tests/ftrans/gold.statistics b/tests/system_tests/ftrans/gold.statistics new file mode 100644 index 00000000..40cdfd4c --- /dev/null +++ b/tests/system_tests/ftrans/gold.statistics @@ -0,0 +1,5 @@ +-lm_nodes 13 +-lm_edges 16 +-lm_paths 4 +-lm_trans CB +-lm_viterbi 101 diff --git a/tests/system_tests/ftrans/gold.stdout b/tests/system_tests/ftrans/gold.stdout new file mode 100644 index 00000000..25c615d1 --- /dev/null +++ b/tests/system_tests/ftrans/gold.stdout @@ -0,0 +1,4 @@ +0 ||| CB ||| F4=1;Inv=1 +0 ||| BC ||| F3=0.4;Mono=1 +0 ||| B C ||| F1=1;OtherFeat=1;F2=0.2;Mono=1 +0 ||| C B ||| F1=1;OtherFeat=1;F2=0.2;Inv=1 diff --git a/tests/system_tests/ftrans/input.cfg b/tests/system_tests/ftrans/input.cfg new file mode 100644 index 00000000..b602c1cb --- /dev/null +++ b/tests/system_tests/ftrans/input.cfg @@ -0,0 +1,5 @@ +[S] ||| [A] +[A] ||| [B] [C] ||| Mono=1 +[A] ||| [C] [B] ||| Inv=1 +[B] ||| b +[C] ||| c diff --git a/tests/system_tests/ftrans/input.txt b/tests/system_tests/ftrans/input.txt new file mode 100644 index 00000000..aa37b2e7 --- /dev/null +++ b/tests/system_tests/ftrans/input.txt @@ -0,0 +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"}} diff --git a/tests/system_tests/ftrans/weights b/tests/system_tests/ftrans/weights new file mode 100644 index 00000000..89d3a6d3 --- /dev/null +++ b/tests/system_tests/ftrans/weights @@ -0,0 +1,5 @@ +F1 1 +F3 10 +F4 100 +Mono 2 +Inv 1 -- cgit v1.2.3