diff options
author | Hieu Hoang <s0565741@odin.inf.ed.ac.uk> | 2014-04-23 20:11:25 +0400 |
---|---|---|
committer | Hieu Hoang <s0565741@odin.inf.ed.ac.uk> | 2014-04-23 20:11:25 +0400 |
commit | d7380d6d9e0c5f88eb0ee4973f49e4c4e3900b9f (patch) | |
tree | a236f1d520f761357296f8f8552ffa978750d3ea /moses/ChartCell.cpp | |
parent | 2c14b506b450bcdcbb903158137a51185808211f (diff) |
don't add label to m_targetLabelSet if no hypotheses. Assert error in parsing
Diffstat (limited to 'moses/ChartCell.cpp')
-rw-r--r-- | moses/ChartCell.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/moses/ChartCell.cpp b/moses/ChartCell.cpp index 6603139f6..125efd204 100644 --- a/moses/ChartCell.cpp +++ b/moses/ChartCell.cpp @@ -114,8 +114,11 @@ void ChartCell::SortHypotheses() MapType::iterator iter; for (iter = m_hypoColl.begin(); iter != m_hypoColl.end(); ++iter) { ChartHypothesisCollection &coll = iter->second; - coll.SortHypotheses(); - m_targetLabelSet.AddConstituent(iter->first, &coll.GetSortedHypotheses()); + + if (coll.GetSize()) { + coll.SortHypotheses(); + m_targetLabelSet.AddConstituent(iter->first, &coll.GetSortedHypotheses()); + } } } |