diff options
author | 2013-09-28 12:50:09 +0900 | |
---|---|---|
committer | 2013-09-28 12:50:09 +0900 | |
commit | 5ed30a7660048ef4bf78077e77554c97786eae2b (patch) | |
tree | fe9a17cbd205c0d84c16e3eae239140a2d874384 /java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java | |
parent | 67cb282b6408b0924215835301b181eb0d1ecfe9 (diff) | |
download | latinime-5ed30a7660048ef4bf78077e77554c97786eae2b.tar.gz latinime-5ed30a7660048ef4bf78077e77554c97786eae2b.tar.xz latinime-5ed30a7660048ef4bf78077e77554c97786eae2b.zip |
Set header attributes for ExpandableBinaryDictionary.
Bug: 6669677
Change-Id: I2462777eaa07600f1c774226adfc4f351882f523
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; |