mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Add a method for handling for words not found in dictionary."
This commit is contained in:
commit
d523bacebc
@ -83,4 +83,7 @@ public final class StatsUtils {
|
|||||||
|
|
||||||
public static void onLoadSettings(SettingsValues settingsValues) {
|
public static void onLoadSettings(SettingsValues settingsValues) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void onInvalidWordIdentification(final String invalidWord) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ import com.android.inputmethod.latin.common.LocaleUtils;
|
|||||||
import com.android.inputmethod.latin.common.StringUtils;
|
import com.android.inputmethod.latin.common.StringUtils;
|
||||||
import com.android.inputmethod.latin.utils.BinaryDictionaryUtils;
|
import com.android.inputmethod.latin.utils.BinaryDictionaryUtils;
|
||||||
import com.android.inputmethod.latin.utils.ScriptUtils;
|
import com.android.inputmethod.latin.utils.ScriptUtils;
|
||||||
|
import com.android.inputmethod.latin.utils.StatsUtils;
|
||||||
import com.android.inputmethod.latin.utils.SuggestionResults;
|
import com.android.inputmethod.latin.utils.SuggestionResults;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -297,6 +298,15 @@ public abstract class AndroidWordLevelSpellCheckerSession extends Session {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Handle word not in dictionary.
|
||||||
|
// This is called only once per unique word, so entering multiple
|
||||||
|
// instances of the same word does not result in more than one call
|
||||||
|
// to this method.
|
||||||
|
// Also, upon changing the orientation of the device, this is called
|
||||||
|
// again for every unique invalid word in the text box.
|
||||||
|
if (!isInDict) {
|
||||||
|
StatsUtils.onInvalidWordIdentification(text);
|
||||||
|
}
|
||||||
|
|
||||||
final int flags =
|
final int flags =
|
||||||
(isInDict ? SuggestionsInfo.RESULT_ATTR_IN_THE_DICTIONARY
|
(isInDict ? SuggestionsInfo.RESULT_ATTR_IN_THE_DICTIONARY
|
||||||
|
Loading…
Reference in New Issue
Block a user