aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/dictionary.cpp
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-12-08 17:05:39 +0900
committersatok <satok@google.com>2010-12-09 14:26:27 +0900
commit662fe69ba2b8513a1a6640adde917db9a13e98af (patch)
treeb1d2ba69358e8eeaefc06cea9e37e75c38a30c2f /native/src/dictionary.cpp
parent59cd73b91675a7a791e186ceb0fe73790ff9595b (diff)
downloadlatinime-662fe69ba2b8513a1a6640adde917db9a13e98af.tar.gz
latinime-662fe69ba2b8513a1a6640adde917db9a13e98af.tar.xz
latinime-662fe69ba2b8513a1a6640adde917db9a13e98af.zip
Suggest words with missing space
Bug: 3193883 Change-Id: I8d25f3e1d4db10be733d85edfa4f55a094feef80
Diffstat (limited to 'native/src/dictionary.cpp')
-rw-r--r--native/src/dictionary.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/native/src/dictionary.cpp b/native/src/dictionary.cpp
index 6936dc928..8d3290945 100644
--- a/native/src/dictionary.cpp
+++ b/native/src/dictionary.cpp
@@ -27,20 +27,21 @@ Dictionary::Dictionary(void *dict, int typedLetterMultiplier, int fullWordMultip
int maxWordLength, int maxWords, int maxAlternatives)
: DICT((unsigned char*) dict),
// Checks whether it has the latest dictionary or the old dictionary
- IS_LATEST_DICT_VERSION((((unsigned char*) dict)[0] & 0xFF) >= DICTIONARY_VERSION_MIN)
-{
- if (MAX_WORD_LENGTH_INTERNAL < maxWordLength) {
- LOGI("Max word length (%d) is greater than %d", maxWordLength, MAX_WORD_LENGTH_INTERNAL);
+ IS_LATEST_DICT_VERSION((((unsigned char*) dict)[0] & 0xFF) >= DICTIONARY_VERSION_MIN) {
+ if (DEBUG_DICT) {
+ if (MAX_WORD_LENGTH_INTERNAL < maxWordLength) {
+ LOGI("Max word length (%d) is greater than %d",
+ maxWordLength, MAX_WORD_LENGTH_INTERNAL);
+ LOGI("IN NATIVE SUGGEST Version: %d \n", (DICT[0] & 0xFF));
+ }
}
- LOGI("IN NATIVE SUGGEST Version: %d \n", (DICT[0] & 0xFF));
mUnigramDictionary = new UnigramDictionary(DICT, typedLetterMultiplier, fullWordMultiplier,
maxWordLength, maxWords, maxAlternatives, IS_LATEST_DICT_VERSION);
mBigramDictionary = new BigramDictionary(DICT, maxWordLength, maxAlternatives,
IS_LATEST_DICT_VERSION, hasBigram(), this);
}
-Dictionary::~Dictionary()
-{
+Dictionary::~Dictionary() {
delete mUnigramDictionary;
delete mBigramDictionary;
}