am ed72a768: Merge "Make getWordProperty return reconstructed bigram probability."
* commit 'ed72a768d69fad7744587001e0b82913e22dd714': Make getWordProperty return reconstructed bigram probability.main
commit
a1f84c32b4
|
@ -354,7 +354,8 @@ const WordProperty PatriciaTriePolicy::getWordProperty(const int *const codePoin
|
||||||
&word1Probability);
|
&word1Probability);
|
||||||
std::vector<int> word1(bigramWord1CodePoints,
|
std::vector<int> word1(bigramWord1CodePoints,
|
||||||
bigramWord1CodePoints + word1CodePointCount);
|
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 */));
|
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() ?
|
const int probability = bigramEntry.hasHistoricalInfo() ?
|
||||||
ForgettingCurveUtils::decodeProbability(
|
ForgettingCurveUtils::decodeProbability(
|
||||||
bigramEntry.getHistoricalInfo(), mHeaderPolicy) :
|
bigramEntry.getHistoricalInfo(), mHeaderPolicy) :
|
||||||
bigramEntry.getProbability();
|
getProbability(word1Probability, bigramEntry.getProbability());
|
||||||
bigrams.push_back(WordProperty::BigramProperty(&word1, probability,
|
bigrams.push_back(WordProperty::BigramProperty(&word1, probability,
|
||||||
historicalInfo->getTimeStamp(), historicalInfo->getLevel(),
|
historicalInfo->getTimeStamp(), historicalInfo->getLevel(),
|
||||||
historicalInfo->getCount()));
|
historicalInfo->getCount()));
|
||||||
|
|
Loading…
Reference in New Issue