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

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Sennrich <rico.sennrich@gmx.ch>2014-09-24 17:42:59 +0400
committerRico Sennrich <rico.sennrich@gmx.ch>2014-09-24 17:47:58 +0400
commit84ad576750999d0383996d28a92360f42c7caf10 (patch)
tree4acf79873a40cb511374ec492c4b77b1366297e2
parent610090c2ed063ee10ea7c64e2541a3a99fa8f3d3 (diff)
explicitly set BLEU as default scorer (for return-best-dev)
(evaluator doesn't accept --scconfig without --sctype)
-rw-r--r--mert/evaluator.cpp3
-rwxr-xr-xscripts/training/mert-moses.pl2
2 files changed, 4 insertions, 1 deletions
diff --git a/mert/evaluator.cpp b/mert/evaluator.cpp
index 0209233c0..caae07684 100644
--- a/mert/evaluator.cpp
+++ b/mert/evaluator.cpp
@@ -241,6 +241,7 @@ void ParseCommandOptions(int argc, char** argv, ProgramOption* opt)
last_scorer_index++;
break;
case 'c':
+ if (last_scorer_index == -1) throw runtime_error("You need to specify a scorer before its config string.");
opt->scorer_configs[last_scorer_index] = string(optarg);
break;
case 'R':
@@ -260,9 +261,11 @@ void ParseCommandOptions(int argc, char** argv, ProgramOption* opt)
opt->has_seed = true;
break;
case 'f':
+ if (last_scorer_index == -1) throw runtime_error("You need to specify a scorer before its list of factors.");
opt->scorer_factors[last_scorer_index] = string(optarg);
break;
case 'l':
+ if (last_scorer_index == -1) throw runtime_error("You need to specify a scorer before its filter.");
opt->scorer_filter[last_scorer_index] = string(optarg);
break;
default:
diff --git a/scripts/training/mert-moses.pl b/scripts/training/mert-moses.pl
index 5988466fc..55e9106b7 100755
--- a/scripts/training/mert-moses.pl
+++ b/scripts/training/mert-moses.pl
@@ -402,7 +402,7 @@ if ($mertargs =~ /\-\-scconfig\s+(.+?)(\s|$)/) {
$mertargs =~ s/\-\-scconfig\s+(.+?)(\s|$)//;
}
-my $sctype = undef;
+my $sctype = "--sctype BLEU";
if ($mertargs =~ /(\-\-sctype\s+.+?)(\s|$)/) {
$sctype = $1;
$mertargs =~ s/(\-\-sctype\s+.+?)(\s|$)//;