Loading native/jni/src/defines.h +0 −1 Original line number Diff line number Diff line Loading @@ -289,7 +289,6 @@ static inline void prof_out(void) { #define CALIBRATE_SCORE_BY_TOUCH_COORDINATES true #define SUGGEST_MULTIPLE_WORDS true #define USE_SUGGEST_INTERFACE_FOR_TYPING true #define SUGGEST_INTERFACE_OUTPUT_SCALE 1000000.0f // The following "rate"s are used as a multiplier before dividing by 100, so they are in percent. Loading native/jni/src/obsolete/correction.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -918,11 +918,15 @@ inline static bool isUpperCase(unsigned short c) { // In dictionary.cpp, getSuggestion() method, // When USE_SUGGEST_INTERFACE_FOR_TYPING is true: // // // TODO: Revise the following logic thoroughly by referring to the logic // // marked as "Otherwise" below. // SUGGEST_INTERFACE_OUTPUT_SCALE was multiplied to the original suggestion scores to convert // them to integers. // score = (int)((original score) * SUGGEST_INTERFACE_OUTPUT_SCALE) // Undo the scaling here to recover the original score. // normalizedScore = ((float)score) / SUGGEST_INTERFACE_OUTPUT_SCALE // // Otherwise: suggestion scores are computed using the below formula. // original score // := powf(mTypedLetterMultiplier (this is defined 2), Loading Loading @@ -965,9 +969,11 @@ inline static bool isUpperCase(unsigned short c) { // so, 0 <= distance / afterLength <= 1 const float weight = 1.0f - static_cast<float>(distance) / static_cast<float>(afterLength); if (USE_SUGGEST_INTERFACE_FOR_TYPING) { // TODO: Revise the following logic thoroughly by referring to... if (true /* USE_SUGGEST_INTERFACE_FOR_TYPING */) { return (static_cast<float>(score) / SUGGEST_INTERFACE_OUTPUT_SCALE) * weight; } // ...this logic. const float maxScore = score >= S_INT_MAX ? static_cast<float>(S_INT_MAX) : static_cast<float>(MAX_INITIAL_SCORE) * powf(static_cast<float>(TYPED_LETTER_MULTIPLIER), Loading Loading
native/jni/src/defines.h +0 −1 Original line number Diff line number Diff line Loading @@ -289,7 +289,6 @@ static inline void prof_out(void) { #define CALIBRATE_SCORE_BY_TOUCH_COORDINATES true #define SUGGEST_MULTIPLE_WORDS true #define USE_SUGGEST_INTERFACE_FOR_TYPING true #define SUGGEST_INTERFACE_OUTPUT_SCALE 1000000.0f // The following "rate"s are used as a multiplier before dividing by 100, so they are in percent. Loading
native/jni/src/obsolete/correction.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -918,11 +918,15 @@ inline static bool isUpperCase(unsigned short c) { // In dictionary.cpp, getSuggestion() method, // When USE_SUGGEST_INTERFACE_FOR_TYPING is true: // // // TODO: Revise the following logic thoroughly by referring to the logic // // marked as "Otherwise" below. // SUGGEST_INTERFACE_OUTPUT_SCALE was multiplied to the original suggestion scores to convert // them to integers. // score = (int)((original score) * SUGGEST_INTERFACE_OUTPUT_SCALE) // Undo the scaling here to recover the original score. // normalizedScore = ((float)score) / SUGGEST_INTERFACE_OUTPUT_SCALE // // Otherwise: suggestion scores are computed using the below formula. // original score // := powf(mTypedLetterMultiplier (this is defined 2), Loading Loading @@ -965,9 +969,11 @@ inline static bool isUpperCase(unsigned short c) { // so, 0 <= distance / afterLength <= 1 const float weight = 1.0f - static_cast<float>(distance) / static_cast<float>(afterLength); if (USE_SUGGEST_INTERFACE_FOR_TYPING) { // TODO: Revise the following logic thoroughly by referring to... if (true /* USE_SUGGEST_INTERFACE_FOR_TYPING */) { return (static_cast<float>(score) / SUGGEST_INTERFACE_OUTPUT_SCALE) * weight; } // ...this logic. const float maxScore = score >= S_INT_MAX ? static_cast<float>(S_INT_MAX) : static_cast<float>(MAX_INITIAL_SCORE) * powf(static_cast<float>(TYPED_LETTER_MULTIPLIER), Loading