diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2012-06-25 22:53:31 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2012-06-25 22:53:31 +0400 |
commit | 09e1bb1107359a26d1a92ef9cdd2cacee9b0b35c (patch) | |
tree | a2eb61d89ea16b850cf280fc31bbf3e9361a0c02 /tests/phrase.ptable-filtering | |
parent | cd5b988812fbc68bdae6d0805d63b4780ef7a816 (diff) |
all the data starting from v12
Diffstat (limited to 'tests/phrase.ptable-filtering')
-rwxr-xr-x | tests/phrase.ptable-filtering/filter-stderr.pl | 29 | ||||
-rwxr-xr-x | tests/phrase.ptable-filtering/filter-stdout.pl | 2 | ||||
-rw-r--r-- | tests/phrase.ptable-filtering/moses.ini | 52 | ||||
-rw-r--r-- | tests/phrase.ptable-filtering/to-translate.txt | 1 | ||||
-rw-r--r-- | tests/phrase.ptable-filtering/truth/results.txt | 22 |
5 files changed, 106 insertions, 0 deletions
diff --git a/tests/phrase.ptable-filtering/filter-stderr.pl b/tests/phrase.ptable-filtering/filter-stderr.pl new file mode 100755 index 0000000..c48a43f --- /dev/null +++ b/tests/phrase.ptable-filtering/filter-stderr.pl @@ -0,0 +1,29 @@ +#!/usr/bin/perl +$x=0; +while (<>) { + chomp; + + if (/^\[.* ; 2-2\]$/o) { + my @lines; + my $done = 0; + while (!$done) { + $x = <>; + if ($x =~ /^\s*$/o) { $done = 1; } else { + chomp $x; + $x =~ s/^\s+//o; + push @lines, $x; + } + } + my $c = 0; + foreach my $x (sort @lines) { + $c++; + print "TRANSLATION_OPTION_$c=$x\n"; + } + } + + next unless /^BEST TRANSLATION:/; + s/^BEST TRANSLATION:\s*//; + s/\s*\[111+.*$//; + $x++; + print "TRANSLATION_$x = $_\n"; +} diff --git a/tests/phrase.ptable-filtering/filter-stdout.pl b/tests/phrase.ptable-filtering/filter-stdout.pl new file mode 100755 index 0000000..a0421ef --- /dev/null +++ b/tests/phrase.ptable-filtering/filter-stdout.pl @@ -0,0 +1,2 @@ +#!/usr/bin/perl +$x=0; diff --git a/tests/phrase.ptable-filtering/moses.ini b/tests/phrase.ptable-filtering/moses.ini new file mode 100644 index 0000000..0838ad6 --- /dev/null +++ b/tests/phrase.ptable-filtering/moses.ini @@ -0,0 +1,52 @@ +# reg testing + +[ttable-file] +0 0 0 6 ${MODEL_PATH}/ptable-filtering/phrase-table.gz + +# language model +[lmodel-file] +0 0 3 ${LM_PATH}/europarl.en.srilm.gz +# limit on how many phrase translations e for each phrase f are loaded +# 0 = all elements loaded +[ttable-limit] +20 + +# distortion (reordering) weight +[weight-d] +0.01 + +# language model weight +[weight-l] +0.05 + +# translation model weight (phrase translation, lexical weighting) +[weight-t] +0.019268 +0.025749 +0.018038 +0.008511 +0.013410 +-0.624610 + +# word penalty +[weight-w] +-0.108496 + +[distortion-limit] +6 + +[stack] +100 + +[beam-threshold] +0.03 + +[input-factors] +0 + +[mapping] +T 0 + +[verbose] +3 + diff --git a/tests/phrase.ptable-filtering/to-translate.txt b/tests/phrase.ptable-filtering/to-translate.txt new file mode 100644 index 0000000..3ece67f --- /dev/null +++ b/tests/phrase.ptable-filtering/to-translate.txt @@ -0,0 +1 @@ +西 联 汇款 . diff --git a/tests/phrase.ptable-filtering/truth/results.txt b/tests/phrase.ptable-filtering/truth/results.txt new file mode 100644 index 0000000..8be8a2f --- /dev/null +++ b/tests/phrase.ptable-filtering/truth/results.txt @@ -0,0 +1,22 @@ +TRANSLATION_OPTION_1=form of :: pC=-0.571, c=-0.815 +TRANSLATION_OPTION_2=from :: pC=-0.604, c=-0.783 +TRANSLATION_OPTION_3=money :: pC=-0.380, c=-0.680 +TRANSLATION_OPTION_4=money transfers :: pC=-0.291, c=-0.797 +TRANSLATION_OPTION_5=of transfers :: pC=-0.323, c=-0.805 +TRANSLATION_OPTION_6=payments :: pC=-0.493, c=-0.816 +TRANSLATION_OPTION_7=providing :: pC=-0.536, c=-0.866 +TRANSLATION_OPTION_8=remittance :: pC=-0.059, c=-0.627 +TRANSLATION_OPTION_9=remittance of :: pC=-0.154, c=-0.726 +TRANSLATION_OPTION_10=remittances , :: pC=-0.202, c=-0.793 +TRANSLATION_OPTION_11=remittances , to :: pC=-0.161, c=-0.864 +TRANSLATION_OPTION_12=remittances :: pC=-0.043, c=-0.611 +TRANSLATION_OPTION_13=remittances from :: pC=-0.154, c=-0.753 +TRANSLATION_OPTION_14=represents :: pC=-0.551, c=-0.852 +TRANSLATION_OPTION_15=sending money :: pC=-0.333, c=-0.835 +TRANSLATION_OPTION_16=sent :: pC=-0.491, c=-0.833 +TRANSLATION_OPTION_17=transfer :: pC=-0.374, c=-0.717 +TRANSLATION_OPTION_18=transfer of money :: pC=-0.352, c=-0.801 +TRANSLATION_OPTION_19=transfers :: pC=-0.333, c=-0.692 +TRANSLATION_OPTION_20=transfers from :: pC=-0.359, c=-0.759 +TRANSLATION_1 = from the west . +TOTAL_WALLTIME ~ 14 |