summaryrefslogtreecommitdiff
path: root/rescore/example
diff options
context:
space:
mode:
Diffstat (limited to 'rescore/example')
-rw-r--r--rescore/example/README4
-rw-r--r--rescore/example/cdec.ini2
-rw-r--r--rescore/example/hyp.txt5
-rw-r--r--rescore/example/small.scfg9
-rw-r--r--rescore/example/source.txt2
-rw-r--r--rescore/example/weights1
6 files changed, 23 insertions, 0 deletions
diff --git a/rescore/example/README b/rescore/example/README
new file mode 100644
index 00000000..92b657ca
--- /dev/null
+++ b/rescore/example/README
@@ -0,0 +1,4 @@
+Rescoring example:
+
+ ../rescore_with_cdec_model.pl -c cdec.ini -s source.txt -h hyp.txt -w weights -f RescoringModel
+
diff --git a/rescore/example/cdec.ini b/rescore/example/cdec.ini
new file mode 100644
index 00000000..29a1ece3
--- /dev/null
+++ b/rescore/example/cdec.ini
@@ -0,0 +1,2 @@
+formalism=scfg
+grammar=small.scfg
diff --git a/rescore/example/hyp.txt b/rescore/example/hyp.txt
new file mode 100644
index 00000000..c4757f6c
--- /dev/null
+++ b/rescore/example/hyp.txt
@@ -0,0 +1,5 @@
+0 ||| A B C ||| F1=1 F2=1
+0 ||| A b c ||| F1=1 F3=1
+0 ||| A C ||| F4=1
+1 ||| X Y ||| F5=1
+1 ||| XY ||| F6=1
diff --git a/rescore/example/small.scfg b/rescore/example/small.scfg
new file mode 100644
index 00000000..402a585a
--- /dev/null
+++ b/rescore/example/small.scfg
@@ -0,0 +1,9 @@
+[X] ||| a b c ||| A B C ||| fe=0.2
+[X] ||| a b ||| A B ||| fe=0.8
+[X] ||| c ||| C ||| fe=0.3
+[X] ||| c ||| c ||| fe=1.3
+[X] ||| a b c ||| A B c ||| fe=0.8
+[X] ||| a b c ||| A C ||| fe=2
+[X] ||| x ||| X ||| fe=0.2
+[X] ||| y ||| Y ||| fe=0.5
+[X] ||| x y ||| XY ||| fe=0.8
diff --git a/rescore/example/source.txt b/rescore/example/source.txt
new file mode 100644
index 00000000..e8d4eda2
--- /dev/null
+++ b/rescore/example/source.txt
@@ -0,0 +1,2 @@
+a b c
+x y
diff --git a/rescore/example/weights b/rescore/example/weights
new file mode 100644
index 00000000..a22d36f1
--- /dev/null
+++ b/rescore/example/weights
@@ -0,0 +1 @@
+fe -0.8