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
commitdf5b25f73c12ef03482bd902ee0155a56789e6b9 (patch)
treecfc57a6bac5d41cd82c429a2674e3aa959acfdec
parentfd5f83ba7c24d041e8378d6bbfb4325f20eb0dd7 (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;
}