diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2016-09-26 00:27:03 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2016-09-26 00:27:03 +0300 |
commit | 0afd9ec46fceba5ca588f83896cfecc4435149bb (patch) | |
tree | 9910295579f036e11ad0a0e8aa348c5ab9393847 | |
parent | 860e980eaf0121c72d3281e7b61c1caee4ed14ce (diff) |
add moses2.lexicalized-reordering-probing-compactlexro
6 files changed, 71 insertions, 0 deletions
diff --git a/models/lexicalized-reordering/ro.minlexr b/models/lexicalized-reordering/ro.minlexr Binary files differnew file mode 100644 index 0000000..779aad1 --- /dev/null +++ b/models/lexicalized-reordering/ro.minlexr diff --git a/tests/moses2.lexicalized-reordering-probing-compactlexro/filter-stderr.pl b/tests/moses2.lexicalized-reordering-probing-compactlexro/filter-stderr.pl new file mode 100755 index 0000000..fb31704 --- /dev/null +++ b/tests/moses2.lexicalized-reordering-probing-compactlexro/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/moses2.lexicalized-reordering-probing-compactlexro/filter-stdout.pl b/tests/moses2.lexicalized-reordering-probing-compactlexro/filter-stdout.pl new file mode 100755 index 0000000..0715c2d --- /dev/null +++ b/tests/moses2.lexicalized-reordering-probing-compactlexro/filter-stdout.pl @@ -0,0 +1,7 @@ +#!/usr/bin/env perl +$x=0; +while (<>) { + chomp; + $x++; + print "TRANSLATION_$x=$_\n"; +} diff --git a/tests/moses2.lexicalized-reordering-probing-compactlexro/moses.ini b/tests/moses2.lexicalized-reordering-probing-compactlexro/moses.ini new file mode 100644 index 0000000..e7f6f23 --- /dev/null +++ b/tests/moses2.lexicalized-reordering-probing-compactlexro/moses.ini @@ -0,0 +1,31 @@ +######################### +### MOSES CONFIG FILE ### +######################### + +# input factors +[input-factors] +0 + +# mapping steps +[mapping] +T 0 + +[distortion-limit] +6 + +[feature] +KENLM factor=0 order=5 num-features=1 lazyken=0 path=${MODEL_PATH}/lexicalized-reordering/europarl.lm +Distortion +LexicalReordering type=msd-bidirectional-fe input-factor=0 output-factor=0 num-features=6 path=${MODEL_PATH}/lexicalized-reordering/ro +WordPenalty +UnknownWordPenalty +ProbingPT name=pt0 input-factor=0 output-factor=0 path=${MODEL_PATH}/lexicalized-reordering/probing.v15 num-features=5 table-limit=20 + + +[weight] +WordPenalty0= -1 +KENLM0= 0.5 +Distortion0= 0.5 +LexicalReordering0= 0.3 0.3 0.3 0.3 0.3 0.3 +pt0= 0.2 0.2 0.2 0.2 0.2 + diff --git a/tests/moses2.lexicalized-reordering-probing-compactlexro/to-translate.txt b/tests/moses2.lexicalized-reordering-probing-compactlexro/to-translate.txt new file mode 100644 index 0000000..d336d82 --- /dev/null +++ b/tests/moses2.lexicalized-reordering-probing-compactlexro/to-translate.txt @@ -0,0 +1,5 @@ +monsieur le président , ce que nous devrons toutefois également faire à biarritz , c' est regarder un peu plus loin . +les élus que nous sommes avons au moins autant le devoir de l' encourager à progresser , en dépit de l' adversité , que de relayer les messages que nous recevons de l' opinion publique dans chacun de nos pays . +au regard des événements de ces derniers temps , la question du prix de l' essence me semble elle aussi particulièrement remarquable . +à l' heure actuelle , le conseil est en train d' examiner l' inclusion de tels mécanismes dans l' article 7 . +deuxièmement , dans la transparence pour les citoyens , qui connaissent à présent les droits dont ils disposent vis-à-vis de ceux qui appliquent et élaborent le droit européen , et pour ceux qui , justement , appliquent et élaborent ce droit européen . diff --git a/tests/moses2.lexicalized-reordering-probing-compactlexro/truth/results.txt b/tests/moses2.lexicalized-reordering-probing-compactlexro/truth/results.txt new file mode 100644 index 0000000..980fdf2 --- /dev/null +++ b/tests/moses2.lexicalized-reordering-probing-compactlexro/truth/results.txt @@ -0,0 +1,6 @@ +TRANSLATION_1=mr president , what we devrons but also to to biarritz , this is regarder a little more loin . +TRANSLATION_2=the élus that we are have the with difference the us of the encourager to progresser , in dépit of the adversité , that of relayer the messages that we recevons of the opinion all in each of our countries . +TRANSLATION_3=the prerequisites for the événements of these derniers time , the issue of the sufficiently of the essence to it also in remarquable . +TRANSLATION_4=in the , the council , it is train of examiner the inclusion of such mécanismes in article 7 . +TRANSLATION_5=secondly , in the transparency for the citizens , which are now the droits which they disposent vis-à-vis of those appliquent and élaborent the european law and , to those , precisely appliquent and élaborent this european law . +TOTAL_WALLTIME ~ 12 |