Search bigrams for the lower case version of the word (A46)
...if there aren't any for the exact case version.
Bug: 6752830
Change-Id: I2737148b01ba04a64febe009ceb2ef53c265d224
diff --git a/native/jni/src/unigram_dictionary.cpp b/native/jni/src/unigram_dictionary.cpp
index 3417d2b..22f1657 100644
--- a/native/jni/src/unigram_dictionary.cpp
+++ b/native/jni/src/unigram_dictionary.cpp
@@ -817,7 +817,8 @@
int UnigramDictionary::getFrequency(const int32_t* const inWord, const int length) const {
const uint8_t* const root = DICT_ROOT;
- int pos = BinaryFormat::getTerminalPosition(root, inWord, length);
+ int pos = BinaryFormat::getTerminalPosition(root, inWord, length,
+ false /* forceLowerCaseSearch */);
if (NOT_VALID_WORD == pos) {
return NOT_A_PROBABILITY;
}