Merge "Make getWordProperty return reconstructed bigram probability."
commit
ed72a768d6
|
@ -354,7 +354,8 @@ const WordProperty PatriciaTriePolicy::getWordProperty(const int *const codePoin
|
|||
&word1Probability);
|
||||
std::vector<int> word1(bigramWord1CodePoints,
|
||||
bigramWord1CodePoints + word1CodePointCount);
|
||||
bigrams.push_back(WordProperty::BigramProperty(&word1, bigramsIt.getProbability(),
|
||||
const int probability = getProbability(word1Probability, bigramsIt.getProbability());
|
||||
bigrams.push_back(WordProperty::BigramProperty(&word1, probability,
|
||||
NOT_A_TIMESTAMP /* timestamp */, 0 /* level */, 0 /* count */));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -388,7 +388,7 @@ const WordProperty Ver4PatriciaTriePolicy::getWordProperty(const int *const code
|
|||
const int probability = bigramEntry.hasHistoricalInfo() ?
|
||||
ForgettingCurveUtils::decodeProbability(
|
||||
bigramEntry.getHistoricalInfo(), mHeaderPolicy) :
|
||||
bigramEntry.getProbability();
|
||||
getProbability(word1Probability, bigramEntry.getProbability());
|
||||
bigrams.push_back(WordProperty::BigramProperty(&word1, probability,
|
||||
historicalInfo->getTimeStamp(), historicalInfo->getLevel(),
|
||||
historicalInfo->getCount()));
|
||||
|
|
Loading…
Reference in New Issue