mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 13:23:25 +03:00
allow no best hypo
This commit is contained in:
parent
24f1760c05
commit
692dc1c05f
@ -126,13 +126,13 @@ const ChartHypothesis *ChartCell::GetBestHypothesis() const
|
|||||||
MapType::const_iterator iter;
|
MapType::const_iterator iter;
|
||||||
for (iter = m_hypoColl.begin(); iter != m_hypoColl.end(); ++iter) {
|
for (iter = m_hypoColl.begin(); iter != m_hypoColl.end(); ++iter) {
|
||||||
const HypoList &sortedList = iter->second.GetSortedHypotheses();
|
const HypoList &sortedList = iter->second.GetSortedHypotheses();
|
||||||
CHECK(sortedList.size() > 0);
|
if (sortedList.size() > 0) {
|
||||||
|
const ChartHypothesis *hypo = sortedList[0];
|
||||||
const ChartHypothesis *hypo = sortedList[0];
|
if (hypo->GetTotalScore() > bestScore) {
|
||||||
if (hypo->GetTotalScore() > bestScore) {
|
bestScore = hypo->GetTotalScore();
|
||||||
bestScore = hypo->GetTotalScore();
|
ret = hypo;
|
||||||
ret = hypo;
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user