diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-16 01:56:55 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-16 01:56:55 +0000 |
commit | 92aff251f55caef2a6855771e935f6c639bfa9e1 (patch) | |
tree | c4b00f40556f49eca03d0c7e983defc7856b437c /vest | |
parent | 4e6718978a6f3a003ee0618cc5a6b97f9899bb0e (diff) |
oracle is_null
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@279 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'vest')
-rw-r--r-- | vest/mr_vest_generate_mapper_input.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vest/mr_vest_generate_mapper_input.cc b/vest/mr_vest_generate_mapper_input.cc index 677c0497..cbda78c5 100644 --- a/vest/mr_vest_generate_mapper_input.cc +++ b/vest/mr_vest_generate_mapper_input.cc @@ -94,6 +94,7 @@ struct oracle_directions { ("oracle_batch,b",po::value<unsigned>(&oracle_batch)->default_value(10),"to produce each oracle direction, sum the 'gradient' over this many sentences") ("max_similarity,m",po::value<double>(&max_similarity)->default_value(0),"remove directions that are too similar (Tanimoto coeff. less than (1-this)). 0 means don't filter, 1 means only 1 direction allowed?") ("fear_to_hope,f",po::bool_switch(&fear_to_hope),"for each of the oracle_directions, also include a direction from fear to hope (as well as origin to hope)") + ("decoder_translations",po::value<string>(&decoder_translations)->default_value(""),"one per line decoder 1best translations for computing document BLEU vs. sentences-seen-so-far BLEU") ("help,h", "Help"); po::options_description dcmdline_options; dcmdline_options.add(opts); @@ -194,7 +195,8 @@ struct oracle_directions { } - //TODO: is it worthwhile to get a complete document bleu first? would take a list of 1best translations one per line from the decoders, rather than loading all the forests (expensive) + std::string decoder_translations_file; // one per line + //TODO: is it worthwhile to get a complete document bleu first? would take a list of 1best translations one per line from the decoders, rather than loading all the forests (expensive). translations are in run.raw.N.gz - new arg Oracle const& ComputeOracle(unsigned i) { Oracle &o=oracles[i]; if (o.is_null()) { @@ -204,7 +206,7 @@ struct oracle_directions { Timer t("Loading forest from JSON "+forest_file(i)); HypergraphIO::ReadFromJSON(rf.stream(), &hg); } - o=oracle.ComputeOracles(MakeMetadata(hg,i),hg,origin,&cerr); + o=oracle.ComputeOracles(MakeMetadata(hg,i),&hg,origin,&cerr); } return o; } |