diff options
author | 2011-04-20 18:16:18 +0900 | |
---|---|---|
committer | 2011-04-20 18:16:18 +0900 | |
commit | e75e4463cdd2b9ba672faa6b0b1a6e3083e61543 (patch) | |
tree | 199f30b9b0b640d5b800cb974dd30550e1984e41 /native/src/unigram_dictionary.cpp | |
parent | d8cf67623903adc66db8dffb88805e71ec4b3425 (diff) | |
parent | 5454ff5a66e681a034ceae6ffc9847ed9eb959d3 (diff) | |
download | latinime-e75e4463cdd2b9ba672faa6b0b1a6e3083e61543.tar.gz latinime-e75e4463cdd2b9ba672faa6b0b1a6e3083e61543.tar.xz latinime-e75e4463cdd2b9ba672faa6b0b1a6e3083e61543.zip |
Merge remote-tracking branch 'goog/master' into merge
Conflicts:
java/res/xml/method.xml
java/res/xml/prefs.xml
Change-Id: I466a43c56ec01ddac2f8ae4f15dd3a7f8c21175d
Diffstat (limited to 'native/src/unigram_dictionary.cpp')
-rw-r--r-- | native/src/unigram_dictionary.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/native/src/unigram_dictionary.cpp b/native/src/unigram_dictionary.cpp index 3832d473a..b9f4b961d 100644 --- a/native/src/unigram_dictionary.cpp +++ b/native/src/unigram_dictionary.cpp @@ -574,7 +574,7 @@ inline int UnigramDictionary::calculateFinalFreq(const int inputIndex, const int * (10 * mInputLength - WORDS_WITH_MISSING_CHARACTER_DEMOTION_START_POS_10X) / (10 * mInputLength - WORDS_WITH_MISSING_CHARACTER_DEMOTION_START_POS_10X + 10); - if (DEBUG_DICT) { + if (DEBUG_DICT_FULL) { LOGI("Demotion rate for missing character is %d.", demotionRate); } multiplyRate(demotionRate, &finalFreq); @@ -603,7 +603,7 @@ inline int UnigramDictionary::calculateFinalFreq(const int inputIndex, const int if (sameLength && transposedPos < 0 && skipPos < 0 && excessivePos < 0) { finalFreq = capped255MultForFullMatchAccentsOrCapitalizationDifference(finalFreq); } - } else if (sameLength && transposedPos < 0 && skipPos < 0 && excessivePos < 0 && depth > 1) { + } else if (sameLength && transposedPos < 0 && skipPos < 0 && excessivePos < 0 && depth > 0) { // A word with proximity corrections if (DEBUG_DICT) { LOGI("Found one proximity correction."); @@ -611,6 +611,9 @@ inline int UnigramDictionary::calculateFinalFreq(const int inputIndex, const int finalFreq *= 2; multiplyRate(WORDS_WITH_PROXIMITY_CHARACTER_DEMOTION_RATE, &finalFreq); } + if (DEBUG_DICT) { + LOGI("calc: %d, %d", depth, sameLength); + } if (sameLength) finalFreq *= FULL_WORD_MULTIPLIER; return finalFreq; } |