From 1e9a329c8b38c6551bbe4a72028d9500be914e07 Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Mon, 23 Mar 2015 11:01:11 +0100
Subject: updated examples
---
example/toy/in-test.sgm | 1 -
example/toy/in.sgm | 1 -
example/toy/toy.json | 28 ++++++++++++++++++++++++++++
example/toy/weights | 3 ---
example/toy/weights.toy | 3 +++
5 files changed, 31 insertions(+), 5 deletions(-)
delete mode 100644 example/toy/in-test.sgm
delete mode 100644 example/toy/in.sgm
create mode 100644 example/toy/toy.json
delete mode 100644 example/toy/weights
create mode 100644 example/toy/weights.toy
(limited to 'example/toy')
diff --git a/example/toy/in-test.sgm b/example/toy/in-test.sgm
deleted file mode 100644
index a13f93c..0000000
--- a/example/toy/in-test.sgm
+++ /dev/null
@@ -1 +0,0 @@
-ich sah ein kleines haus
diff --git a/example/toy/in.sgm b/example/toy/in.sgm
deleted file mode 100644
index 561d346..0000000
--- a/example/toy/in.sgm
+++ /dev/null
@@ -1 +0,0 @@
-ich sah ein kleines haus
diff --git a/example/toy/toy.json b/example/toy/toy.json
new file mode 100644
index 0000000..c1b5c55
--- /dev/null
+++ b/example/toy/toy.json
@@ -0,0 +1,28 @@
+{
+"weights":{"logp":2.0,"use_house":0.0,"use_shell":1.0},
+"nodes":
+[
+{ "id":-1, "cat":"root", "span":[-1,-1] },
+{ "id":0, "cat":"NP", "span":[0,1] },
+{ "id":1, "cat":"V", "span":[1,2] },
+{ "id":2, "cat":"JJ", "span":[3,4] },
+{ "id":3, "cat":"NN", "span":[3,5] },
+{ "id":4, "cat":"NP", "span":[2,5] },
+{ "id":5, "cat":"VP", "span":[1,5] },
+{ "id":6, "cat":"S", "span":[0,5] }
+],
+"edges":
+[
+{ "head":0, "rule":"[NP] ||| ich ||| i", "tails":[-1], "f":{"logp":-0.5,"use_i":1.0} },
+{ "head":1, "rule":"[V] ||| sah ||| saw", "tails":[-1], "f":{"logp":-0.25,"use_saw":1.0} },
+{ "head":2, "rule":"[JJ] ||| kleines ||| small", "tails":[-1], "f":{"logp":0.0,"use_small":1.0} },
+{ "head":2, "rule":"[JJ] ||| kleines ||| little", "tails":[-1], "f":{"logp":0.0,"use_little":1.0} },
+{ "head":3, "rule":"[NN] ||| kleines haus ||| small house", "tails":[-1], "f":{"logp":0.0,"use_house":1.0} },
+{ "head":3, "rule":"[NN] ||| kleines haus ||| little house", "tails":[-1], "f":{"logp":0.0,"use_house":1.0} },
+{ "head":3, "rule":"[NN] ||| [JJ,1] haus ||| [JJ,1] shell", "tails":[2], "f":{"logp":0.0,"use_shell":1.0} },
+{ "head":3, "rule":"[NN] ||| [JJ,1] haus ||| [JJ,1] house", "tails":[2], "f":{"logp":0.0,"use_house":1.0} },
+{ "head":4, "rule":"[NP] ||| ein [NN,1] ||| a [NN,1]", "tails":[3], "f":{"logp":0.0,"use_a":1.0} },
+{ "head":5, "rule":"[VP] ||| [V,1] [NP,2] ||| [V,1] [NP,2]", "tails":[1, 4], "f":{"logp":0.0} },
+{ "head":6, "rule":"[S] ||| [NP,1] [VP,2] ||| [NP,1] [VP,2]", "tails":[0, 5], "f":{"logp":0.0} }
+]
+}
diff --git a/example/toy/weights b/example/toy/weights
deleted file mode 100644
index 70075b7..0000000
--- a/example/toy/weights
+++ /dev/null
@@ -1,3 +0,0 @@
-logp 2
-use_house 0
-use_shell 1
diff --git a/example/toy/weights.toy b/example/toy/weights.toy
new file mode 100644
index 0000000..70075b7
--- /dev/null
+++ b/example/toy/weights.toy
@@ -0,0 +1,3 @@
+logp 2
+use_house 0
+use_shell 1
--
cgit v1.2.3