diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index 32f9056..43a4422 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -97,6 +97,7 @@
     private final int[] mOutputTypes = new int[MAX_RESULTS];
     // Only one result is ever used
     private final int[] mOutputAutoCommitFirstWordConfidence = new int[1];
+    private final float[] mInputOutputLanguageWeight = new float[1];
 
     private final NativeSuggestOptions mNativeSuggestOptions = new NativeSuggestOptions();
 
@@ -167,7 +168,7 @@
             int[] pointerIds, int[] inputCodePoints, int inputSize, int[] suggestOptions,
             int[] prevWordCodePointArray, int[] outputSuggestionCount, int[] outputCodePoints,
             int[] outputScores, int[] outputIndices, int[] outputTypes,
-            int[] outputAutoCommitFirstWordConfidence);
+            int[] outputAutoCommitFirstWordConfidence, float[] inOutLanguageWeight);
     private static native void addUnigramWordNative(long dict, int[] word, int probability,
             int[] shortcutTarget, int shortcutProbability, boolean isNotAWord,
             boolean isBlacklisted, int timestamp);
@@ -262,13 +263,22 @@
         final int inputSize = isGesture ? ips.getPointerSize() : composerSize;
         mNativeSuggestOptions.setIsGesture(isGesture);
         mNativeSuggestOptions.setAdditionalFeaturesOptions(additionalFeaturesOptions);
+        if (inOutLanguageWeight != null) {
+            mInputOutputLanguageWeight[0] = inOutLanguageWeight[0];
+        } else {
+            mInputOutputLanguageWeight[0] = Dictionary.NOT_A_LANGUAGE_WEIGHT;
+        }
         // proximityInfo and/or prevWordForBigrams may not be null.
         getSuggestionsNative(mNativeDict, proximityInfo.getNativeProximityInfo(),
                 getTraverseSession(sessionId).getSession(), ips.getXCoordinates(),
                 ips.getYCoordinates(), ips.getTimes(), ips.getPointerIds(), mInputCodePoints,
                 inputSize, mNativeSuggestOptions.getOptions(),
                 prevWordCodePointArray, mOutputSuggestionCount, mOutputCodePoints, mOutputScores,
-                mSpaceIndices, mOutputTypes, mOutputAutoCommitFirstWordConfidence);
+                mSpaceIndices, mOutputTypes, mOutputAutoCommitFirstWordConfidence,
+                mInputOutputLanguageWeight);
+        if (inOutLanguageWeight != null) {
+            inOutLanguageWeight[0] = mInputOutputLanguageWeight[0];
+        }
         final int count = mOutputSuggestionCount[0];
         final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList();
         for (int j = 0; j < count; ++j) {
diff --git a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp
index 154ea98..a52833b 100644
--- a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp
+++ b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp
@@ -146,7 +146,8 @@
         jintArray inputCodePointsArray, jint inputSize, jintArray suggestOptions,
         jintArray prevWordCodePointsForBigrams, jintArray outSuggestionCount,
         jintArray outCodePointsArray, jintArray outScoresArray, jintArray outSpaceIndicesArray,
-        jintArray outTypesArray, jintArray outAutoCommitFirstWordConfidenceArray) {
+        jintArray outTypesArray, jintArray outAutoCommitFirstWordConfidenceArray,
+        jfloatArray inOutLanguageWeight) {
     Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict);
     // Assign 0 to outSuggestionCount here in case of returning earlier in this method.
     int count = 0;
@@ -489,7 +490,7 @@
     },
     {
         const_cast<char *>("getSuggestionsNative"),
-        const_cast<char *>("(JJJ[I[I[I[I[II[I[I[I[I[I[I[I[I)V"),
+        const_cast<char *>("(JJJ[I[I[I[I[II[I[I[I[I[I[I[I[I[F)V"),
         reinterpret_cast<void *>(latinime_BinaryDictionary_getSuggestions)
     },
     {
