am 005f3768: am 25b4a14e: am d03e065b: Don\'t consider non-words for split word suggestion

* commit '005f3768400ce1d7bb29ef69151183084aceeb2c':
  Don't consider non-words for split word suggestion
main
Jean Chalard 2012-10-17 17:06:11 -07:00 committed by Android Git Automerger
commit 5f9e008d60
1 changed files with 2 additions and 1 deletions

View File

@ -792,7 +792,8 @@ int UnigramDictionary::getMostFrequentWordLikeInner(const uint16_t *const inWord
// into inputIndex if there is a match.
const bool isAlike = testCharGroupForContinuedLikeness(flags, root, pos, inWord,
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);
onTerminalWordLike(frequency, newWord, inputIndex, outWord, &maxFreq);
}