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