diff options
author | 2013-09-29 05:14:22 +0000 | |
---|---|---|
committer | 2013-09-29 05:14:22 +0000 | |
commit | 1cf4789ba6abb5855392d542bb075c12d2d9b6a0 (patch) | |
tree | 3520dda99f30c857a3a085cbbfaaba753f73c7a6 /java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java | |
parent | b0c5ddb9c7a27f71ab63ec3362a476ec052f5bd0 (diff) | |
parent | 5ed30a7660048ef4bf78077e77554c97786eae2b (diff) | |
download | latinime-1cf4789ba6abb5855392d542bb075c12d2d9b6a0.tar.gz latinime-1cf4789ba6abb5855392d542bb075c12d2d9b6a0.tar.xz latinime-1cf4789ba6abb5855392d542bb075c12d2d9b6a0.zip |
Merge "Set header attributes for ExpandableBinaryDictionary."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java index 66517a800..1ca91a0fd 100644 --- a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java +++ b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java @@ -94,6 +94,8 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE); attributeMap.put(FormatSpec.FileHeader.USES_FORGETTING_CURVE_ATTRIBUTE, FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE); + attributeMap.put(FormatSpec.FileHeader.DICTIONARY_ID_ATTRIBUTE, mFileName); + attributeMap.put(FormatSpec.FileHeader.DICTIONARY_LOCALE_ATTRIBUTE, mLocale); return attributeMap; } @@ -117,15 +119,14 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB } /** - * Pair will be added to the personalization prediction dictionary. + * Pair will be added to the decaying dictionary. * * The first word may be null. That means we don't know the context, in other words, * it's only a unigram. The first word may also be an empty string : this means start * context, as in beginning of a sentence for example. * The second word may not be null (a NullPointerException would be thrown). */ - public void addToPersonalizationPredictionDictionary( - final String word0, final String word1, final boolean isValid) { + public void addToDictionary(final String word0, final String word1, final boolean isValid) { if (word1.length() >= Constants.DICTIONARY_MAX_WORD_LENGTH || (word0 != null && word0.length() >= Constants.DICTIONARY_MAX_WORD_LENGTH)) { return; |