aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/res/values/strings.xml4
-rw-r--r--java/res/xml/method.xml2
-rw-r--r--native/jni/HostUnitTests.mk7
-rw-r--r--native/jni/src/defines.h8
-rw-r--r--native/jni/src/suggest/core/layout/proximity_info.cpp1
-rw-r--r--native/jni/src/suggest/core/layout/proximity_info.h5
-rw-r--r--native/jni/src/suggest/core/layout/proximity_info_params.cpp3
-rw-r--r--native/jni/src/suggest/core/layout/proximity_info_state.h8
-rw-r--r--native/jni/src/suggest/core/layout/proximity_info_state_utils.h4
9 files changed, 10 insertions, 32 deletions
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index e38bdd64e..494bfbd2b 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -358,9 +358,9 @@
(US) should be an abbreviation of United Statesn to fit in the CHAR LIMIT.
This should be identical to subtype_es_US aside from the trailing (%s). -->
<string name="subtype_with_layout_es_US">Spanish (US) (<xliff:g id="KEYBOARD_LAYOUT" example="QWERTY">%s</xliff:g>)</string>
- <!-- Description for Nepali (Traditional) keyboard subtype [CHAR LIMIT=25]
+ <!-- Description for "LANGUAGE_NAME" (Traditional) keyboard subtype [CHAR LIMIT=25]
(Traditional) can be an abbreviation to fit in the CHAR LIMIT. -->
- <string name="subtype_nepali_traditional"><xliff:g id="LANGUAGE_NAME" example="Nepali">%s</xliff:g> (Traditional)</string>
+ <string name="subtype_generic_traditional"><xliff:g id="LANGUAGE_NAME" example="Nepali">%s</xliff:g> (Traditional)</string>
<!-- TODO: Uncomment once we can handle IETF language tag with script name specified.
Description for Serbian Cyrillic keyboard subtype [CHAR LIMIT=25]
(Cyrillic) can be an abbreviation to fit in the CHAR LIMIT.
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index c64b3a4e0..cc824562a 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -485,7 +485,7 @@
android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
- android:label="@string/subtype_nepali_traditional"
+ android:label="@string/subtype_generic_traditional"
android:subtypeId="0x5fafea88"
android:imeSubtypeLocale="ne_NP"
android:imeSubtypeMode="keyboard"
diff --git a/native/jni/HostUnitTests.mk b/native/jni/HostUnitTests.mk
index 828edce61..967099a53 100644
--- a/native/jni/HostUnitTests.mk
+++ b/native/jni/HostUnitTests.mk
@@ -12,6 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11.
+LATINIME_HOST_OSNAME := $(shell uname -s)
+ifneq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this
+
LOCAL_PATH := $(call my-dir)
######################################
@@ -47,7 +51,10 @@ LOCAL_SRC_FILES := $(addprefix $(LATIN_IME_TEST_SRC_DIR)/, $(LATIN_IME_CORE_TEST
LOCAL_STATIC_LIBRARIES += liblatinime_host_static_for_unittests libgtest_host libgtest_main_host
include $(BUILD_HOST_NATIVE_TEST)
+endif # Darwin - TODO: Remove this
+
#################### Clean up the tmp vars
+LATINIME_HOST_OSNAME :=
LATIN_IME_SRC_DIR :=
LATIN_IME_TEST_SRC_DIR :=
include $(LOCAL_PATH)/CleanupNativeFileList.mk
diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h
index 6c54305a5..1719b1c60 100644
--- a/native/jni/src/defines.h
+++ b/native/jni/src/defines.h
@@ -118,14 +118,6 @@ static inline void dumpWordInfo(const int *word, const int length, const int ran
}
}
-static inline void dumpResult(const int *outWords, const int *frequencies) {
- AKLOGI("--- DUMP RESULT ---------");
- for (int i = 0; i < MAX_RESULTS; ++i) {
- dumpWordInfo(&outWords[i * MAX_WORD_LENGTH], MAX_WORD_LENGTH, i, frequencies[i]);
- }
- AKLOGI("-------------------------");
-}
-
static AK_FORCE_INLINE void dumpWord(const int *word, const int length) {
static char charBuf[50];
const int N = intArrayToCharArray(word, length, charBuf, NELEMS(charBuf));
diff --git a/native/jni/src/suggest/core/layout/proximity_info.cpp b/native/jni/src/suggest/core/layout/proximity_info.cpp
index 8b3ae4db8..c40a2bdca 100644
--- a/native/jni/src/suggest/core/layout/proximity_info.cpp
+++ b/native/jni/src/suggest/core/layout/proximity_info.cpp
@@ -58,7 +58,6 @@ ProximityInfo::ProximityInfo(JNIEnv *env, const jstring localeJStr,
const jfloatArray sweetSpotCenterYs, const jfloatArray sweetSpotRadii)
: GRID_WIDTH(gridWidth), GRID_HEIGHT(gridHeight), MOST_COMMON_KEY_WIDTH(mostCommonKeyWidth),
MOST_COMMON_KEY_WIDTH_SQUARE(mostCommonKeyWidth * mostCommonKeyWidth),
- MOST_COMMON_KEY_HEIGHT(mostCommonKeyHeight),
NORMALIZED_SQUARED_MOST_COMMON_KEY_HYPOTENUSE(1.0f +
GeometryUtils::SQUARE_FLOAT(static_cast<float>(mostCommonKeyHeight) /
static_cast<float>(mostCommonKeyWidth))),
diff --git a/native/jni/src/suggest/core/layout/proximity_info.h b/native/jni/src/suggest/core/layout/proximity_info.h
index a91b9d674..b72c29394 100644
--- a/native/jni/src/suggest/core/layout/proximity_info.h
+++ b/native/jni/src/suggest/core/layout/proximity_info.h
@@ -35,7 +35,6 @@ class ProximityInfo {
const jfloatArray sweetSpotCenterYs, const jfloatArray sweetSpotRadii);
~ProximityInfo();
bool hasSpaceProximity(const int x, const int y) const;
- int getNormalizedSquaredDistance(const int inputIndex, const int proximityIndex) const;
float getNormalizedSquaredDistanceFromCenterFloatG(
const int keyId, const int x, const int y, const bool isGeometric) const;
int getCodePointOf(const int keyIndex) const;
@@ -48,8 +47,6 @@ class ProximityInfo {
float getSweetSpotRadiiAt(int keyIndex) const { return mSweetSpotRadii[keyIndex]; }
float getSweetSpotCenterXAt(int keyIndex) const { return mSweetSpotCenterXs[keyIndex]; }
float getSweetSpotCenterYAt(int keyIndex) const { return mSweetSpotCenterYs[keyIndex]; }
- void calculateNearbyKeyCodes(
- const int x, const int y, const int primaryKey, int *inputCodes) const;
bool hasTouchPositionCorrectionData() const { return HAS_TOUCH_POSITION_CORRECTION_DATA; }
int getMostCommonKeyWidth() const { return MOST_COMMON_KEY_WIDTH; }
int getMostCommonKeyWidthSquare() const { return MOST_COMMON_KEY_WIDTH_SQUARE; }
@@ -97,7 +94,6 @@ class ProximityInfo {
const int GRID_HEIGHT;
const int MOST_COMMON_KEY_WIDTH;
const int MOST_COMMON_KEY_WIDTH_SQUARE;
- const int MOST_COMMON_KEY_HEIGHT;
const float NORMALIZED_SQUARED_MOST_COMMON_KEY_HYPOTENUSE;
const int CELL_WIDTH;
const int CELL_HEIGHT;
@@ -124,7 +120,6 @@ class ProximityInfo {
int mCenterXsG[MAX_KEY_COUNT_IN_A_KEYBOARD];
int mCenterYsG[MAX_KEY_COUNT_IN_A_KEYBOARD];
int mKeyKeyDistancesG[MAX_KEY_COUNT_IN_A_KEYBOARD][MAX_KEY_COUNT_IN_A_KEYBOARD];
- // TODO: move to correction.h
};
} // namespace latinime
#endif // LATINIME_PROXIMITY_INFO_H
diff --git a/native/jni/src/suggest/core/layout/proximity_info_params.cpp b/native/jni/src/suggest/core/layout/proximity_info_params.cpp
index 49df10301..597518a4c 100644
--- a/native/jni/src/suggest/core/layout/proximity_info_params.cpp
+++ b/native/jni/src/suggest/core/layout/proximity_info_params.cpp
@@ -98,7 +98,4 @@ const int ProximityInfoParams::LOOKUP_RADIUS_PERCENTILE = 50;
const int ProximityInfoParams::FIRST_POINT_TIME_OFFSET_MILLIS = 150;
const int ProximityInfoParams::STRONG_DOUBLE_LETTER_TIME_MILLIS = 600;
-// Used by ProximityInfoStateUtils::calculateNormalizedSquaredDistance()
-const int ProximityInfoParams::NORMALIZED_SQUARED_DISTANCE_SCALING_FACTOR = 1 << 10;
-
} // namespace latinime
diff --git a/native/jni/src/suggest/core/layout/proximity_info_state.h b/native/jni/src/suggest/core/layout/proximity_info_state.h
index 9abd69a66..e253d9550 100644
--- a/native/jni/src/suggest/core/layout/proximity_info_state.h
+++ b/native/jni/src/suggest/core/layout/proximity_info_state.h
@@ -108,10 +108,6 @@ class ProximityInfoState {
return false;
}
- inline const int *getPrimaryInputWord() const {
- return mPrimaryInputWord;
- }
-
inline bool touchPositionCorrectionEnabled() const {
return mTouchPositionCorrectionEnabled;
}
@@ -156,10 +152,6 @@ class ProximityInfoState {
ProximityType getProximityTypeG(const int index, const int codePoint) const;
- const std::vector<int> *getSearchKeyVector(const int index) const {
- return &mSampledSearchKeyVectors[index];
- }
-
float getSpeedRate(const int index) const {
return mSpeedRates[index];
}
diff --git a/native/jni/src/suggest/core/layout/proximity_info_state_utils.h b/native/jni/src/suggest/core/layout/proximity_info_state_utils.h
index 6de970033..ea0cd1149 100644
--- a/native/jni/src/suggest/core/layout/proximity_info_state_utils.h
+++ b/native/jni/src/suggest/core/layout/proximity_info_state_utils.h
@@ -90,10 +90,6 @@ class ProximityInfoStateUtils {
std::vector<float> *sampledNormalizedSquaredLengthCache);
static void initPrimaryInputWord(const int inputSize, const int *const inputProximities,
int *primaryInputWord);
- static void initNormalizedSquaredDistances(const ProximityInfo *const proximityInfo,
- const int inputSize, const int *inputXCoordinates, const int *inputYCoordinates,
- const int *const inputProximities, const std::vector<int> *const sampledInputXs,
- const std::vector<int> *const sampledInputYs, int *normalizedSquaredDistances);
static void dump(const bool isGeometric, const int inputSize,
const int *const inputXCoordinates, const int *const inputYCoordinates,
const int sampledInputSize, const std::vector<int> *const sampledInputXs,