summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-10-11 06:02:26 -0400
committerKenneth Heafield <github@kheafield.com>2012-10-11 06:02:26 -0400
commit28403a7d3cbca2de743a7d654ffb9e1600ce7c5c (patch)
tree31f8e902a4250260ba8737c90f673b673e671586
parent5cae1b0d633e0507cf377e2664bba919ec48745a (diff)
Skip rest of decoder when using incremental
-rw-r--r--decoder/decoder.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc
index 83077a68..29eaa4f6 100644
--- a/decoder/decoder.cc
+++ b/decoder/decoder.cc
@@ -834,8 +834,11 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) {
if (conf.count("show_target_graph"))
HypergraphIO::WriteTarget(conf["show_target_graph"].as<string>(), sent_id, forest);
- if (conf.count("lazy_search"))
+ if (conf.count("lazy_search")) {
PassToLazy(conf["lazy_search"].as<string>().c_str(), CurrentWeightVector(), pop_limit, forest);
+ o->NotifyDecodingComplete(smeta);
+ return true;
+ }
for (int pass = 0; pass < rescoring_passes.size(); ++pass) {
const RescoringPass& rp = rescoring_passes[pass];