diff options
author | Chris Dyer <redpony@gmail.com> | 2014-04-01 21:24:11 -0400 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2014-04-01 21:24:11 -0400 |
commit | 22075d6875e913e3f076fa609bf018256a612bb5 (patch) | |
tree | 752e8830ead8649fdcb2f00cb234c78f91b3aa70 | |
parent | d75c78040cb49e69e4702a2c35e997315a57150b (diff) |
check for empty hg
-rw-r--r-- | decoder/tree2string_translator.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/tree2string_translator.cc b/decoder/tree2string_translator.cc index 6966ccf8..6f65658e 100644 --- a/decoder/tree2string_translator.cc +++ b/decoder/tree2string_translator.cc @@ -214,7 +214,7 @@ struct Tree2StringTranslatorImpl { // the following takes care of them vector<bool> prune(hg.edges_.size(), false); hg.PruneEdges(prune, true); - + if (hg.edges_.size() == 0) return false; //hg.PrintGraphviz(); minus_lm_forest->swap(hg); return true; |