aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/defines.h
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-03-03 10:22:10 +0900
committerJean Chalard <jchalard@google.com>2011-03-05 13:20:19 +0900
commit07a8406bc184a354ea47fb6352e48df39e35310e (patch)
tree7aa88b26858323b36087ec2c5ef96f7574b235f3 /native/src/defines.h
parent50a4cb403f57c0981df584256ae3a88cbd53a31e (diff)
downloadlatinime-07a8406bc184a354ea47fb6352e48df39e35310e.tar.gz
latinime-07a8406bc184a354ea47fb6352e48df39e35310e.tar.xz
latinime-07a8406bc184a354ea47fb6352e48df39e35310e.zip
Demote skipped characters matched words with respect to length.
Words that matched user input with skipped characters used to be demoted in BinaryDictionary by a constant factor and not at all in those dictionaries implemented in java code. To represent the fact that the impact of a skipped character gets larger as the word is shorter, this change will implement a demotion that gets larger as the typed word is shorter. The demotion rate is (n - 2) / (n - 1) where n is the length of the typed word for n >= 2. It implements it for both BinaryDictionary and java dictionaries. Bug: 3340731 Change-Id: I3a18be80a9708981d56a950dc25fe08f018b5b89
Diffstat (limited to 'native/src/defines.h')
-rw-r--r--native/src/defines.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/native/src/defines.h b/native/src/defines.h
index ddd65c9fa..0d1f037e1 100644
--- a/native/src/defines.h
+++ b/native/src/defines.h
@@ -135,7 +135,7 @@ static void prof_out(void) {
#define SUGGEST_WORDS_WITH_TRANSPOSED_CHARACTERS true
// The following "rate"s are used as a multiplier before dividing by 100, so they are in percent.
-#define WORDS_WITH_MISSING_CHARACTER_DEMOTION_RATE 75
+#define WORDS_WITH_MISSING_CHARACTER_DEMOTION_RATE 100
#define WORDS_WITH_MISSING_SPACE_CHARACTER_DEMOTION_RATE 80
#define WORDS_WITH_EXCESSIVE_CHARACTER_DEMOTION_RATE 75
#define WORDS_WITH_EXCESSIVE_CHARACTER_OUT_OF_PROXIMITY_DEMOTION_RATE 75