summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdecoder/oracle_bleu.h1
-rw-r--r--vest/mr_vest_generate_mapper_input.cc4
2 files changed, 3 insertions, 2 deletions
diff --git a/decoder/oracle_bleu.h b/decoder/oracle_bleu.h
index c5ca2fcf..86426ef5 100755
--- a/decoder/oracle_bleu.h
+++ b/decoder/oracle_bleu.h
@@ -145,6 +145,7 @@ struct OracleBleu {
init_loss();
}
void init_loss() {
+ if (refs.empty()) return;
loss=ScoreTypeFromString(loss_name);
order=(loss==IBM_BLEU_3)?3:4;
std::ostringstream param;
diff --git a/vest/mr_vest_generate_mapper_input.cc b/vest/mr_vest_generate_mapper_input.cc
index 14342a43..932b3743 100644
--- a/vest/mr_vest_generate_mapper_input.cc
+++ b/vest/mr_vest_generate_mapper_input.cc
@@ -137,7 +137,6 @@ struct oracle_directions {
exit(0);
}
- UseConf(*conf);
return;
bad_cmdline:
cerr << dcmdline_options << endl;
@@ -147,12 +146,13 @@ struct oracle_directions {
int main(int argc, char *argv[]) {
po::variables_map conf;
InitCommandLine(argc,argv,&conf);
+ init_bleumodel();
+ UseConf(*conf);
Run();
return 0;
}
bool verbose() const { return oracle.verbose; }
void Run() {
- init_bleumodel();
// register_feature_functions();
AddPrimaryAndRandomDirections();
AddOracleDirections();