From dc6930c00b4b276883280cff1ed6dcd9ddef03c7 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Tue, 8 Dec 2009 21:38:55 -0500 Subject: LICENSE fixes, full support of lattice decoding --- tests/system_tests/lattice/cdec.ini | 5 +++++ tests/system_tests/lattice/gold.statistics | 9 +++++++++ tests/system_tests/lattice/gold.stdout | 5 +++++ tests/system_tests/lattice/input.txt | 1 + tests/system_tests/lattice/lattice.scfg | 6 ++++++ tests/system_tests/lattice/weights | 4 ++++ 6 files changed, 30 insertions(+) create mode 100644 tests/system_tests/lattice/cdec.ini create mode 100644 tests/system_tests/lattice/gold.statistics create mode 100644 tests/system_tests/lattice/gold.stdout create mode 100644 tests/system_tests/lattice/input.txt create mode 100644 tests/system_tests/lattice/lattice.scfg create mode 100644 tests/system_tests/lattice/weights (limited to 'tests/system_tests/lattice') 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 -- cgit v1.2.3