diff options
author | 2011-01-27 14:20:22 +0900 | |
---|---|---|
committer | 2011-01-27 17:29:24 +0900 | |
commit | 8dc754a41129cad5371b7c39b6d5826758de550a (patch) | |
tree | 8aad7ceff315daead8a99ea44e75821b7181184b /native/src/defines.h | |
parent | 588d2a525c444c0126f88791fcb097deba5d4644 (diff) | |
download | latinime-8dc754a41129cad5371b7c39b6d5826758de550a.tar.gz latinime-8dc754a41129cad5371b7c39b6d5826758de550a.tar.xz latinime-8dc754a41129cad5371b7c39b6d5826758de550a.zip |
Promote full matches with differing accents.
Stop considering accented characters as different from their base
character for proximity scoring.
Also give a huge boost (basically overriding frequency) to a word
fully matched with only differing accents.
Bug: 2550587
Change-Id: I2da7a71229fb3868d9e4a53703ccf8caeb6fcf10
Diffstat (limited to 'native/src/defines.h')
-rw-r--r-- | native/src/defines.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/native/src/defines.h b/native/src/defines.h index 7374526ca..c1eaf0df2 100644 --- a/native/src/defines.h +++ b/native/src/defines.h @@ -129,6 +129,7 @@ static void prof_out(void) { #define SUGGEST_WORDS_WITH_EXCESSIVE_CHARACTER true #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_SPACE_CHARACTER_DEMOTION_RATE 80 #define WORDS_WITH_EXCESSIVE_CHARACTER_DEMOTION_RATE 75 @@ -136,6 +137,9 @@ static void prof_out(void) { #define WORDS_WITH_TRANSPOSED_CHARACTERS_DEMOTION_RATE 60 #define FULL_MATCHED_WORDS_PROMOTION_RATE 120 +// This is used as a bare multiplier (not subject to /100) +#define FULL_MATCH_ACCENTS_OR_CAPITALIZATION_DIFFER_MULTIPLIER 2 + // 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. #define MAX_WORD_LENGTH_INTERNAL 48 |