summaryrefslogtreecommitdiff
path: root/decoder/decoder.cc
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-09-13 04:28:30 -0700
committerKenneth Heafield <github@kheafield.com>2012-09-13 04:28:30 -0700
commit18c5b12399eb078dbb8c764a205caf9c610f9a2f (patch)
tree3d06b860605533c2bdb83f8fcdfcda2551d49f58 /decoder/decoder.cc
parent8d0baa1dfb5c18f5be45b4d12b3f925dc04afc48 (diff)
Allow lm file name, print weights
Diffstat (limited to 'decoder/decoder.cc')
-rw-r--r--decoder/decoder.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc
index 3a410cf2..525c6ba6 100644
--- a/decoder/decoder.cc
+++ b/decoder/decoder.cc
@@ -416,6 +416,7 @@ DecoderImpl::DecoderImpl(po::variables_map& conf, int argc, char** argv, istream
("show_conditional_prob", "Output the conditional log prob to STDOUT instead of a translation")
("show_cfg_search_space", "Show the search space as a CFG")
("show_target_graph", po::value<string>(), "Directory to write the target hypergraphs to")
+ ("lazy_search", po::value<string>(), "Run lazy search with this language model file")
("coarse_to_fine_beam_prune", po::value<double>(), "Prune paths from coarse parse forest before fine parse, keeping paths within exp(alpha>=0)")
("ctf_beam_widen", po::value<double>()->default_value(2.0), "Expand coarse pass beam by this factor if no fine parse is found")
("ctf_num_widenings", po::value<int>()->default_value(2), "Widen coarse beam this many times before backing off to full parse")
@@ -834,7 +835,7 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) {
HypergraphIO::WriteTarget(conf["show_target_graph"].as<string>(), sent_id, forest);
if (conf.count("lazy_search"))
- PassToLazy(forest, CurrentWeightVector());
+ PassToLazy(conf["lazy_search"].as<string>().c_str(), CurrentWeightVector(), forest);
for (int pass = 0; pass < rescoring_passes.size(); ++pass) {
const RescoringPass& rp = rescoring_passes[pass];