/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
D | NgramContextTests.java | 27 import com.android.inputmethod.latin.NgramContext.WordInfo; 40 assertEquals(new NgramContext(new WordInfo("a")), new NgramContext(new WordInfo("a"))); in testConstruct() 41 assertEquals(new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO), in testConstruct() 42 new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO)); in testConstruct() 43 assertEquals(new NgramContext(WordInfo.EMPTY_WORD_INFO), in testConstruct() 44 new NgramContext(WordInfo.EMPTY_WORD_INFO)); in testConstruct() 45 assertEquals(new NgramContext(WordInfo.EMPTY_WORD_INFO), in testConstruct() 46 new NgramContext(WordInfo.EMPTY_WORD_INFO)); in testConstruct() 52 assertTrue(new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO) in testIsBeginningOfSentenceContext() 55 assertFalse(new NgramContext(new WordInfo("a")).isBeginningOfSentenceContext()); in testIsBeginningOfSentenceContext() [all …]
|
D | BinaryDictionaryTests.java | 31 import com.android.inputmethod.latin.NgramContext.WordInfo; 199 binaryDictionary.addNgramEntry(new NgramContext(new WordInfo(word0)), word1, probability, in addBigramWords() 206 new NgramContext(new WordInfo(word1), new WordInfo(word0)), word2, in addTrigramEntry() 212 return binaryDictionary.isValidNgram(new NgramContext(new WordInfo(word0)), word1); in isValidBigram() 217 return binaryDictionary.getNgramProbability(new NgramContext(new WordInfo(word0)), word1); in getBigramProbability() 223 new NgramContext(new WordInfo(word1), new WordInfo(word0)), word2); in getTrigramProbability()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | NgramContext.java | 37 new NgramContext(WordInfo.EMPTY_WORD_INFO); 40 new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO); 47 return new NgramContext(maxPrevWordCount, WordInfo.EMPTY_WORD_INFO); in getEmptyPrevWordsContext() 53 public static class WordInfo { class in NgramContext 55 public static final WordInfo EMPTY_WORD_INFO = new WordInfo(null); 57 public static final WordInfo BEGINNING_OF_SENTENCE_WORD_INFO = new WordInfo(); 67 private WordInfo() { in WordInfo() method in NgramContext.WordInfo 72 public WordInfo(final CharSequence word) { in WordInfo() method in NgramContext.WordInfo 89 if (!(o instanceof WordInfo)) return false; in equals() 90 final WordInfo wordInfo = (WordInfo)o; in equals() [all …]
|
D | DictionaryFacilitatorImpl.java | 27 import com.android.inputmethod.latin.NgramContext.WordInfo; 515 ngramContextForCurrentWord.getNextNgramContext(new WordInfo(currentWord)); in addToUserHistory()
|
D | ContactsBinaryDictionary.java | 166 new NgramContext.WordInfo(word)); in addNameLocked()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
D | NgramContextUtils.java | 20 import com.android.inputmethod.latin.NgramContext.WordInfo; 64 return new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO); in getNgramContextFromNthPreviousWord() 67 final WordInfo[] prevWordsInfo = in getNgramContextFromNthPreviousWord() 68 new WordInfo[DecoderSpecificConstants.MAX_PREV_WORD_COUNT_FOR_N_GRAM]; in getNgramContextFromNthPreviousWord() 69 Arrays.fill(prevWordsInfo, WordInfo.EMPTY_WORD_INFO); in getNgramContextFromNthPreviousWord() 86 prevWordsInfo[i] = WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO; in getNgramContextFromNthPreviousWord() 94 prevWordsInfo[i] = WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO; in getNgramContextFromNthPreviousWord() 100 prevWordsInfo[i] = WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO; in getNgramContextFromNthPreviousWord() 109 prevWordsInfo[i] = new WordInfo(focusedWord); in getNgramContextFromNthPreviousWord()
|
D | WordInputEventForPersonalization.java | 93 ngramContext = ngramContext.getNextNgramContext(new NgramContext.WordInfo(tempWord)); in createInputEventFrom()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/makedict/ |
D | WordProperty.java | 23 import com.android.inputmethod.latin.NgramContext.WordInfo; 60 final NgramContext ngramContext = new NgramContext(new WordInfo(mWord)); in WordProperty() 104 final WordInfo[] wordInfoArray = new WordInfo[prevWords.length]; in WordProperty() 107 ? WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO in WordProperty() 108 : new WordInfo(StringUtils.getStringFromNullTerminatedCodePointArray( in WordProperty()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/personalization/ |
D | UserHistoryDictionaryTestsHelper.java | 23 import com.android.inputmethod.latin.NgramContext.WordInfo; 106 ngramContext = ngramContext.getNextNgramContext(new WordInfo(word)); in addWordsToDictionary()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/ |
D | AndroidSpellCheckerSession.java | 69 new NgramContext(new NgramContext.WordInfo(currentWord)); in fixWronglyInvalidatedWordWithSingleQuote() 215 new NgramContext(new NgramContext.WordInfo(prevWord)); in onGetSuggestionsMultiple()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
D | Ver4DictEncoder.java | 94 new NgramContext(new NgramContext.WordInfo(word0Property.mWord)); in writeDictionary()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/inputlogic/ |
D | InputLogic.java | 1805 return new NgramContext(new NgramContext.WordInfo( in getNgramContextFromNthPreviousWordForSuggestion()
|