summaryrefslogtreecommitdiff
path: root/tests/system_tests/lattice
diff options
context:
space:
mode:
Diffstat (limited to 'tests/system_tests/lattice')
-rw-r--r--tests/system_tests/lattice/cdec.ini5
-rw-r--r--tests/system_tests/lattice/gold.statistics9
-rw-r--r--tests/system_tests/lattice/gold.stdout5
-rw-r--r--tests/system_tests/lattice/input.txt1
-rw-r--r--tests/system_tests/lattice/lattice.scfg6
-rw-r--r--tests/system_tests/lattice/weights4
6 files changed, 30 insertions, 0 deletions
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