summaryrefslogtreecommitdiff
path: root/test/cdec_hg_to_json
diff options
context:
space:
mode:
Diffstat (limited to 'test/cdec_hg_to_json')
-rw-r--r--test/cdec_hg_to_json/cdec.ini5
-rw-r--r--test/cdec_hg_to_json/grammar.gzbin0 -> 1399915 bytes
-rw-r--r--test/cdec_hg_to_json/hg.json.gzbin0 -> 318029 bytes
-rw-r--r--test/cdec_hg_to_json/hg.meta7
-rw-r--r--test/cdec_hg_to_json/in1
-rw-r--r--test/cdec_hg_to_json/toy.cdec.ini2
-rw-r--r--test/cdec_hg_to_json/toy.grammar12
-rw-r--r--test/cdec_hg_to_json/toy.in1
-rw-r--r--test/cdec_hg_to_json/toy.weights3
-rw-r--r--test/cdec_hg_to_json/weights17
10 files changed, 48 insertions, 0 deletions
diff --git a/test/cdec_hg_to_json/cdec.ini b/test/cdec_hg_to_json/cdec.ini
new file mode 100644
index 0000000..1ad25b5
--- /dev/null
+++ b/test/cdec_hg_to_json/cdec.ini
@@ -0,0 +1,5 @@
+formalism=scfg
+grammar=test/hg2json/grammar.gz
+add_pass_through_rules=true
+feature_function=WordPenalty
+intersection_strategy=full
diff --git a/test/cdec_hg_to_json/grammar.gz b/test/cdec_hg_to_json/grammar.gz
new file mode 100644
index 0000000..78dda98
--- /dev/null
+++ b/test/cdec_hg_to_json/grammar.gz
Binary files differ
diff --git a/test/cdec_hg_to_json/hg.json.gz b/test/cdec_hg_to_json/hg.json.gz
new file mode 100644
index 0000000..ed178c6
--- /dev/null
+++ b/test/cdec_hg_to_json/hg.json.gz
Binary files differ
diff --git a/test/cdec_hg_to_json/hg.meta b/test/cdec_hg_to_json/hg.meta
new file mode 100644
index 0000000..d33a54c
--- /dev/null
+++ b/test/cdec_hg_to_json/hg.meta
@@ -0,0 +1,7 @@
+input:
+ 'in dem verzweifelten versuch , an der macht festzuhalten , hat pervez musharraf den rahmen der pakistanischen verfassung verlassen und den notstand ausgerufen .'
+viterbi translation:
+ 'which labor market desperate transformed into attempting gathered by failed to show any the non - is making festzuhalten gathered by pervez musharraf meant to its borders with within than the non - have pakistan 's intelligence relied constitutional for security as a its borders with declared a state of emergency - range missiles .'
+# nodes = 220
+# edges = 16640
+viterbi score = 228.95
diff --git a/test/cdec_hg_to_json/in b/test/cdec_hg_to_json/in
new file mode 100644
index 0000000..7dc411d
--- /dev/null
+++ b/test/cdec_hg_to_json/in
@@ -0,0 +1 @@
+in dem verzweifelten versuch , an der macht festzuhalten , hat pervez musharraf den rahmen der pakistanischen verfassung verlassen und den notstand ausgerufen .
diff --git a/test/cdec_hg_to_json/toy.cdec.ini b/test/cdec_hg_to_json/toy.cdec.ini
new file mode 100644
index 0000000..d4a2896
--- /dev/null
+++ b/test/cdec_hg_to_json/toy.cdec.ini
@@ -0,0 +1,2 @@
+formalism=scfg
+grammar=test/hg2json/toy.grammar
diff --git a/test/cdec_hg_to_json/toy.grammar b/test/cdec_hg_to_json/toy.grammar
new file mode 100644
index 0000000..382c94f
--- /dev/null
+++ b/test/cdec_hg_to_json/toy.grammar
@@ -0,0 +1,12 @@
+[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] ||| [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
+[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/test/cdec_hg_to_json/toy.in b/test/cdec_hg_to_json/toy.in
new file mode 100644
index 0000000..e6df927
--- /dev/null
+++ b/test/cdec_hg_to_json/toy.in
@@ -0,0 +1 @@
+ich sah ein kleines haus
diff --git a/test/cdec_hg_to_json/toy.weights b/test/cdec_hg_to_json/toy.weights
new file mode 100644
index 0000000..70075b7
--- /dev/null
+++ b/test/cdec_hg_to_json/toy.weights
@@ -0,0 +1,3 @@
+logp 2
+use_house 0
+use_shell 1
diff --git a/test/cdec_hg_to_json/weights b/test/cdec_hg_to_json/weights
new file mode 100644
index 0000000..7f96f1d
--- /dev/null
+++ b/test/cdec_hg_to_json/weights
@@ -0,0 +1,17 @@
+PhraseModel_0 1.0
+PhraseModel_1 1.0
+PhraseModel_2 1.0
+PhraseModel_3 1.0
+PhraseModel_4 1.0
+PhraseModel_5 1.0
+PhraseModel_6 1.0
+PassThrough -1.0
+PassThrough_1 -1.0
+PassThrough_2 -1.0
+PassThrough_3 -1.0
+PassThrough_4 -1.0
+PassThrough_5 -1.0
+PassThrough_6 -1.0
+Glue 0.1
+LanguageModel 10.0
+LanguageModel_OOV -10