aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java')
-rw-r--r--java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java33
1 files changed, 1 insertions, 32 deletions
diff --git a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
index 46862c1c0..35b4ccd40 100644
--- a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
+++ b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
@@ -65,12 +65,8 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
dumpAllWordsForDebug();
}
// Flush pending writes.
- flush();
- super.close();
- }
-
- public void flush() {
asyncFlushBinaryDictionary();
+ super.close();
}
@Override
@@ -103,33 +99,6 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
addMultipleDictionaryEntriesDynamically(languageModelParams, callback);
}
- /**
- * 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 addToDictionary(final String word0, final String word1, final boolean isValid,
- final int timestamp) {
- if (word1.length() >= Constants.DICTIONARY_MAX_WORD_LENGTH ||
- (word0 != null && word0.length() >= Constants.DICTIONARY_MAX_WORD_LENGTH)) {
- return;
- }
- final int frequency = isValid ?
- FREQUENCY_FOR_WORDS_IN_DICTS : FREQUENCY_FOR_WORDS_NOT_IN_DICTS;
- addWordDynamically(word1, frequency, null /* shortcutTarget */, 0 /* shortcutFreq */,
- false /* isNotAWord */, false /* isBlacklisted */, timestamp);
- // Do not insert a word as a bigram of itself
- if (word1.equals(word0)) {
- return;
- }
- if (null != word0) {
- addBigramDynamically(word0, word1, frequency, timestamp);
- }
- }
-
@Override
protected void loadInitialContentsLocked() {
// No initial contents.