aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/suggest/core/suggest.cpp
diff options
context:
space:
mode:
authorKeisuke Kuroynagi <ksk@google.com>2013-07-05 16:35:07 +0900
committerKeisuke Kuroynagi <ksk@google.com>2013-07-05 16:35:07 +0900
commit5b03213db13c670e37b15b8c813c91ebb232ead9 (patch)
tree7c3d61b318f760cd2bab4ead886dab16779ccf87 /native/jni/src/suggest/core/suggest.cpp
parent9aa1efdf46ce333425466e91061793301307ad01 (diff)
downloadlatinime-5b03213db13c670e37b15b8c813c91ebb232ead9.tar.gz
latinime-5b03213db13c670e37b15b8c813c91ebb232ead9.tar.xz
latinime-5b03213db13c670e37b15b8c813c91ebb232ead9.zip
Remove flags from dicNodeProperties.
Bug: 6669677 Change-Id: I6f4aef8c4e4376f078ed8375394823788aa35002
Diffstat (limited to 'native/jni/src/suggest/core/suggest.cpp')
-rw-r--r--native/jni/src/suggest/core/suggest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/native/jni/src/suggest/core/suggest.cpp b/native/jni/src/suggest/core/suggest.cpp
index 9a0f10cd5..6e9aff5ec 100644
--- a/native/jni/src/suggest/core/suggest.cpp
+++ b/native/jni/src/suggest/core/suggest.cpp
@@ -173,8 +173,6 @@ int Suggest::outputSuggestions(DicTraverseSession *traverseSession, int *frequen
terminalIndex, doubleLetterTerminalIndex, doubleLetterLevel);
const float compoundDistance = terminalDicNode->getCompoundDistance(languageWeight)
+ doubleLetterCost;
- const TerminalAttributes terminalAttributes(traverseSession->getBinaryDictionaryInfo(),
- terminalDicNode->getFlags(), terminalDicNode->getAttributesPos());
const bool isPossiblyOffensiveWord = terminalDicNode->getProbability() <= 0;
const bool isExactMatch = terminalDicNode->isExactMatch();
const bool isFirstCharUppercase = terminalDicNode->isFirstCharUppercase();
@@ -187,7 +185,7 @@ int Suggest::outputSuggestions(DicTraverseSession *traverseSession, int *frequen
| (isSafeExactMatch ? Dictionary::KIND_FLAG_EXACT_MATCH : 0);
// Entries that are blacklisted or do not represent a word should not be output.
- const bool isValidWord = !terminalAttributes.isBlacklistedOrNotAWord();
+ const bool isValidWord = !terminalDicNode->isBlacklistedOrNotAWord();
// Increase output score of top typing suggestion to ensure autocorrection.
// TODO: Better integration with java side autocorrection logic.
@@ -233,6 +231,8 @@ int Suggest::outputSuggestions(DicTraverseSession *traverseSession, int *frequen
}
if (!terminalDicNode->hasMultipleWords()) {
+ const TerminalAttributes terminalAttributes(traverseSession->getBinaryDictionaryInfo(),
+ terminalDicNode->getAttributesPos());
// Shortcut is not supported for multiple words suggestions.
// TODO: Check shortcuts during traversal for multiple words suggestions.
const bool sameAsTyped = TRAVERSAL->sameAsTyped(traverseSession, terminalDicNode);