Skip to content

Commit

Permalink
moses_chart: oops, don't output more distinct translations than reque…
Browse files Browse the repository at this point in the history
…sted
  • Loading branch information
pjwilliams committed Apr 21, 2014
1 parent b308bd5 commit ff8ac92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moses/ChartManager.cpp
Expand Up @@ -312,7 +312,7 @@ void ChartManager::CalcNBest(
// Copy derivations into nBestList, skipping ones with repeated translations.
std::set<Phrase> distinct;
for (ChartKBestExtractor::KBestVec::const_iterator p = bigList.begin();
p != bigList.end(); ++p) {
nBestList.size() < n && p != bigList.end(); ++p) {
boost::shared_ptr<ChartKBestExtractor::Derivation> derivation = *p;
Phrase translation = ChartKBestExtractor::GetOutputPhrase(*derivation);
if (distinct.insert(translation).second) {
Expand Down

0 comments on commit ff8ac92

Please sign in to comment.