From 6a2f3c4d6872dec9940777a9e188bf6c50064c49 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Tue, 14 May 2013 17:35:58 +0100 Subject: port PhraseDictionaryMultiModelCounts to new format. Runs but doesn't pass regression test --- tests/phrase.multimodelcounts/filter-stderr.pl | 22 ------------- tests/phrase.multimodelcounts/filter-stdout.pl | 7 ---- tests/phrase.multimodelcounts/info | 12 ------- tests/phrase.multimodelcounts/moses.ini | 44 ------------------------- tests/phrase.multimodelcounts/to-translate.txt | 7 ---- tests/phrase.multimodelcounts/truth/results.txt | 16 --------- 6 files changed, 108 deletions(-) delete mode 100755 tests/phrase.multimodelcounts/filter-stderr.pl delete mode 100755 tests/phrase.multimodelcounts/filter-stdout.pl delete mode 100644 tests/phrase.multimodelcounts/info delete mode 100644 tests/phrase.multimodelcounts/moses.ini delete mode 100644 tests/phrase.multimodelcounts/to-translate.txt delete mode 100644 tests/phrase.multimodelcounts/truth/results.txt (limited to 'tests') diff --git a/tests/phrase.multimodelcounts/filter-stderr.pl b/tests/phrase.multimodelcounts/filter-stderr.pl deleted file mode 100755 index 2f6e176..0000000 --- a/tests/phrase.multimodelcounts/filter-stderr.pl +++ /dev/null @@ -1,22 +0,0 @@ -#!/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.multimodelcounts/filter-stdout.pl b/tests/phrase.multimodelcounts/filter-stdout.pl deleted file mode 100755 index 476ddf6..0000000 --- a/tests/phrase.multimodelcounts/filter-stdout.pl +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/perl -$x=0; -while (<>) { - chomp; - $x++; - print "TRANSLATION_$x=$_\n"; -} diff --git a/tests/phrase.multimodelcounts/info b/tests/phrase.multimodelcounts/info deleted file mode 100644 index 7980a69..0000000 --- a/tests/phrase.multimodelcounts/info +++ /dev/null @@ -1,12 +0,0 @@ -perplexity minimization (not automated yet); -optimized on ${MODEL_PATH}/multimodel/extract.sorted.gz - - -Cross-entropy: 2.15755 -Weight vector for feature 0: 1 1.43374 -Cross-entropy: 2.22417 -Weight vector for feature 1: 1 0.433226 -Cross-entropy: 1.82226 -Weight vector for feature 2: 1 4.7673 -Cross-entropy: 1.65899 -Weight vector for feature 3: 1 0.514971 diff --git a/tests/phrase.multimodelcounts/moses.ini b/tests/phrase.multimodelcounts/moses.ini deleted file mode 100644 index f2eb1f2..0000000 --- a/tests/phrase.multimodelcounts/moses.ini +++ /dev/null @@ -1,44 +0,0 @@ -# moses.ini for regression test - -[distortion-limit] -4 - -[beam-threshold] -0.03 - -[input-factors] -0 - -[mapping] -T 0 - -[use-persistent-cache] -0 - - -[verbose] -2 - -[feature] -UnknownWordPenalty -WordPenalty -Distortion -PhraseDictionaryMultiModelCounts num-features=5 input-factor=0 output-factor=0 table-limit=20 mode=instance_weighting lambda=1.0,1.0 components=PhraseDictionaryMemory0,PhraseDictionaryMemory1 target-table=PhraseDictionaryMemory2,PhraseDictionaryMemory3 lex-e2f=${MODEL_PATH}/multimodel/model1/lex.counts.e2f,${MODEL_PATH}/multimodel/model2/lex.counts.e2f lex-f2e=${MODEL_PATH}/multimodel/model1/lex.counts.f2e,${MODEL_PATH}/multimodel/model2/lex.counts.f2e -PhraseDictionaryMemory tuneable=true num-features=3 input-factor=0 output-factor=0 path=${MODEL_PATH}/multimodel/model1/count-table.gz -PhraseDictionaryMemory tuneable=true num-features=3 input-factor=0 output-factor=0 path=${MODEL_PATH}/multimodel/model2/count-table.gz - -PhraseDictionaryMemory tuneable=true num-features=1 input-factor=0 output-factor=0 path=${MODEL_PATH}/multimodel/model1/count-table-target.gz -PhraseDictionaryMemory tuneable=true num-features=1 input-factor=0 output-factor=0 path=${MODEL_PATH}/multimodel/model2/count-table-target.gz - -[weight] -WordPenalty0= -0.273416114951401 -Distortion0= 0.141806519223522 -PhraseDictionaryMultiModelCounts0= 0.00402447059454402 0.0685647475075862 0.294089113124688 0.0328320356515851 -0.0426081987467227 - -PhraseDictionaryMemory0= 0.00402447059454402 0.0685647475075862 0.294089113124688 -PhraseDictionaryMemory1= 0.00402447059454402 0.0685647475075862 0.294089113124688 -PhraseDictionaryMemory2= 0.00402447059454402 -PhraseDictionaryMemory3= 0.00402447059454402 - - - diff --git a/tests/phrase.multimodelcounts/to-translate.txt b/tests/phrase.multimodelcounts/to-translate.txt deleted file mode 100644 index 7693455..0000000 --- a/tests/phrase.multimodelcounts/to-translate.txt +++ /dev/null @@ -1,7 +0,0 @@ -i declare resumed the session of the european parliament adjourned on thursday 3 february 2000 . -approval of the minutes of the previous sitting -the minutes of the sitting on thursday 3 february have been distributed . -are there any comments ? -i can see from your reaction that many of the members of parliament have not received the minutes and clearly you cannot approve minutes which you have not seen . -i therefore propose to submit the minutes for your approval tomorrow morning , since obviously you do not have them and i must apologise for this . -i shall therefore postpone the approval of the minutes . \ No newline at end of file diff --git a/tests/phrase.multimodelcounts/truth/results.txt b/tests/phrase.multimodelcounts/truth/results.txt deleted file mode 100644 index 727fb24..0000000 --- a/tests/phrase.multimodelcounts/truth/results.txt +++ /dev/null @@ -1,16 +0,0 @@ -TRANSLATION_1=i declare resumed the session of the european parliament adjourned on thursday 3 february 2000 . -TRANSLATION_2=approval of the minutes of the previous sitting -TRANSLATION_3=the minutes of the sitting on thursday 3 february have been distributed . -TRANSLATION_4=are there any comments ? -TRANSLATION_5=i can see from your reaction that many of the members of parliament have not received the minutes and clearly you cannot approve minutes which you have not seen . -TRANSLATION_6=i therefore propose to submit the minutes for your approval tomorrow morning , since obviously you do not have them and i must apologise for this . -LMLOAD_TIME ~ 0.022 -PTLOAD_TIME ~ 0.025 -PTLOAD_TIME ~ 1.234 -SCORE_1 = -1196.237 -SCORE_2 = -797.813 -SCORE_3 = -997.015 -SCORE_4 = -398.716 -SCORE_5 = -2294.001 -SCORE_6 = -1994.913 -TOTAL_WALLTIME ~ 2 -- cgit v1.2.3