diff options
author | 2014-09-29 03:06:25 +0000 | |
---|---|---|
committer | 2014-09-29 03:06:25 +0000 | |
commit | 895cbb76ba139950e5e06a95b92be78404a2b34f (patch) | |
tree | f8153aa00eece290c6be29ffdf205fccf2f71ef0 /java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java | |
parent | 97d271664730c1ba9d52f7ea5798b5f455952ebd (diff) | |
parent | a4a4e9d96bfb0f41fe04abb28d8be49d7d780cbe (diff) | |
download | latinime-895cbb76ba139950e5e06a95b92be78404a2b34f.tar.gz latinime-895cbb76ba139950e5e06a95b92be78404a2b34f.tar.xz latinime-895cbb76ba139950e5e06a95b92be78404a2b34f.zip |
am a4a4e9d9: Merge "Rename PrevWordsInfo to NgramContext."
* commit 'a4a4e9d96bfb0f41fe04abb28d8be49d7d780cbe':
Rename PrevWordsInfo to NgramContext.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java index 162a209e3..78c6cbd24 100644 --- a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java @@ -218,7 +218,7 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary { */ private void addNameLocked(final String name) { int len = StringUtils.codePointCount(name); - PrevWordsInfo prevWordsInfo = PrevWordsInfo.EMPTY_PREV_WORDS_INFO; + NgramContext ngramContext = NgramContext.EMPTY_PREV_WORDS_INFO; // TODO: Better tokenization for non-Latin writing systems for (int i = 0; i < len; i++) { if (Character.isLetter(name.codePointAt(i))) { @@ -233,19 +233,19 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary { final int wordLen = StringUtils.codePointCount(word); if (wordLen <= MAX_WORD_LENGTH && wordLen > 1) { if (DEBUG) { - Log.d(TAG, "addName " + name + ", " + word + ", " + prevWordsInfo); + Log.d(TAG, "addName " + name + ", " + word + ", " + ngramContext); } runGCIfRequiredLocked(true /* mindsBlockByGC */); addUnigramLocked(word, FREQUENCY_FOR_CONTACTS, null /* shortcut */, 0 /* shortcutFreq */, false /* isNotAWord */, false /* isBlacklisted */, BinaryDictionary.NOT_A_VALID_TIMESTAMP); - if (!prevWordsInfo.isValid() && mUseFirstLastBigrams) { + if (!ngramContext.isValid() && mUseFirstLastBigrams) { runGCIfRequiredLocked(true /* mindsBlockByGC */); - addNgramEntryLocked(prevWordsInfo, word, FREQUENCY_FOR_CONTACTS_BIGRAM, + addNgramEntryLocked(ngramContext, word, FREQUENCY_FOR_CONTACTS_BIGRAM, BinaryDictionary.NOT_A_VALID_TIMESTAMP); } - prevWordsInfo = prevWordsInfo.getNextPrevWordsInfo( - new PrevWordsInfo.WordInfo(word)); + ngramContext = ngramContext.getNextNgramContext( + new NgramContext.WordInfo(word)); } } } |