Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 090c3819 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi
Browse files

Fix: Personalized dicts suggest invalid words with v403.

Bug: 14425059
Change-Id: I45ae00069dd3b7c461dd9a1f3558b96af0a1c975
parent ade5ad1d
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -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.