HomeSort by relevance Sort by last modified time
    Searched refs:NgramContext (Results 1 - 25 of 46) sorted by null

1 2

  /packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
NgramContextTests.java 19 import com.android.inputmethod.latin.NgramContext.WordInfo;
29 assertEquals(new NgramContext(new WordInfo("a")), new NgramContext(new WordInfo("a")));
30 assertEquals(new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO),
31 new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO));
32 assertEquals(new NgramContext(WordInfo.EMPTY_WORD_INFO),
33 new NgramContext(WordInfo.EMPTY_WORD_INFO));
34 assertEquals(new NgramContext(WordInfo.EMPTY_WORD_INFO),
35 new NgramContext(WordInfo.EMPTY_WORD_INFO));
39 assertFalse(new NgramContext().isBeginningOfSentenceContext())
    [all...]
  /packages/inputmethods/LatinIME/native/jni/src/dictionary/property/
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...]
ngram_context.h 29 class NgramContext {
32 NgramContext();
34 NgramContext(const NgramContext &ngramContext);
36 NgramContext(const int prevWordCodePoints[][MAX_WORD_LENGTH],
40 NgramContext(const int *const prevWordCodePoints, const int prevWordCodePointCount,
65 DISALLOW_ASSIGNMENT_OPERATOR(NgramContext);
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;
  /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/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/utils/
NgramContextUtils.java 19 import com.android.inputmethod.latin.NgramContext;
20 import com.android.inputmethod.latin.NgramContext.WordInfo;
50 // represent this situation using NgramContext. See TODO in the method.
59 public static NgramContext getNgramContextFromNthPreviousWord(final CharSequence prev,
61 if (prev == null) return NgramContext.EMPTY_PREV_WORDS_INFO;
64 return new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO);
111 return new NgramContext(prevWordsInfo);
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/java/src/com/android/inputmethod/latin/
NgramContext.java 34 public class NgramContext {
36 public static final NgramContext EMPTY_PREV_WORDS_INFO =
37 new NgramContext(WordInfo.EMPTY_WORD_INFO);
39 public static final NgramContext BEGINNING_OF_SENTENCE =
40 new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO);
46 public static NgramContext getEmptyPrevWordsContext(int maxPrevWordCount) {
47 return new NgramContext(maxPrevWordCount, WordInfo.EMPTY_WORD_INFO);
112 public NgramContext(final WordInfo... prevWordsInfo) {
116 public NgramContext(final int maxPrevWordCount, final WordInfo... prevWordsInfo) {
126 public NgramContext getNextNgramContext(final WordInfo wordInfo)
    [all...]
LastComposedWord.java 53 public final NgramContext mNgramContext;
69 final NgramContext ngramContext, final int capitalizedMode) {
78 mNgramContext = ngramContext;
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,
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));
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/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/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/java/src/com/android/inputmethod/latin/spellcheck/
AndroidSpellCheckerSession.java 30 import com.android.inputmethod.latin.NgramContext;
68 final NgramContext ngramContext =
69 new NgramContext(new NgramContext.WordInfo(currentWord));
214 final NgramContext ngramContext =
215 new NgramContext(new NgramContext.WordInfo(prevWord));
217 retval[i] = onGetSuggestionsInternal(textInfo, ngramContext, suggestionsLimit)
    [all...]
  /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/backward/v402/
ver4_patricia_trie_policy.h 117 bool removeNgramEntry(const NgramContext *const ngramContext,
120 bool updateEntriesForWordWithNgramContext(const NgramContext *const ngramContext,
  /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,
  /packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/
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/suggest/core/session/
dic_traverse_session.h 33 class NgramContext;
64 void init(const Dictionary *dictionary, const NgramContext *const ngramContext,
dic_traverse_session.cpp 33 const NgramContext *const ngramContext, const SuggestOptions *const suggestOptions) {
38 mPrevWordIdCount = ngramContext->getPrevWordIds(getDictionaryStructurePolicy(),

Completed in 3397 milliseconds

1 2