aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Dictionary.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-09-12 22:26:09 +0900
committerJean Chalard <jchalard@google.com>2014-09-19 13:44:42 +0900
commit6da9b21191dc7d6049d96945366ec7e605e716e6 (patch)
treeac8dcb925df7ead27b87faace0320f867cd0d6dd /java/src/com/android/inputmethod/latin/Dictionary.java
parent63e483658fb993338db1259d44de8de848aae14b (diff)
downloadlatinime-6da9b21191dc7d6049d96945366ec7e605e716e6.tar.gz
latinime-6da9b21191dc7d6049d96945366ec7e605e716e6.tar.xz
latinime-6da9b21191dc7d6049d96945366ec7e605e716e6.zip
[ML8] Add a language weight
...and rename an improperly named normalization value Bug: 11230254 Change-Id: I0f5633148a9f66dbfd7d28540b8a8985131c4549
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Dictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Dictionary.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/Dictionary.java b/java/src/com/android/inputmethod/latin/Dictionary.java
index cad9ee7d8..b58a52b41 100644
--- a/java/src/com/android/inputmethod/latin/Dictionary.java
+++ b/java/src/com/android/inputmethod/latin/Dictionary.java
@@ -31,7 +31,7 @@ import java.util.HashSet;
*/
public abstract class Dictionary {
public static final int NOT_A_PROBABILITY = -1;
- public static final float NOT_A_LANGUAGE_WEIGHT = -1.0f;
+ public static final float NOT_A_WEIGHT_OF_LANG_MODEL_VS_SPATIAL_MODEL = -1.0f;
// The following types do not actually come from real dictionary instances, so we create
// corresponding instances.
@@ -88,15 +88,18 @@ public abstract class Dictionary {
* @param proximityInfo the object for key proximity. May be ignored by some implementations.
* @param settingsValuesForSuggestion the settings values used for the suggestion.
* @param sessionId the session id.
- * @param inOutLanguageWeight the language weight used for generating suggestions.
- * inOutLanguageWeight is a float array that has only one element. This can be updated when the
- * different language weight is used.
+ * @param weightForLocale the weight given to this locale, to multiply the output scores for
+ * multilingual input.
+ * @param inOutWeightOfLangModelVsSpatialModel the weight of the language model as a ratio of
+ * the spatial model, used for generating suggestions. inOutWeightOfLangModelVsSpatialModel is
+ * a float array that has only one element. This can be updated when a different value is used.
* @return the list of suggestions (possibly null if none)
*/
abstract public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
final SettingsValuesForSuggestion settingsValuesForSuggestion,
- final int sessionId, final float[] inOutLanguageWeight);
+ final int sessionId, final float weightForLocale,
+ final float[] inOutWeightOfLangModelVsSpatialModel);
/**
* Checks if the given word has to be treated as a valid word. Please note that some
@@ -190,7 +193,8 @@ public abstract class Dictionary {
public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
final SettingsValuesForSuggestion settingsValuesForSuggestion,
- final int sessionId, final float[] inOutLanguageWeight) {
+ final int sessionId, final float weightForLocale,
+ final float[] inOutWeightOfLangModelVsSpatialModel) {
return null;
}