summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-06-01 23:26:43 +0200
committerPatrick Simianer <p@simianer.de>2014-06-01 23:26:43 +0200
commit3b0d4622865e71c49c4efc4db4ac35538a373a47 (patch)
tree722ab034f381a357e84d0bf151928ea3db296a80 /example
parentaf62fcca3729c9763c374520e1665f782bbbdf42 (diff)
externalize grammar.rb
Diffstat (limited to 'example')
-rw-r--r--example/glue (renamed from example/grammar.x)0
-rw-r--r--example/grammar-test22
2 files changed, 22 insertions, 0 deletions
diff --git a/example/grammar.x b/example/glue
index 7ff74b5..7ff74b5 100644
--- a/example/grammar.x
+++ b/example/glue
diff --git a/example/grammar-test b/example/grammar-test
new file mode 100644
index 0000000..f49b999
--- /dev/null
+++ b/example/grammar-test
@@ -0,0 +1,22 @@
+[S] ||| [B,1] ||| [1] ||| logp=0
+[S] ||| ich [V,1] ein [JJ,2] haus ||| i [1] a [2] |||
+[S] ||| ich sah ein kleines haus ||| i saw a small house |||
+[S] ||| ich sah ein [JJ,1] ||| i saw a [1] |||
+[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] |||
+[H] ||| kleines [Z,1] ||| small [1] |||
+[Z] ||| [I,1] ||| [1] |||
+[I] ||| haus ||| house |||
+[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