From 86f36003fd4397143bd37938dda029e5707634af Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Sun, 20 Jul 2014 00:27:27 +0900 Subject: Use CharSequence for spell checker to keep spans preserved This is a ground work to take per word locale information into consideration in the spell checker. This CL is supposed to change no user visible behavior. With this CL, the spell checker session is able to read span information if necessary. BUG: 16029304 Change-Id: Icb1e1ecdf40fe0445e14565b685b1b878b746210 --- .../src/com/android/inputmethod/latin/utils/LanguageModelParam.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java') diff --git a/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java b/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java index 9ec19efa8..fbce3f2fd 100644 --- a/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java +++ b/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java @@ -43,7 +43,7 @@ public final class LanguageModelParam { private static final int BIGRAM_PROBABILITY_FOR_VALID_WORD = 10; private static final int BIGRAM_PROBABILITY_FOR_OOV_WORD = Dictionary.NOT_A_PROBABILITY; - public final String mTargetWord; + public final CharSequence mTargetWord; public final int[] mWord0; public final int[] mWord1; // TODO: this needs to be a list of shortcuts @@ -57,13 +57,13 @@ public final class LanguageModelParam { public final int mTimestamp; // Constructor for unigram. TODO: support shortcuts - public LanguageModelParam(final String word, final int unigramProbability, + public LanguageModelParam(final CharSequence word, final int unigramProbability, final int timestamp) { this(null /* word0 */, word, unigramProbability, Dictionary.NOT_A_PROBABILITY, timestamp); } // Constructor for unigram and bigram. - public LanguageModelParam(final String word0, final String word1, + public LanguageModelParam(final CharSequence word0, final CharSequence word1, final int unigramProbability, final int bigramProbability, final int timestamp) { mTargetWord = word1; -- cgit v1.2.3-83-g751a