diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/phrase.interpolated/filter-stderr.pl | 22 | ||||
-rwxr-xr-x | tests/phrase.interpolated/filter-stdout.pl | 7 | ||||
-rw-r--r-- | tests/phrase.interpolated/moses.ini | 56 | ||||
-rw-r--r-- | tests/phrase.interpolated/to-translate.txt | 1 | ||||
-rw-r--r-- | tests/phrase.interpolated/truth/results.txt | 5 |
5 files changed, 91 insertions, 0 deletions
diff --git a/tests/phrase.interpolated/filter-stderr.pl b/tests/phrase.interpolated/filter-stderr.pl new file mode 100755 index 0000000..2f6e176 --- /dev/null +++ b/tests/phrase.interpolated/filter-stderr.pl @@ -0,0 +1,22 @@ +#!/usr/bin/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.interpolated/filter-stdout.pl b/tests/phrase.interpolated/filter-stdout.pl new file mode 100755 index 0000000..476ddf6 --- /dev/null +++ b/tests/phrase.interpolated/filter-stdout.pl @@ -0,0 +1,7 @@ +#!/usr/bin/perl +$x=0; +while (<>) { + chomp; + $x++; + print "TRANSLATION_$x=$_\n"; +} diff --git a/tests/phrase.interpolated/moses.ini b/tests/phrase.interpolated/moses.ini new file mode 100644 index 0000000..d9ebd45 --- /dev/null +++ b/tests/phrase.interpolated/moses.ini @@ -0,0 +1,56 @@ +# Moses configuration file +# automatic exodus from pharaoh.ini Wed Jul 12 18:24:14 EDT 2006 + +########################### +### PHARAOH CONFIG FILE ### +########################### + +# phrase table f, n, p(n|f) +[ttable-file] +13 0 0 5 naive ${MODEL_PATH}/ptable-interpolated/phrase-table.1 ${MODEL_PATH}/ptable-interpolated/phrase-table.2 0.4,0.6;0.2,0.8;0.1,0.9;0.8,0.2 + +# language model +[lmodel-file] +8 0 3 ${LM_PATH}/europarl.en.srilm.gz + +# limit on how many phrase translations e for each phrase f are loaded +[ttable-limit] +#ttable element load limit 0 = all elements loaded +20 + +# distortion (reordering) weight +[weight-d] +0.2 + +# language model weight +[weight-l] +0.2 + +# translation model weight (phrase translation, lexical weighting) +[weight-t] +0.2 +0.2 +0.2 +0.2 +0.2 + +# word penalty +[weight-w] +-0.1 + +[distortion-limit] +4 + +[beam-threshold] +0.03 + +[input-factors] +0 + +[mapping] +T 0 + + +[verbose] +2 + diff --git a/tests/phrase.interpolated/to-translate.txt b/tests/phrase.interpolated/to-translate.txt new file mode 100644 index 0000000..1b4b9f3 --- /dev/null +++ b/tests/phrase.interpolated/to-translate.txt @@ -0,0 +1 @@ +a b c d e diff --git a/tests/phrase.interpolated/truth/results.txt b/tests/phrase.interpolated/truth/results.txt new file mode 100644 index 0000000..a14fe87 --- /dev/null +++ b/tests/phrase.interpolated/truth/results.txt @@ -0,0 +1,5 @@ +TRANSLATION_1=the and a an +LMLOAD_TIME ~ 3.240 +PTLOAD_TIME ~ 3.240 +SCORE_1 = -11.370 +TOTAL_WALLTIME ~ 3 |