aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/defines.h
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-08-15 22:30:33 +0900
committersatok <satok@google.com>2011-08-17 01:04:35 +0900
commitbcac0e9e23853891a5a45fd19b6f8917ffc705f7 (patch)
tree731437a1053dbefa5e47122aaad339fb0a8a11b7 /native/src/defines.h
parent77838275ca443f7a2ff899b3842c681338ad8e25 (diff)
downloadlatinime-bcac0e9e23853891a5a45fd19b6f8917ffc705f7.tar.gz
latinime-bcac0e9e23853891a5a45fd19b6f8917ffc705f7.tar.xz
latinime-bcac0e9e23853891a5a45fd19b6f8917ffc705f7.zip
Improve fat finger correction.
Change-Id: I37ed0dc6956f7e6fab5dcfd0483ab5691cd819d4
Diffstat (limited to 'native/src/defines.h')
-rw-r--r--native/src/defines.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/native/src/defines.h b/native/src/defines.h
index c1d08e695..a29fb7e5b 100644
--- a/native/src/defines.h
+++ b/native/src/defines.h
@@ -177,6 +177,8 @@ static void dumpWord(const unsigned short* word, const int length) {
#define FULL_MATCHED_WORDS_PROMOTION_RATE 120
#define WORDS_WITH_PROXIMITY_CHARACTER_DEMOTION_RATE 90
#define WORDS_WITH_MATCH_SKIP_PROMOTION_RATE 105
+#define WORDS_WITH_JUST_ONE_CORRECTION_PROMOTION_RATE 160
+#define CORRECTION_COUNT_RATE_DEMOTION_RATE_BASE 42
// This should be greater than or equal to MAX_WORD_LENGTH defined in BinaryDictionary.java
// This is only used for the size of array. Not to be used in c functions.
@@ -194,5 +196,6 @@ static void dumpWord(const unsigned short* word, const int length) {
#define MIN_USER_TYPED_LENGTH_FOR_EXCESSIVE_CHARACTER_SUGGESTION 3
#define min(a,b) ((a)<(b)?(a):(b))
+#define max(a,b) ((a)>(b)?(a):(b))
#endif // LATINIME_DEFINES_H