From 3756592b47f61c78a9461e041176e99990b320ab Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Wed, 26 Feb 2014 15:51:46 +0100 Subject: hg2json --- test/hg2json/cdec.ini | 5 +++++ test/hg2json/grammar.gz | Bin 0 -> 1399915 bytes test/hg2json/hg.json.gz | Bin 0 -> 318029 bytes test/hg2json/hg.meta | 7 +++++++ test/hg2json/in | 1 + test/hg2json/toy.cdec.ini | 2 ++ test/hg2json/toy.grammar | 12 ++++++++++++ test/hg2json/toy.in | 1 + test/hg2json/toy.weights | 3 +++ test/hg2json/weights | 17 +++++++++++++++++ 10 files changed, 48 insertions(+) create mode 100644 test/hg2json/cdec.ini create mode 100644 test/hg2json/grammar.gz create mode 100644 test/hg2json/hg.json.gz create mode 100644 test/hg2json/hg.meta create mode 100644 test/hg2json/in create mode 100644 test/hg2json/toy.cdec.ini create mode 100644 test/hg2json/toy.grammar create mode 100644 test/hg2json/toy.in create mode 100644 test/hg2json/toy.weights create mode 100644 test/hg2json/weights (limited to 'test/hg2json') diff --git a/test/hg2json/cdec.ini b/test/hg2json/cdec.ini new file mode 100644 index 0000000..1ad25b5 --- /dev/null +++ b/test/hg2json/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/hg2json/grammar.gz b/test/hg2json/grammar.gz new file mode 100644 index 0000000..78dda98 Binary files /dev/null and b/test/hg2json/grammar.gz differ diff --git a/test/hg2json/hg.json.gz b/test/hg2json/hg.json.gz new file mode 100644 index 0000000..ed178c6 Binary files /dev/null and b/test/hg2json/hg.json.gz differ diff --git a/test/hg2json/hg.meta b/test/hg2json/hg.meta new file mode 100644 index 0000000..d33a54c --- /dev/null +++ b/test/hg2json/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/hg2json/in b/test/hg2json/in new file mode 100644 index 0000000..7dc411d --- /dev/null +++ b/test/hg2json/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/hg2json/toy.cdec.ini b/test/hg2json/toy.cdec.ini new file mode 100644 index 0000000..d4a2896 --- /dev/null +++ b/test/hg2json/toy.cdec.ini @@ -0,0 +1,2 @@ +formalism=scfg +grammar=test/hg2json/toy.grammar diff --git a/test/hg2json/toy.grammar b/test/hg2json/toy.grammar new file mode 100644 index 0000000..382c94f --- /dev/null +++ b/test/hg2json/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/hg2json/toy.in b/test/hg2json/toy.in new file mode 100644 index 0000000..e6df927 --- /dev/null +++ b/test/hg2json/toy.in @@ -0,0 +1 @@ +ich sah ein kleines haus diff --git a/test/hg2json/toy.weights b/test/hg2json/toy.weights new file mode 100644 index 0000000..70075b7 --- /dev/null +++ b/test/hg2json/toy.weights @@ -0,0 +1,3 @@ +logp 2 +use_house 0 +use_shell 1 diff --git a/test/hg2json/weights b/test/hg2json/weights new file mode 100644 index 0000000..7f96f1d --- /dev/null +++ b/test/hg2json/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 -- cgit v1.2.3