diff options
author | Rico Sennrich <rico.sennrich@gmx.ch> | 2015-11-26 21:46:45 +0300 |
---|---|---|
committer | Rico Sennrich <rico.sennrich@gmx.ch> | 2015-11-26 21:46:45 +0300 |
commit | bbea49d71c5b9835d9a777a82085e57a33a0bcf6 (patch) | |
tree | 638f694fe0444e608c6dae2206bf6c86887999d6 | |
parent | f69e79f5fc92d993354fa775de197b029d321175 (diff) |
multimodel with compact pt
-rw-r--r-- | models/multimodel/model1/phrase-table.minphr | bin | 0 -> 1180164 bytes | |||
-rw-r--r-- | models/multimodel/model2/phrase-table.minphr | bin | 0 -> 167293 bytes | |||
-rwxr-xr-x | tests/phrase.multimodel-compactptable/filter-stderr.pl | 22 | ||||
-rwxr-xr-x | tests/phrase.multimodel-compactptable/filter-stdout.pl | 7 | ||||
-rw-r--r-- | tests/phrase.multimodel-compactptable/info | 12 | ||||
-rw-r--r-- | tests/phrase.multimodel-compactptable/moses.ini | 33 | ||||
-rw-r--r-- | tests/phrase.multimodel-compactptable/to-translate.txt | 7 | ||||
-rw-r--r-- | tests/phrase.multimodel-compactptable/truth/results.txt | 13 |
8 files changed, 94 insertions, 0 deletions
diff --git a/models/multimodel/model1/phrase-table.minphr b/models/multimodel/model1/phrase-table.minphr Binary files differnew file mode 100644 index 0000000..ec86fbb --- /dev/null +++ b/models/multimodel/model1/phrase-table.minphr diff --git a/models/multimodel/model2/phrase-table.minphr b/models/multimodel/model2/phrase-table.minphr Binary files differnew file mode 100644 index 0000000..aa72322 --- /dev/null +++ b/models/multimodel/model2/phrase-table.minphr diff --git a/tests/phrase.multimodel-compactptable/filter-stderr.pl b/tests/phrase.multimodel-compactptable/filter-stderr.pl new file mode 100755 index 0000000..4c279a1 --- /dev/null +++ b/tests/phrase.multimodel-compactptable/filter-stderr.pl @@ -0,0 +1,22 @@ +#!/usr/bin/env perl + +BEGIN { use Cwd qw/ abs_path /; use File::Basename; $script_dir = dirname(abs_path($0)); push @INC, "$script_dir/../perllib"; } +use RegTestUtils; + +$x=0; +while (<>) { + chomp; + + if (/^Finished loading LanguageModels/) { + my $time = RegTestUtils::readTime($_); + print "LMLOAD_TIME ~ $time\n"; + } + if (/^Finished loading phrase tables/) { + my $time = RegTestUtils::readTime($_); + print "PTLOAD_TIME ~ $time\n"; + } + next unless /^BEST TRANSLATION:/; + my $pscore = RegTestUtils::readHypoScore($_); + $x++; + print "SCORE_$x = $pscore\n"; +} diff --git a/tests/phrase.multimodel-compactptable/filter-stdout.pl b/tests/phrase.multimodel-compactptable/filter-stdout.pl new file mode 100755 index 0000000..0715c2d --- /dev/null +++ b/tests/phrase.multimodel-compactptable/filter-stdout.pl @@ -0,0 +1,7 @@ +#!/usr/bin/env perl +$x=0; +while (<>) { + chomp; + $x++; + print "TRANSLATION_$x=$_\n"; +} diff --git a/tests/phrase.multimodel-compactptable/info b/tests/phrase.multimodel-compactptable/info new file mode 100644 index 0000000..d1f8792 --- /dev/null +++ b/tests/phrase.multimodel-compactptable/info @@ -0,0 +1,12 @@ +perplexity minimization (not automated yet); +optimized on ${MODEL_PATH}/multimodel/extract.sorted.gz + + +Cross-entropy: 2.16812 +Weight vector for feature 0: 0.863753 0.136247 +Cross-entropy: 1.56377 +Weight vector for feature 1: 0.936675 0.0633248 +Cross-entropy: 1.74298 +Weight vector for feature 2: 0.825263 0.174737 +Cross-entropy: 2.28705 +Weight vector for feature 3: 0.936133 0.0638672
\ No newline at end of file diff --git a/tests/phrase.multimodel-compactptable/moses.ini b/tests/phrase.multimodel-compactptable/moses.ini new file mode 100644 index 0000000..e497a13 --- /dev/null +++ b/tests/phrase.multimodel-compactptable/moses.ini @@ -0,0 +1,33 @@ +# moses.ini for regression test + +[distortion-limit] +4 + +[beam-threshold] +0.03 + +[input-factors] +0 + +[mapping] +T 2 + +[verbose] +2 + +[feature] +UnknownWordPenalty +WordPenalty +Distortion +PhrasePenalty +PhraseDictionaryCompact tuneable=false num-features=4 input-factor=0 output-factor=0 path=${MODEL_PATH}/multimodel/model1/phrase-table.minphr table-limit=20 +PhraseDictionaryCompact tuneable=false num-features=4 input-factor=0 output-factor=0 path=${MODEL_PATH}/multimodel/model2/phrase-table.minphr table-limit=20 +PhraseDictionaryMultiModel num-features=4 input-factor=0 output-factor=0 table-limit=20 mode=interpolate lambda=0.2,0.8 components=PhraseDictionaryCompact0,PhraseDictionaryCompact1 + +[weight] +WordPenalty0= -0.273416114951401 +Distortion0= 0.141806519223522 +PhrasePenalty0= -0.0426081987467227 +PhraseDictionaryMultiModel0= 0.00402447059454402 0.0685647475075862 0.294089113124688 0.0328320356515851 +PhraseDictionaryCompact0= 0 0 1 0 +PhraseDictionaryCompact1= 0 0 1 0 diff --git a/tests/phrase.multimodel-compactptable/to-translate.txt b/tests/phrase.multimodel-compactptable/to-translate.txt new file mode 100644 index 0000000..2e1f048 --- /dev/null +++ b/tests/phrase.multimodel-compactptable/to-translate.txt @@ -0,0 +1,7 @@ +ich erkläre die am donnerstag , dem 3. februar 2000 , unterbrochene sitzungsperiode des europäischen parlaments für wiederaufgenommen . +genehmigung des protokolls der vorangegangenen sitzung +das protokoll der sitzung von donnerstag , dem 3. februar ist verteilt worden . +gibt es einwände ? +aus ihrer reaktion schließe ich , daß viele mitglieder des hauses dieses protokoll nicht erhalten haben , und es versteht sich von selbst , daß sie einem protokoll , das sie nicht erhalten haben , nicht zustimmen können . +ich schlage deshalb vor , das protokoll morgen zu genehmigen , da es ihnen offensichtlich jetzt nicht vorliegt , wofür ich mich entschuldige . +die genehmigung des protokolls wird somit verschoben .
\ No newline at end of file diff --git a/tests/phrase.multimodel-compactptable/truth/results.txt b/tests/phrase.multimodel-compactptable/truth/results.txt new file mode 100644 index 0000000..ac28a55 --- /dev/null +++ b/tests/phrase.multimodel-compactptable/truth/results.txt @@ -0,0 +1,13 @@ +TRANSLATION_1=i erkläre which originated thursday , the 3. february 2000 , unterbrochene part-session of the european parliament adjourned on . +TRANSLATION_2=adoption of the minutes of the previous sitting +TRANSLATION_3=the minutes for ' s sitting tomorrow thursday , the 3. february 's been distributed been . +TRANSLATION_4=are there any comments ? +TRANSLATION_5=from their reaktion schließe i , that many members of the when this minutes 't obtain have , and it versteht of that kind to what is from even , that you a minutes , it you 't obtain have , 't zustimmen can . +TRANSLATION_6=i schlage so a , it minutes tomorrow to , there it the opportunity to propose to you however , now 't vorliegt , wofür i me entschuldige . +SCORE_1 = -301.799 +SCORE_2 = 0.036 +SCORE_3 = -102.562 +SCORE_4 = -0.102 +SCORE_5 = -410.920 +SCORE_6 = -403.121 +TOTAL_WALLTIME ~ 3 |