Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <s0565741@odin.inf.ed.ac.uk>2014-04-23 20:11:25 +0400
committerHieu Hoang <s0565741@odin.inf.ed.ac.uk>2014-04-23 20:11:25 +0400
commitd7380d6d9e0c5f88eb0ee4973f49e4c4e3900b9f (patch)
treea236f1d520f761357296f8f8552ffa978750d3ea /moses/ChartCell.cpp
parent2c14b506b450bcdcbb903158137a51185808211f (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.cpp7
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());
+ }
}
}