Loading native/jni/src/char_utils.h +6 −0 Original line number Diff line number Diff line Loading @@ -67,5 +67,11 @@ inline static unsigned short toLowerCase(const unsigned short c) { inline static unsigned short toBaseLowerCase(const unsigned short c) { return toLowerCase(toBaseChar(c)); } inline static bool isSkippableChar(const uint16_t character) { // TODO: Do not hardcode here return character == '\'' || character == '-'; } } // namespace latinime #endif // LATINIME_CHAR_UTILS_H native/jni/src/defines.h +3 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,9 @@ static inline void prof_out(void) { #define MIN_USER_TYPED_LENGTH_FOR_MULTIPLE_WORD_SUGGESTION 3 #define MIN_USER_TYPED_LENGTH_FOR_EXCESSIVE_CHARACTER_SUGGESTION 3 // TODO: Remove #define MAX_POINTER_COUNT_FOR_G 2 // Size, in bytes, of the bloom filter index for bigrams // 128 gives us 1024 buckets. The probability of false positive is (1 - e ** (-kn/m))**k, // where k is the number of hash functions, n the number of bigrams, and m the number of Loading native/jni/src/geometry_utils.h +0 −4 Original line number Diff line number Diff line Loading @@ -19,15 +19,11 @@ #include <cmath> #define MAX_PATHS 2 #define DEBUG_DECODER false #define M_PI_F 3.14159265f #define ROUND_FLOAT_10000(f) ((f) < 1000.0f && (f) > 0.001f) \ ? (floorf((f) * 10000.0f) / 10000.0f) : (f) #define SQUARE_FLOAT(x) ((x) * (x)) namespace latinime { Loading native/jni/src/proximity_info.h +0 −5 Original line number Diff line number Diff line Loading @@ -27,11 +27,6 @@ namespace latinime { class Correction; inline bool isSkippableChar(const uint16_t character) { // TODO: Do not hardcode here return character == '\'' || character == '-'; } class ProximityInfo { public: ProximityInfo(JNIEnv *env, const jstring localeJStr, const int maxProximityCharsSize, Loading Loading
native/jni/src/char_utils.h +6 −0 Original line number Diff line number Diff line Loading @@ -67,5 +67,11 @@ inline static unsigned short toLowerCase(const unsigned short c) { inline static unsigned short toBaseLowerCase(const unsigned short c) { return toLowerCase(toBaseChar(c)); } inline static bool isSkippableChar(const uint16_t character) { // TODO: Do not hardcode here return character == '\'' || character == '-'; } } // namespace latinime #endif // LATINIME_CHAR_UTILS_H
native/jni/src/defines.h +3 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,9 @@ static inline void prof_out(void) { #define MIN_USER_TYPED_LENGTH_FOR_MULTIPLE_WORD_SUGGESTION 3 #define MIN_USER_TYPED_LENGTH_FOR_EXCESSIVE_CHARACTER_SUGGESTION 3 // TODO: Remove #define MAX_POINTER_COUNT_FOR_G 2 // Size, in bytes, of the bloom filter index for bigrams // 128 gives us 1024 buckets. The probability of false positive is (1 - e ** (-kn/m))**k, // where k is the number of hash functions, n the number of bigrams, and m the number of Loading
native/jni/src/geometry_utils.h +0 −4 Original line number Diff line number Diff line Loading @@ -19,15 +19,11 @@ #include <cmath> #define MAX_PATHS 2 #define DEBUG_DECODER false #define M_PI_F 3.14159265f #define ROUND_FLOAT_10000(f) ((f) < 1000.0f && (f) > 0.001f) \ ? (floorf((f) * 10000.0f) / 10000.0f) : (f) #define SQUARE_FLOAT(x) ((x) * (x)) namespace latinime { Loading
native/jni/src/proximity_info.h +0 −5 Original line number Diff line number Diff line Loading @@ -27,11 +27,6 @@ namespace latinime { class Correction; inline bool isSkippableChar(const uint16_t character) { // TODO: Do not hardcode here return character == '\'' || character == '-'; } class ProximityInfo { public: ProximityInfo(JNIEnv *env, const jstring localeJStr, const int maxProximityCharsSize, Loading