Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/moses-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2013-04-19 17:26:26 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-04-19 17:26:26 +0400
commit02d8c37e923d2996f2954e10052439ab4a711a84 (patch)
treeb2ff964e4d44ccaa9073f85923635560d9a6f0c6 /tests
parentab3c917f9d3196ba86220d1fcde949f4fceb338d (diff)
parent56049f66ff76f09dc5d2bab69114a0e8d17d9ea0 (diff)
Merge branch 'master' of github.com:moses-smt/moses-regression-tests into weight-new
Diffstat (limited to 'tests')
-rwxr-xr-xtests/phrase.interpolated/filter-stderr.pl22
-rwxr-xr-xtests/phrase.interpolated/filter-stdout.pl7
-rw-r--r--tests/phrase.interpolated/moses.ini56
-rw-r--r--tests/phrase.interpolated/to-translate.txt1
-rw-r--r--tests/phrase.interpolated/truth/results.txt5
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