From 1cfa8735f4cd7264e70cc6918bbd58c86a015ee4 Mon Sep 17 00:00:00 2001 From: graehl Date: Fri, 16 Jul 2010 01:56:55 +0000 Subject: oracle is_null git-svn-id: https://ws10smt.googlecode.com/svn/trunk@279 ec762483-ff6d-05da-a07a-a48fb63a330f --- vest/mr_vest_generate_mapper_input.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vest') 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(&oracle_batch)->default_value(10),"to produce each oracle direction, sum the 'gradient' over this many sentences") ("max_similarity,m",po::value(&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(&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; } -- cgit v1.2.3