Skip to content
Snippets Groups Projects
Commit e6597388 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi Committed by Android (Google) Code Review
Browse files

Merge "Fix: Personalized dicts suggest invalid words with v403."

parents 28115929 090c3819
No related branches found
No related tags found
No related merge requests found
...@@ -74,8 +74,9 @@ namespace latinime { ...@@ -74,8 +74,9 @@ namespace latinime {
} }
const WordAttributes wordAttributes = dictionaryStructurePolicy->getWordAttributesInContext( const WordAttributes wordAttributes = dictionaryStructurePolicy->getWordAttributesInContext(
dicNode->getPrevWordIds(), dicNode->getWordId(), multiBigramMap); dicNode->getPrevWordIds(), dicNode->getWordId(), multiBigramMap);
if (dicNode->hasMultipleWords() if (wordAttributes.getProbability() == NOT_A_PROBABILITY
&& (wordAttributes.isBlacklisted() || wordAttributes.isNotAWord())) { || (dicNode->hasMultipleWords()
&& (wordAttributes.isBlacklisted() || wordAttributes.isNotAWord()))) {
return static_cast<float>(MAX_VALUE_FOR_WEIGHTING); return static_cast<float>(MAX_VALUE_FOR_WEIGHTING);
} }
// TODO: This equation to calculate the improbability looks unreasonable. Investigate this. // TODO: This equation to calculate the improbability looks unreasonable. Investigate this.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment