aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/android/inputmethod/latin/ExpandableDictionary.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2009-08-10 17:22:39 -0700
committerJean-Baptiste Queru <jbq@google.com>2009-08-13 18:03:56 -0700
commitf51d16a4aa32e71c5b072f2c80db5b8bd7de81ff (patch)
tree6d4286c8b10b6bb5fa05b072e8d03f6e927563ca /src/com/android/inputmethod/latin/ExpandableDictionary.java
parent71351469e3af45a2ee89b017089f9e850e973a19 (diff)
downloadlatinime-f51d16a4aa32e71c5b072f2c80db5b8bd7de81ff.tar.gz
latinime-f51d16a4aa32e71c5b072f2c80db5b8bd7de81ff.tar.xz
latinime-f51d16a4aa32e71c5b072f2c80db5b8bd7de81ff.zip
Reduce weight of missing-char suggestions.
Diffstat (limited to 'src/com/android/inputmethod/latin/ExpandableDictionary.java')
-rw-r--r--src/com/android/inputmethod/latin/ExpandableDictionary.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/inputmethod/latin/ExpandableDictionary.java b/src/com/android/inputmethod/latin/ExpandableDictionary.java
index e9b68fe04..a136ee7f4 100644
--- a/src/com/android/inputmethod/latin/ExpandableDictionary.java
+++ b/src/com/android/inputmethod/latin/ExpandableDictionary.java
@@ -244,9 +244,9 @@ public class ExpandableDictionary extends Dictionary {
if (terminal) {
if (INCLUDE_TYPED_WORD_IF_VALID
|| !same(word, depth + 1, codes.getTypedWord())) {
- callback.addWord(word, 0, depth + 1,
- (int) (freq * snr * addedAttenuation
- * FULL_WORD_FREQ_MULTIPLIER));
+ int finalFreq = freq * snr * addedAttenuation;
+ if (skipPos < 0) finalFreq *= FULL_WORD_FREQ_MULTIPLIER;
+ callback.addWord(word, 0, depth + 1, finalFreq);
}
}
if (children != null) {