Merge "Disable shortcut output for multi-word suggestions."

This commit is contained in:
Keisuke Kuroynagi 2013-07-03 11:34:15 +00:00 committed by Android (Google) Code Review
commit 0f276de04d

View file

@ -227,9 +227,14 @@ int Suggest::outputSuggestions(DicTraverseSession *traverseSession, int *frequen
++outputWordIndex;
}
const bool sameAsTyped = TRAVERSAL->sameAsTyped(traverseSession, terminalDicNode);
outputWordIndex = ShortcutUtils::outputShortcuts(&terminalAttributes, outputWordIndex,
finalScore, outputCodePoints, frequencies, outputTypes, sameAsTyped);
if (!terminalDicNode->hasMultipleWords()) {
// Shortcut is not supported for multiple words suggestions.
// TODO: Check shortcuts during traversal for multiple words suggestions.
const bool sameAsTyped = TRAVERSAL->sameAsTyped(traverseSession, terminalDicNode);
outputWordIndex = ShortcutUtils::outputShortcuts(&terminalAttributes, outputWordIndex,
finalScore, outputCodePoints, frequencies, outputTypes, sameAsTyped);
}
DicNode::managedDelete(terminalDicNode);
}