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:
authorJun-ya Norimatsu <do-not-send-to-this-address@jnory.com>2015-10-31 14:56:06 +0300
committerJun-ya Norimatsu <do-not-send-to-this-address@jnory.com>2015-10-31 14:56:06 +0300
commit9a6f53a75f6da61acef62e784824b1c3a9a60396 (patch)
tree93fb566e8e6d43aa61d851cabf1aecf639b5430b /tests
parent37c3ae1e248e08d0d3cc30b9bb7c508873a5b45f (diff)
Add chart tests for DALM.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/chart.hierarchical-withDALM/filter-stderr.pl22
-rwxr-xr-xtests/chart.hierarchical-withDALM/filter-stdout.pl7
-rw-r--r--tests/chart.hierarchical-withDALM/moses.ini43
-rw-r--r--tests/chart.hierarchical-withDALM/to-translate.txt5
-rw-r--r--tests/chart.hierarchical-withDALM/truth/results.txt11
5 files changed, 88 insertions, 0 deletions
diff --git a/tests/chart.hierarchical-withDALM/filter-stderr.pl b/tests/chart.hierarchical-withDALM/filter-stderr.pl
new file mode 100755
index 0000000..4c279a1
--- /dev/null
+++ b/tests/chart.hierarchical-withDALM/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/chart.hierarchical-withDALM/filter-stdout.pl b/tests/chart.hierarchical-withDALM/filter-stdout.pl
new file mode 100755
index 0000000..0715c2d
--- /dev/null
+++ b/tests/chart.hierarchical-withDALM/filter-stdout.pl
@@ -0,0 +1,7 @@
+#!/usr/bin/env perl
+$x=0;
+while (<>) {
+ chomp;
+ $x++;
+ print "TRANSLATION_$x=$_\n";
+}
diff --git a/tests/chart.hierarchical-withDALM/moses.ini b/tests/chart.hierarchical-withDALM/moses.ini
new file mode 100644
index 0000000..f4b5a0f
--- /dev/null
+++ b/tests/chart.hierarchical-withDALM/moses.ini
@@ -0,0 +1,43 @@
+#########################
+### MOSES CONFIG FILE ###
+#########################
+
+# input factors
+[input-factors]
+0
+
+# mapping steps
+[mapping]
+0 T 0
+1 T 1
+
+[cube-pruning-pop-limit]
+1000
+
+[non-terminals]
+X
+
+[search-algorithm]
+3
+
+[inputtype]
+3
+
+[max-chart-span]
+20
+1000
+
+[feature]
+DALM factor=0 order=3 num-features=1 path=${MODEL_PATH}/hierarchical-withDALM/news.de.arpalm.dalm
+WordPenalty
+UnknownWordPenalty
+PhraseDictionaryMemory input-factor=0 output-factor=0 path=${MODEL_PATH}/hierarchical/phrase-table.0-0.1 num-features=5 table-limit=20
+PhraseDictionaryMemory input-factor=0 output-factor=0 path=${MODEL_PATH}/hierarchical/phrase-table.0-0.2 num-features=1 table-limit=20
+
+[weight]
+WordPenalty0= -0.148974
+DALM0= 0.118861
+PhraseDictionaryMemory0= 0.077197 0.014533 0.059406 0.001891 -0.098314
+PhraseDictionaryMemory1= 0.131945
+
+
diff --git a/tests/chart.hierarchical-withDALM/to-translate.txt b/tests/chart.hierarchical-withDALM/to-translate.txt
new file mode 100644
index 0000000..142ac43
--- /dev/null
+++ b/tests/chart.hierarchical-withDALM/to-translate.txt
@@ -0,0 +1,5 @@
+Prague Stock Market falls to minus by the end of the trading day
+after a sharp drop in the morning , the Prague Stock Market corrected its losses .
+transactions with stocks from the Czech Energy Enterprise ( ČEZ ) reached nearly half of the regular daily trading .
+the Prague Stock Market immediately continued its fall from Monday at the beginning of Tuesday 's trading , when it dropped by nearly six percent .
+this time the fall in stocks on Wall Street is responsible for the drop .
diff --git a/tests/chart.hierarchical-withDALM/truth/results.txt b/tests/chart.hierarchical-withDALM/truth/results.txt
new file mode 100644
index 0000000..f31e2c4
--- /dev/null
+++ b/tests/chart.hierarchical-withDALM/truth/results.txt
@@ -0,0 +1,11 @@
+TRANSLATION_1=Prag Stock Markt fällt , durch das Ende der Handel Tag
+TRANSLATION_2=nach einem steilen Rückgang der Morgen , dem Prager Stock Markt korrigiert ihre Verluste .
+TRANSLATION_3=Transaktionen mit Aktien von der tschechischen Energy Enterprise ( ČEZ ) erreicht beinahe die Hälfte der regelmäßigen täglich Handel .
+TRANSLATION_4=der Prager Stock Markt sofort ihren Sturz von Montag zu Beginn der Handel Tuesday , wenn es um beinahe sechs Prozent .
+TRANSLATION_5=dieses Mal den Rückgang der Aktien an der Wall Street verantwortlich ist für die fallen .
+SCORE_1 = -12.100
+SCORE_2 = -12.344
+SCORE_3 = -116.629
+SCORE_4 = -121.386
+SCORE_5 = -8.128
+TOTAL_WALLTIME ~ 55