diff options
author | Chris Dyer <redpony@gmail.com> | 2009-12-08 21:38:55 -0500 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2009-12-08 21:38:55 -0500 |
commit | dc6930c00b4b276883280cff1ed6dcd9ddef03c7 (patch) | |
tree | d76d25baf66459d13da4faedffd7d6faba28a513 /tests | |
parent | 5082307f382a6563d4ffb97034137da4e362e629 (diff) |
LICENSE fixes, full support of lattice decoding
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system_tests/controlled_synparse/gold.stdout | 72 | ||||
-rw-r--r-- | tests/system_tests/ftrans/gold.stdout | 8 | ||||
-rw-r--r-- | tests/system_tests/lattice/cdec.ini | 5 | ||||
-rw-r--r-- | tests/system_tests/lattice/gold.statistics | 9 | ||||
-rw-r--r-- | tests/system_tests/lattice/gold.stdout | 5 | ||||
-rw-r--r-- | tests/system_tests/lattice/input.txt | 1 | ||||
-rw-r--r-- | tests/system_tests/lattice/lattice.scfg | 6 | ||||
-rw-r--r-- | tests/system_tests/lattice/weights | 4 |
8 files changed, 70 insertions, 40 deletions
diff --git a/tests/system_tests/controlled_synparse/gold.stdout b/tests/system_tests/controlled_synparse/gold.stdout index f3e0ce08..9e68069e 100644 --- a/tests/system_tests/controlled_synparse/gold.stdout +++ b/tests/system_tests/controlled_synparse/gold.stdout @@ -1,36 +1,36 @@ -0 ||| c b c d ||| F1bad2=1;F5=1;F6=1;F7=1;Glue=3 -0 ||| c d c b e ||| F1bad2=1;F4=1;F5=1;F7=1;Glue=1 -0 ||| c b c d ||| F1bad2=1;F6=1;F7=1;F9=1;Glue=2 -0 ||| b d c b e ||| F1bad1=1;F4=1;F5=1;F7=1;Glue=1 -0 ||| c b c d ||| F1bad2=1;F3=1;F5=1;F7=1;Glue=1 -0 ||| a d c b e ||| F1=1;F4=1;F5=1;F7=1;Glue=1 -0 ||| b b c d ||| F1bad1=1;F3=1;F5=1;F7=1;Glue=1 -0 ||| c d c b ||| F1bad2=1;F2=1;F5=1;F7=1;Glue=1 -0 ||| a b c d ||| F1=1;F3=1;F5=1;F7=1;Glue=1 -0 ||| b b c d ||| F1bad1=1;F5=1;F6=1;F7=1;Glue=3 -0 ||| b d c b ||| F1bad1=1;F2=1;F5=1;F7=1;Glue=1 -0 ||| a d c b ||| F1=1;F2=1;F5=1;F7=1;Glue=1 -0 ||| b b c d ||| F1bad1=1;F6=1;F7=1;F9=1;Glue=2 -0 ||| c c b d ||| F1bad2=1;F6=1;F7=1;F8=1;Glue=2 -0 ||| a b c d ||| F1=1;F6=1;F7=1;F9=1;Glue=2 -0 ||| a b c d ||| F1=1;F5=1;F6=1;F7=1;Glue=3 -0 ||| b c b d ||| F1bad1=1;F6=1;F7=1;F8=1;Glue=2 -0 ||| a c b d ||| F1=1;F6=1;F7=1;F8=1;Glue=2 -1 ||| c b c d ||| F1bad2=1;F5=1;F6=1;F7=1;Glue=3 -1 ||| c d c b e ||| F1bad2=1;F4=1;F5=1;F7=1;Glue=1 -1 ||| c b c d ||| F1bad2=1;F6=1;F7=1;F9=1;Glue=2 -1 ||| b d c b e ||| F1bad1=1;F4=1;F5=1;F7=1;Glue=1 -1 ||| c b c d ||| F1bad2=1;F3=1;F5=1;F7=1;Glue=1 -1 ||| a d c b e ||| F1=1;F4=1;F5=1;F7=1;Glue=1 -1 ||| b b c d ||| F1bad1=1;F3=1;F5=1;F7=1;Glue=1 -1 ||| c d c b ||| F1bad2=1;F2=1;F5=1;F7=1;Glue=1 -1 ||| a b c d ||| F1=1;F3=1;F5=1;F7=1;Glue=1 -1 ||| b b c d ||| F1bad1=1;F5=1;F6=1;F7=1;Glue=3 -1 ||| b d c b ||| F1bad1=1;F2=1;F5=1;F7=1;Glue=1 -1 ||| a d c b ||| F1=1;F2=1;F5=1;F7=1;Glue=1 -1 ||| b b c d ||| F1bad1=1;F6=1;F7=1;F9=1;Glue=2 -1 ||| c c b d ||| F1bad2=1;F6=1;F7=1;F8=1;Glue=2 -1 ||| a b c d ||| F1=1;F6=1;F7=1;F9=1;Glue=2 -1 ||| a b c d ||| F1=1;F5=1;F6=1;F7=1;Glue=3 -1 ||| b c b d ||| F1bad1=1;F6=1;F7=1;F8=1;Glue=2 -1 ||| a c b d ||| F1=1;F6=1;F7=1;F8=1;Glue=2 +0 ||| c b c d ||| F1bad2=1;F5=1;F6=1;F7=1;Glue=3 ||| 0 +0 ||| c d c b e ||| F1bad2=1;F4=1;F5=1;F7=1;Glue=1 ||| 0 +0 ||| c b c d ||| F1bad2=1;F6=1;F7=1;F9=1;Glue=2 ||| 0 +0 ||| b d c b e ||| F1bad1=1;F4=1;F5=1;F7=1;Glue=1 ||| 0 +0 ||| c b c d ||| F1bad2=1;F3=1;F5=1;F7=1;Glue=1 ||| 0 +0 ||| a d c b e ||| F1=1;F4=1;F5=1;F7=1;Glue=1 ||| 0 +0 ||| b b c d ||| F1bad1=1;F3=1;F5=1;F7=1;Glue=1 ||| 0 +0 ||| c d c b ||| F1bad2=1;F2=1;F5=1;F7=1;Glue=1 ||| 0 +0 ||| a b c d ||| F1=1;F3=1;F5=1;F7=1;Glue=1 ||| 0 +0 ||| b b c d ||| F1bad1=1;F5=1;F6=1;F7=1;Glue=3 ||| 0 +0 ||| b d c b ||| F1bad1=1;F2=1;F5=1;F7=1;Glue=1 ||| 0 +0 ||| a d c b ||| F1=1;F2=1;F5=1;F7=1;Glue=1 ||| 0 +0 ||| b b c d ||| F1bad1=1;F6=1;F7=1;F9=1;Glue=2 ||| 0 +0 ||| c c b d ||| F1bad2=1;F6=1;F7=1;F8=1;Glue=2 ||| 0 +0 ||| a b c d ||| F1=1;F6=1;F7=1;F9=1;Glue=2 ||| 0 +0 ||| a b c d ||| F1=1;F5=1;F6=1;F7=1;Glue=3 ||| 0 +0 ||| b c b d ||| F1bad1=1;F6=1;F7=1;F8=1;Glue=2 ||| 0 +0 ||| a c b d ||| F1=1;F6=1;F7=1;F8=1;Glue=2 ||| 0 +1 ||| c b c d ||| F1bad2=1;F5=1;F6=1;F7=1;Glue=3 ||| 0 +1 ||| c d c b e ||| F1bad2=1;F4=1;F5=1;F7=1;Glue=1 ||| 0 +1 ||| c b c d ||| F1bad2=1;F6=1;F7=1;F9=1;Glue=2 ||| 0 +1 ||| b d c b e ||| F1bad1=1;F4=1;F5=1;F7=1;Glue=1 ||| 0 +1 ||| c b c d ||| F1bad2=1;F3=1;F5=1;F7=1;Glue=1 ||| 0 +1 ||| a d c b e ||| F1=1;F4=1;F5=1;F7=1;Glue=1 ||| 0 +1 ||| b b c d ||| F1bad1=1;F3=1;F5=1;F7=1;Glue=1 ||| 0 +1 ||| c d c b ||| F1bad2=1;F2=1;F5=1;F7=1;Glue=1 ||| 0 +1 ||| a b c d ||| F1=1;F3=1;F5=1;F7=1;Glue=1 ||| 0 +1 ||| b b c d ||| F1bad1=1;F5=1;F6=1;F7=1;Glue=3 ||| 0 +1 ||| b d c b ||| F1bad1=1;F2=1;F5=1;F7=1;Glue=1 ||| 0 +1 ||| a d c b ||| F1=1;F2=1;F5=1;F7=1;Glue=1 ||| 0 +1 ||| b b c d ||| F1bad1=1;F6=1;F7=1;F9=1;Glue=2 ||| 0 +1 ||| c c b d ||| F1bad2=1;F6=1;F7=1;F8=1;Glue=2 ||| 0 +1 ||| a b c d ||| F1=1;F6=1;F7=1;F9=1;Glue=2 ||| 0 +1 ||| a b c d ||| F1=1;F5=1;F6=1;F7=1;Glue=3 ||| 0 +1 ||| b c b d ||| F1bad1=1;F6=1;F7=1;F8=1;Glue=2 ||| 0 +1 ||| a c b d ||| F1=1;F6=1;F7=1;F8=1;Glue=2 ||| 0 diff --git a/tests/system_tests/ftrans/gold.stdout b/tests/system_tests/ftrans/gold.stdout index 25c615d1..d4e48533 100644 --- a/tests/system_tests/ftrans/gold.stdout +++ b/tests/system_tests/ftrans/gold.stdout @@ -1,4 +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 +0 ||| CB ||| F4=1;Inv=1 ||| 101 +0 ||| BC ||| F3=0.4;Mono=1 ||| 6 +0 ||| B C ||| F1=1;OtherFeat=1;F2=0.2;Mono=1 ||| 3 +0 ||| C B ||| F1=1;OtherFeat=1;F2=0.2;Inv=1 ||| 2 diff --git a/tests/system_tests/lattice/cdec.ini b/tests/system_tests/lattice/cdec.ini new file mode 100644 index 00000000..e0da7daf --- /dev/null +++ b/tests/system_tests/lattice/cdec.ini @@ -0,0 +1,5 @@ +formalism=scfg +feature_function=SourceWordPenalty +feature_function=WordPenalty +k_best=1000 +grammar=lattice.scfg diff --git a/tests/system_tests/lattice/gold.statistics b/tests/system_tests/lattice/gold.statistics new file mode 100644 index 00000000..48062f98 --- /dev/null +++ b/tests/system_tests/lattice/gold.statistics @@ -0,0 +1,9 @@ +-lm_nodes 6 +-lm_edges 10 +-lm_paths 5 +-lm_trans ab +-lm_trans -0.225 ++lm_nodes 6 ++lm_edges 10 ++lm_paths 5 ++lm_trans ab diff --git a/tests/system_tests/lattice/gold.stdout b/tests/system_tests/lattice/gold.stdout new file mode 100644 index 00000000..84f8ea78 --- /dev/null +++ b/tests/system_tests/lattice/gold.stdout @@ -0,0 +1,5 @@ +0 ||| ab ||| Cost=0.1;WordPenalty=-0.434294;SourceWordPenalty=-0.434294;LatticeCost=0.125 ||| -1.09359 +0 ||| cb ||| Cost=0.3;WordPenalty=-0.434294;SourceWordPenalty=-0.868589;LatticeCost=2.25 ||| -3.85288 +0 ||| a_b ||| Cost=0.2;WordPenalty=-0.434294;SourceWordPenalty=-0.868589;LatticeCost=2.5 ||| -4.00288 +0 ||| a b ||| Cost=0.3;Glue=1;WordPenalty=-0.868589;SourceWordPenalty=-0.868589;LatticeCost=2.5 ||| -4.53718 +0 ||| a' b ||| Cost=0.3;Glue=1;WordPenalty=-0.868589;SourceWordPenalty=-0.868589;LatticeCost=2.5 ||| -4.53718 diff --git a/tests/system_tests/lattice/input.txt b/tests/system_tests/lattice/input.txt new file mode 100644 index 00000000..e0cd1b57 --- /dev/null +++ b/tests/system_tests/lattice/input.txt @@ -0,0 +1 @@ +((('A',0.5,1),('C',0.25,1),('AB',0.125,2),),(('B',2,1),),) diff --git a/tests/system_tests/lattice/lattice.scfg b/tests/system_tests/lattice/lattice.scfg new file mode 100644 index 00000000..87a72383 --- /dev/null +++ b/tests/system_tests/lattice/lattice.scfg @@ -0,0 +1,6 @@ +[X] ||| A ||| a ||| Cost=0.1 +[X] ||| A ||| a' ||| Cost=0.1 +[X] ||| B ||| b ||| Cost=0.2 +[X] ||| AB ||| ab ||| Cost=0.1 +[X] ||| C B ||| cb ||| Cost=0.3 +[X] ||| A B ||| a_b ||| Cost=0.2 diff --git a/tests/system_tests/lattice/weights b/tests/system_tests/lattice/weights new file mode 100644 index 00000000..4746ff45 --- /dev/null +++ b/tests/system_tests/lattice/weights @@ -0,0 +1,4 @@ +WordPenalty 1 +SourceWordPenalty 1 +Cost -1 +LatticeCost -1 |