mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-25 04:43:03 +03:00
integer overflows in Good-Turing discounting
This commit is contained in:
parent
6ce3060dd8
commit
633e7be8f0
@ -687,7 +687,8 @@ void outputPhrasePair(const ExtractionPhrasePair &phrasePair,
|
||||
if (goodTuringFlag || kneserNeyFlag) {
|
||||
totalDistinct++;
|
||||
int countInt = count + 0.99999;
|
||||
if (countInt <= COC_MAX)
|
||||
if ((countInt <= COC_MAX) &&
|
||||
(countInt > 0))
|
||||
countOfCounts[ countInt ]++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user