diff options
author | 2013-10-03 12:17:31 -0700 | |
---|---|---|
committer | 2013-10-03 12:17:31 -0700 | |
commit | 72e6932d90473378e6851500d91dd645fef3c4dd (patch) | |
tree | ca1f7feef4674c70b76bdc1c94243bb47476f26b /java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java | |
parent | 33587f919ef19d89296491a3d0e746b610838828 (diff) | |
parent | f2800fc6f44521f0594a4c29441bdf04d14341d8 (diff) | |
download | latinime-72e6932d90473378e6851500d91dd645fef3c4dd.tar.gz latinime-72e6932d90473378e6851500d91dd645fef3c4dd.tar.xz latinime-72e6932d90473378e6851500d91dd645fef3c4dd.zip |
am f2800fc6: am 1cf4789b: Merge "Set header attributes for ExpandableBinaryDictionary."
* commit 'f2800fc6f44521f0594a4c29441bdf04d14341d8':
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; |