mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-11-10 19:44:59 +03:00
fix precision
git-svn-id: http://svn.statmt.org/repository/mira@3808 cc96ff50-19ce-11e0-b349-13d7f0bd23df
This commit is contained in:
parent
eeba3547cd
commit
0993dde7ce
@ -461,9 +461,9 @@ vector<float> BleuScoreFeature::CalculateBleuOfCorpus(const vector< vector< cons
|
||||
// = BP * 4th root(PRODUCT_1_4 p_n)
|
||||
for (size_t i = 0; i < BleuScoreState::bleu_order; i++) {
|
||||
if (sumOfNgramCounts[i]) {
|
||||
precision *= sumOfClippedNgramMatches[i] / sumOfNgramCounts[i];
|
||||
bleu.push_back(sumOfClippedNgramMatches[i] / sumOfNgramCounts[i]);
|
||||
}
|
||||
precision *= 1.0*sumOfClippedNgramMatches[i] / sumOfNgramCounts[i];
|
||||
bleu.push_back(1.0*sumOfClippedNgramMatches[i] / sumOfNgramCounts[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// take geometric mean
|
||||
|
Loading…
Reference in New Issue
Block a user