mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 05:14:36 +03:00
Bug fix in TranslationOptionList::SelectNBest(N).
This commit is contained in:
parent
8ed69fb56a
commit
6ef257a9e9
@ -42,7 +42,7 @@ namespace Moses
|
||||
TranslationOptionList::
|
||||
SelectNBest(size_t const N)
|
||||
{
|
||||
if (N == 0 || N <= m_coll.size()) return 0;
|
||||
if (N == 0 || N >= m_coll.size()) return 0;
|
||||
static TranslationOption::Better cmp;
|
||||
NTH_ELEMENT4(m_coll.begin(), m_coll.begin() + N, m_coll.end(), cmp);
|
||||
// delete the rest
|
||||
|
Loading…
Reference in New Issue
Block a user