summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-11-14 04:11:03 -0800
committerKenneth Heafield <github@kheafield.com>2012-11-14 04:11:03 -0800
commit41ec6ee5146c92cdb1c279267a5058fe42f8a644 (patch)
tree6c8da2c21da19793e79521671a6d5b042ad965cf
parent672948561d79de225a54d14db8ef911119995fdb (diff)
Short-circuit search when generating hypergraphs.
-rw-r--r--decoder/decoder.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc
index b5f4b9b6..31e6dc46 100644
--- a/decoder/decoder.cc
+++ b/decoder/decoder.cc
@@ -832,11 +832,13 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) {
abort();
}
- if (conf.count("show_target_graph"))
+ if (conf.count("show_target_graph")) {
HypergraphIO::WriteTarget(conf["show_target_graph"].as<string>(), sent_id, forest);
-
+ }
if (conf.count("incremental_search")) {
incremental->Search(pop_limit, forest);
+ }
+ if (conf.count("show_target_graph") || conf.count("incremental_search")) {
o->NotifyDecodingComplete(smeta);
return true;
}