am ed72a768: Merge "Make getWordProperty return reconstructed bigram probability."

* commit 'ed72a768d69fad7744587001e0b82913e22dd714':
  Make getWordProperty return reconstructed bigram probability.
main
Keisuke Kuroyanagi 2014-03-11 02:39:49 -07:00 committed by Android Git Automerger
commit a1f84c32b4
2 changed files with 3 additions and 2 deletions

View File

@ -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 */));
}
}

View File

@ -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()));