summaryrefslogtreecommitdiff
path: root/example/toy
diff options
context:
space:
mode:
Diffstat (limited to 'example/toy')
-rw-r--r--example/toy/cdec.ini4
-rw-r--r--example/toy/grammar11
-rw-r--r--example/toy/grammar-test22
-rw-r--r--example/toy/in1
-rw-r--r--example/toy/weights3
5 files changed, 41 insertions, 0 deletions
diff --git a/example/toy/cdec.ini b/example/toy/cdec.ini
new file mode 100644
index 0000000..f9c75ff
--- /dev/null
+++ b/example/toy/cdec.ini
@@ -0,0 +1,4 @@
+formalism=scfg
+grammar=grammar-test
+#add_pass_through_rules=true
+#weights=weights
diff --git a/example/toy/grammar b/example/toy/grammar
new file mode 100644
index 0000000..81d41c7
--- /dev/null
+++ b/example/toy/grammar
@@ -0,0 +1,11 @@
+[S] ||| [NP,1] [VP,2] ||| [1] [2] ||| logp=0
+[NP] ||| ich ||| i ||| logp=-0.5 use_i=1.0
+[NP] ||| ein [NN,1] ||| a [1] ||| logp=0 use_a=1.0
+[NN] ||| kleines haus ||| small house ||| logp=0 use_house=1
+[NN] ||| kleines haus ||| little house ||| logp=0 use_house=1
+[NN] ||| [JJ,1] haus ||| [1] house ||| logp=0 use_house=1
+[NN] ||| [JJ,1] haus ||| [1] shell ||| logp=0 use_shell=1
+[JJ] ||| kleines ||| small ||| logp=0 use_small=1.0
+[JJ] ||| kleines ||| little ||| logp=0 use_little=1.0
+[VP] ||| [V,1] [NP,2] ||| [1] [2] ||| logp=0
+[V] ||| sah ||| saw ||| logp=-0.25 use_saw=1.0
diff --git a/example/toy/grammar-test b/example/toy/grammar-test
new file mode 100644
index 0000000..4027c71
--- /dev/null
+++ b/example/toy/grammar-test
@@ -0,0 +1,22 @@
+[S] ||| [B,1] ||| [1] ||| logp=0
+[S] ||| ich [V,1] ein [JJ,2] haus ||| i [1] a [2] ||| logp=0
+[S] ||| ich sah ein kleines haus ||| i saw a small house ||| logp=0
+[S] ||| ich sah ein [JJ,1] ||| i saw a [1] ||| logp=0
+[B] ||| [C,1] ||| [1] ||| logp=0
+[C] ||| [Q,1] ||| [1] ||| logp=0
+[Q] ||| [NP,1] [VP,2] ||| [1] [2] ||| logp=0
+[NP] ||| ich ||| i ||| logp=-0.5 use_i=1.0
+[NP] ||| ein [NN,1] ||| a [1] ||| logp=0 use_a=1.0
+[NN] ||| [JJ,1] haus ||| [1] house ||| logp=0 use_house=1
+[NN] ||| [JJ,1] haus ||| [1] shell ||| logp=0 use_shell=1
+[JJ] ||| [H,1] ||| [1] ||| logp=0
+[H] ||| kleines [Z,1] ||| small [1] ||| logp=0
+[Z] ||| [I,1] ||| [1] ||| logp=0
+[I] ||| haus ||| house ||| logp=0
+[JJ] ||| kleines ||| small ||| logp=0 use_small=1.0
+[JJ] ||| kleines ||| little ||| logp=0 use_little=1.0
+[JJ] ||| grosses ||| big ||| logp=0
+[JJ] ||| grosses ||| large ||| logp=0
+[VP] ||| [V,1] [NP,2] ||| [1] [2] ||| logp=0
+[V] ||| sah ||| saw ||| logp=-0.25 use_saw=1.0
+[V] ||| fand ||| found ||| logp=0
diff --git a/example/toy/in b/example/toy/in
new file mode 100644
index 0000000..e6df927
--- /dev/null
+++ b/example/toy/in
@@ -0,0 +1 @@
+ich sah ein kleines haus
diff --git a/example/toy/weights b/example/toy/weights
new file mode 100644
index 0000000..70075b7
--- /dev/null
+++ b/example/toy/weights
@@ -0,0 +1,3 @@
+logp 2
+use_house 0
+use_shell 1