am d03e065b: Don\'t consider non-words for split word suggestion
* commit 'd03e065b861bd1cdb90bc70f18b7d7a3815b7a4d': Don't consider non-words for split word suggestionmain
commit
25b4a14e5f
|
@ -798,7 +798,8 @@ int UnigramDictionary::getMostFrequentWordLikeInner(const uint16_t *const inWord
|
||||||
// into inputIndex if there is a match.
|
// into inputIndex if there is a match.
|
||||||
const bool isAlike = testCharGroupForContinuedLikeness(flags, root, pos, inWord,
|
const bool isAlike = testCharGroupForContinuedLikeness(flags, root, pos, inWord,
|
||||||
inputIndex, inputSize, newWord, &inputIndex, &pos);
|
inputIndex, inputSize, newWord, &inputIndex, &pos);
|
||||||
if (isAlike && (BinaryFormat::FLAG_IS_TERMINAL & flags) && (inputIndex == inputSize)) {
|
if (isAlike && (!(BinaryFormat::FLAG_IS_NOT_A_WORD & flags))
|
||||||
|
&& (BinaryFormat::FLAG_IS_TERMINAL & flags) && (inputIndex == inputSize)) {
|
||||||
const int frequency = BinaryFormat::readFrequencyWithoutMovingPointer(root, pos);
|
const int frequency = BinaryFormat::readFrequencyWithoutMovingPointer(root, pos);
|
||||||
onTerminalWordLike(frequency, newWord, inputIndex, outWord, &maxFreq);
|
onTerminalWordLike(frequency, newWord, inputIndex, outWord, &maxFreq);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue