mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
fixed bug in permutation scores due to scientific notation
This commit is contained in:
parent
f4471692ba
commit
c78d571561
@ -225,12 +225,12 @@ void PermutationScorer::prepareStats(size_t sid, const string& text, ScoreStats&
|
||||
//SCOREROUT eg: 0.04546
|
||||
distanceValue*=SCORE_MULTFACT; //SCOREROUT eg: 4546 to transform float into integer
|
||||
ostringstream tempStream;
|
||||
tempStream.precision(SCORE_PRECISION);
|
||||
tempStream << distanceValue << " 1"; //use for final normalization over the amount of test sentences
|
||||
tempStream.precision(0); // decimal precision not needed as score was multiplied per SCORE_MULTFACT
|
||||
tempStream << std::fixed << distanceValue << " 1"; //use for final normalization over the amount of test sentences
|
||||
string str = tempStream.str();
|
||||
entry.set(str);
|
||||
|
||||
//cout << tempStream.str();
|
||||
//cout << distanceValue << "=" << distanceValue << " (str:" << tempStream.str() << ")" << endl;
|
||||
}
|
||||
|
||||
//Will just be final score
|
||||
|
Loading…
Reference in New Issue
Block a user