From b6925f42fb7518fa1a201fe20596f8d4036a3b80 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Tue, 1 Apr 2014 21:24:11 -0400 Subject: check for empty hg --- decoder/tree2string_translator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'decoder/tree2string_translator.cc') 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 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; -- cgit v1.2.3