diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-09-18 06:45:19 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-09-18 06:45:19 +0400 |
commit | 7873dbb77a78baea9d0ccd568a9626472bddb587 (patch) | |
tree | 32fbffdd02c586e647e02edf89958ba031740f89 /moses/ChartHypothesisCollection.cpp | |
parent | f88908f972e638e1303c6fc98903c34f8330ed80 (diff) |
check there are hypos in stack vector before create translation options. constrained decoding works for syntax model
Diffstat (limited to 'moses/ChartHypothesisCollection.cpp')
-rw-r--r-- | moses/ChartHypothesisCollection.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/moses/ChartHypothesisCollection.cpp b/moses/ChartHypothesisCollection.cpp index 753d9caed..8cccf3083 100644 --- a/moses/ChartHypothesisCollection.cpp +++ b/moses/ChartHypothesisCollection.cpp @@ -60,15 +60,13 @@ ChartHypothesisCollection::~ChartHypothesisCollection() */ bool ChartHypothesisCollection::AddHypothesis(ChartHypothesis *hypo, ChartManager &manager) { - /* - cerr << *hypo << endl; if (hypo->GetTotalScore() == - std::numeric_limits<float>::infinity()) { manager.GetSentenceStats().AddDiscarded(); VERBOSE(3,"discarded, -inf score" << std::endl); ChartHypothesis::Delete(hypo); return false; } - */ + if (hypo->GetTotalScore() < m_bestScore + m_beamWidth) { // really bad score. don't bother adding hypo into collection manager.GetSentenceStats().AddDiscarded(); |