/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
WordInputEventForPersonalization.java | 22 import com.android.inputmethod.latin.NgramContext; 48 final NgramContext ngramContext, final int timestamp) { 50 mPrevWordsCount = ngramContext.getPrevWordCount(); 51 ngramContext.outputToArray(mPrevWordArray, mIsPrevWordBeginningOfSentenceArray); 62 NgramContext ngramContext = NgramContext.EMPTY_PREV_WORDS_INFO; 80 ngramContext = NgramContext.EMPTY_PREV_WORDS_INFO [all...] |
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dictionary/ |
dictionary.h | 36 class NgramContext; 70 int inputSize, const NgramContext *const ngramContext, 74 void getPredictions(const NgramContext *const ngramContext, 81 int getNgramProbability(const NgramContext *const ngramContext, 91 bool removeNgramEntry(const NgramContext *const ngramContext, 94 bool updateEntriesForWordWithNgramContext(const NgramContext *const ngramContext [all...] |
dictionary.cpp | 49 int inputSize, const NgramContext *const ngramContext, 53 traverseSession->init(this, ngramContext, suggestOptions); 61 const NgramContext *const ngramContext, const WordIdArrayView prevWordIds, 64 : mNgramContext(ngramContext), mPrevWordIds(prevWordIds), 91 void Dictionary::getPredictions(const NgramContext *const ngramContext, 95 const WordIdArrayView prevWordIds = ngramContext->getPrevWordIds( 98 NgramListenerForPrediction listener(ngramContext, prevWordIds, outSuggestionResults [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/makedict/ |
NgramProperty.java | 19 import com.android.inputmethod.latin.NgramContext; 23 public final NgramContext mNgramContext; 25 public NgramProperty(final WeightedString targetWord, final NgramContext ngramContext) { 27 mNgramContext = ngramContext;
|
WordProperty.java | 22 import com.android.inputmethod.latin.NgramContext; 23 import com.android.inputmethod.latin.NgramContext.WordInfo; 60 final NgramContext ngramContext = new NgramContext(new WordInfo(mWord)); 62 mNgrams.add(new NgramProperty(bigramTarget, ngramContext)); 111 final NgramContext ngramContext = new NgramContext(wordInfoArray); 112 ngrams.add(new NgramProperty(ngramTarget, ngramContext)); [all...] |
/packages/inputmethods/LatinIME/native/jni/src/dictionary/property/ |
ngram_property.h | 30 NgramProperty(const NgramContext &ngramContext, const std::vector<int> &&targetCodePoints, 32 : mNgramContext(ngramContext), mTargetCodePoints(std::move(targetCodePoints)), 35 const NgramContext *getNgramContext() const { 56 const NgramContext mNgramContext;
|
ngram_context.cpp | 24 NgramContext::NgramContext() : mPrevWordCount(0) {} 26 NgramContext::NgramContext(const NgramContext &ngramContext) 27 : mPrevWordCount(ngramContext.mPrevWordCount) { 29 mPrevWordCodePointCount[i] = ngramContext.mPrevWordCodePointCount[i]; 30 memmove(mPrevWordCodePoints[i], ngramContext.mPrevWordCodePoints[i], 32 mIsBeginningOfSentence[i] = ngramContext.mIsBeginningOfSentence[i] [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
ContactsBinaryDictionary.java | 135 NgramContext ngramContext = NgramContext.getEmptyPrevWordsContext( 151 Log.d(TAG, "addName " + name + ", " + word + ", " + ngramContext); 158 if (ngramContext.isValid() && mUseFirstLastBigrams) { 160 addNgramEntryLocked(ngramContext, 165 ngramContext = ngramContext.getNextNgramContext( 166 new NgramContext.WordInfo(word));
|
LastComposedWord.java | 53 public final NgramContext mNgramContext; 69 final NgramContext ngramContext, final int capitalizedMode) { 78 mNgramContext = ngramContext;
|
BinaryDictionary.java | 269 final NgramContext ngramContext, final long proximityInfoHandle, 278 ngramContext.outputToArray(session.mPrevWordCodePointArrays, 311 session.mIsBeginningOfSentenceArray, ngramContext.getPrevWordCount(), 375 public boolean isValidNgram(final NgramContext ngramContext, final String word) { 376 return getNgramProbability(ngramContext, word) != NOT_A_PROBABILITY; 379 public int getNgramProbability(final NgramContext ngramContext, final String word) { 380 if (!ngramContext.isValid() || TextUtils.isEmpty(word)) [all...] |
DictionaryFacilitator.java | 152 @Nonnull final NgramContext ngramContext, final long timeStampInSeconds, 156 @Nonnull final NgramContext ngramContext, final long timeStampInSeconds, 161 final NgramContext ngramContext, @Nonnull final Keyboard keyboard,
|
ReadOnlyBinaryDictionary.java | 54 final NgramContext ngramContext, final long proximityInfoHandle, 60 return mBinaryDictionary.getSuggestions(composedData, ngramContext,
|
DictionaryCollection.java | 63 final NgramContext ngramContext, final long proximityInfoHandle, 72 ngramContext, proximityInfoHandle, settingsValuesForSuggestion, sessionId, 78 composedData, ngramContext, proximityInfoHandle, settingsValuesForSuggestion,
|
Dictionary.java | 88 * @param ngramContext the context for n-gram. 100 final NgramContext ngramContext, final long proximityInfoHandle, 204 final NgramContext ngramContext, final long proximityInfoHandle,
|
/packages/inputmethods/LatinIME/native/jni/src/utils/ |
jni_data_utils.cpp | 56 const NgramContext *const ngramContext = ngramProperty.getNgramContext(); 58 ngramContext->getPrevWordCount(), intArrayClass, nullptr); 60 env->NewBooleanArray(ngramContext->getPrevWordCount()); 61 for (size_t i = 0; i < ngramContext->getPrevWordCount(); ++i) { 62 const CodePointArrayView codePoints = ngramContext->getNthPrevWordCodePoints(i + 1); 70 ngramContext->isNthPrevWordBeginningOfSentence(i + 1));
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/personalization/ |
UserHistoryDictionaryTestsHelper.java | 22 import com.android.inputmethod.latin.NgramContext; 23 import com.android.inputmethod.latin.NgramContext.WordInfo; 102 NgramContext ngramContext = NgramContext.getEmptyPrevWordsContext( 105 UserHistoryDictionary.addToDictionary(dict, ngramContext, word, true, timestamp); 106 ngramContext = ngramContext.getNextNgramContext(new WordInfo(word));
|
/packages/inputmethods/LatinIME/native/jni/ |
com_android_inputmethod_latin_DicTraverseSession.cpp | 43 NgramContext emptyNgramContext; 49 NgramContext ngramContext(prevWord, previousWordLength, false /* isStartOfSentence */); 50 ts->init(dict, &ngramContext, 0 /* suggestOptions */);
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/interface/ |
dictionary_structure_with_buffer_policy.h | 36 class NgramContext; 86 virtual bool removeNgramEntry(const NgramContext *const ngramContext, 90 virtual bool updateEntriesForWordWithNgramContext(const NgramContext *const ngramContext,
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/session/ |
dic_traverse_session.cpp | 33 const NgramContext *const ngramContext, const SuggestOptions *const suggestOptions) { 38 mPrevWordIdCount = ngramContext->getPrevWordIds(getDictionaryStructurePolicy(),
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/ |
ver4_patricia_trie_policy.cpp | 282 const NgramContext *const ngramContext = ngramProperty->getNgramContext(); 283 if (!ngramContext->isValid()) { 293 const WordIdArrayView prevWordIds = ngramContext->getPrevWordIds(this, &prevWordIdArray, 302 if (!ngramContext->isNthPrevWordBeginningOfSentence(i + 1 /* n */)) { 309 if (!addUnigramEntry(ngramContext->getNthPrevWordCodePoints(1 /* n */), 315 ngramContext->getPrevWordIds(this, &prevWordIdArray, false /* tryLowerCaseSearch */); 334 bool Ver4PatriciaTriePolicy::removeNgramEntry(const NgramContext *const ngramContext, 345 if (!ngramContext->isValid()) [all...] |
ver4_patricia_trie_policy.h | 96 bool removeNgramEntry(const NgramContext *const ngramContext, 99 bool updateEntriesForWordWithNgramContext(const NgramContext *const ngramContext,
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/ |
ver4_patricia_trie_policy.cpp | 357 const NgramContext *const ngramContext = ngramProperty->getNgramContext(); 358 if (!ngramContext->isValid()) { 368 const WordIdArrayView prevWordIds = ngramContext->getPrevWordIds(this, &prevWordIdArray, 374 if (ngramContext->isNthPrevWordBeginningOfSentence(1 /* n */)) { 378 if (!addUnigramEntry(ngramContext->getNthPrevWordCodePoints(1 /* n */), 384 ngramContext->getPrevWordIds(this, &prevWordIdArray, false /* tryLowerCaseSearch */); 408 bool Ver4PatriciaTriePolicy::removeNgramEntry(const NgramContext *const ngramContext, 419 if (!ngramContext->isValid()) [all...] |
ver4_patricia_trie_policy.h | 117 bool removeNgramEntry(const NgramContext *const ngramContext, 120 bool updateEntriesForWordWithNgramContext(const NgramContext *const ngramContext,
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/personalization/ |
UserHistoryDictionary.java | 26 import com.android.inputmethod.latin.NgramContext; 94 * @param ngramContext the n-gram context 100 @Nonnull final NgramContext ngramContext, final String word, final boolean isValid, 105 userHistoryDictionary.updateEntriesForWord(ngramContext, word,
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v2/ |
patricia_trie_policy.h | 102 bool removeNgramEntry(const NgramContext *const ngramContext, 109 bool updateEntriesForWordWithNgramContext(const NgramContext *const ngramContext,
|