/packages/apps/Settings/src/com/android/settings/inputmethod/ |
H A D | UserDictionaryCursorLoader.java | 43 // Either the locale is empty (means the word is applicable to all locales) 44 // or the word equals our current locale 87 final String word = candidate.getString(1); 89 final int hash = Objects.hash(word, shortcut); 94 result.addRow(new Object[]{id, word, shortcut});
|
H A D | UserDictionaryAddWordContents.java | 42 public static final String EXTRA_WORD = "word"; 65 final String word = args.getString(EXTRA_WORD); 66 if (null != word) { 67 mWordEditText.setText(word); 139 // If the word is somehow empty, don't insert it. 144 // If there is no shortcut, and the word already exists in the database, then we 145 // should not insert, because either A. the word exists with no shortcut, in which 146 // case the exact same thing we want to insert is already there, or B. the word 147 // exists with at least one shortcut, in which case it has priority on our word. 152 // Disallow duplicates. If the same word wit 175 hasWord(final String word, final Context context) argument [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/personalization/ |
H A D | UserHistoryDictionary.java | 91 * Add a word to the user history dictionary. 95 * @param word the word the user inputted 96 * @param isValid whether the word is valid or not 97 * @param timestamp the timestamp when the word has been inputted 100 @Nonnull final NgramContext ngramContext, final String word, final boolean isValid, 102 if (word.length() > BinaryDictionary.DICTIONARY_MAX_WORD_LENGTH) { 105 userHistoryDictionary.updateEntriesForWord(ngramContext, word, 132 public boolean isValidWord(final String word) { argument 99 addToDictionary(final ExpandableBinaryDictionary userHistoryDictionary, @Nonnull final NgramContext ngramContext, final String word, final boolean isValid, final int timestamp) argument
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
H A D | DictionaryFacilitatorImpl.java | 139 // typing in. For now, this is simply the number of times a word from this language 534 // The lower case form of the word is valid, so the upper case must be valid. 543 final NgramContext ngramContext, final String word, final boolean wasAutoCapitalized, 550 final int maxFreq = getFrequency(word); 554 final String lowerCasedWord = word.toLowerCase(dictionaryGroup.mLocale); 557 if (isValidSuggestionWord(word) && !isValidSuggestionWord(lowerCasedWord)) { 558 // If the word was auto-capitalized and exists only as a capitalized word in the 563 secondWord = word; 565 // If however the word i 542 addWordToUserHistory(final DictionaryGroup dictionaryGroup, final NgramContext ngramContext, final String word, final boolean wasAutoCapitalized, final int timeStampInSeconds, final boolean blockPotentiallyOffensive) argument 593 removeWord(final String dictName, final String word) argument 601 unlearnFromUserHistory(final String word, @Nonnull final NgramContext ngramContext, final long timeStampInSeconds, final int eventType) argument 645 isValidSpellingWord(final String word) argument 656 isValidSuggestionWord(final String word) argument 660 isValidWord(final String word, final String[] dictionariesToCheck) argument 680 getFrequency(final String word) argument [all...] |
H A D | ExpandableBinaryDictionary.java | 71 * The maximum length of a word in this dictionary. 295 * Adds unigram information of a word to the dictionary. May overwrite an existing entry. 297 public void addUnigramEntry(final String word, final int frequency, argument 302 addUnigramLocked(word, frequency, isNotAWord, isPossiblyOffensive, timestamp); 307 protected void addUnigramLocked(final String word, final int frequency, argument 309 if (!mBinaryDictionary.addUnigramEntry(word, frequency, 311 Log.e(TAG, "Cannot add unigram entry. word: " + word); 318 public void removeUnigramEntryDynamically(final String word) { argument 328 if (!binaryDictionary.removeUnigramEntry(word)) { 340 addNgramEntry(@onnull final NgramContext ngramContext, final String word, final int frequency, final int timestamp) argument 355 addNgramEntryLocked(@onnull final NgramContext ngramContext, final String word, final int frequency, final int timestamp) argument 368 updateEntriesForWord(@onnull final NgramContext ngramContext, final String word, final boolean isValidWord, final int count, final int timestamp) argument 464 isInDictionary(final String word) argument 486 isInDictionaryLocked(final String word) argument 492 getMaxFrequencyOfExactMatches(final String word) argument [all...] |
H A D | DictionaryFacilitator.java | 155 void unlearnFromUserHistory(final String word, argument 165 boolean isValidSpellingWord(final String word); argument 167 boolean isValidSuggestionWord(final String word); argument
|
H A D | UserBinaryDictionary.java | 202 final String word = cursor.getString(indexWord); 206 if (word.length() <= MAX_WORD_LENGTH) { 208 addUnigramLocked(word, adjustedFrequency, false /* isNotAWord */,
|
/packages/inputmethods/OpenWnn/libs/libwnnDictionary/engine/ |
H A D | ndfdic.c | 316 NJ_INT16 njd_f_get_word(NJ_SEARCH_LOCATION_SET *loctset, NJ_WORD *word) argument 331 NJ_SET_YLEN_TO_STEM(word, 1); 334 word->stem.loc = loctset->loct; 335 yomilen = njd_f_get_stroke(word, stroke, sizeof(stroke)); 339 word->stem.info1 = yomilen; 340 word->stem.info1 |= (NJ_UINT16)(DATA_FHINSI(data) << HINSI_OFFSET); 341 word->stem.info2 = (NJ_UINT16)(DATA_BHINSI(data) << HINSI_OFFSET); 347 word->stem.info2 |= kouholen; 348 word->stem.hindo = CALCULATE_HINDO(DATA_HINDO(data), loctset->dic_freq.base, 352 word 357 njd_f_get_stroke(NJ_WORD *word, NJ_CHAR *stroke, NJ_UINT16 size) argument 402 njd_f_get_candidate(NJ_WORD *word, NJ_CHAR *candidate, NJ_UINT16 size) argument [all...] |
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/JAJP/ |
H A D | OpenWnnClauseConverterJAJP.java | 28 /** Score(frequency value) of word in the learning dictionary */ 30 /** Score(frequency value) of word in the user dictionary */ 259 /* get clauses without ancillary word */ 271 /* get clauses with ancillary word */ 315 * @param stem Stem of the clause (a independent word) 377 * @param right Right attribute of the preceding word/clause 378 * @param left Left attribute of the following word/clause 427 WnnWord word; 428 while ((word = dict.getNextWord()) != null) { 429 fzks.add(word); [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/suggestions/ |
H A D | MoreSuggestions.java | 70 final String word; 73 word = suggestedWords.getLabel(SuggestedWords.INDEX_OF_TYPED_WORD); 75 word = suggestedWords.getLabel(index); 78 mWidths[index] = (int)(TypefaceUtils.getStringWidth(word, paint) + padding); 212 final String word; 216 word = mSuggestedWords.getLabel(SuggestedWords.INDEX_OF_TYPED_WORD); 219 word = mSuggestedWords.getLabel(index); 222 final Key key = new MoreSuggestionKey(word, info, index, params); 240 public MoreSuggestionKey(final String word, final String info, final int index, argument 242 super(word /* labe [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/makedict/ |
H A D | WordProperty.java | 33 * Utility class for a word with a probability. 51 public WordProperty(final String word, final ProbabilityInfo probabilityInfo, argument 54 mWord = word; 79 // Construct word property using information from native code. 80 // This represents invalid word when the probability is BinaryDictionary.NOT_A_PROBABILITY. 136 private static int computeHashCode(WordProperty word) { argument 138 word.mWord, 139 word.mProbabilityInfo, 140 word.mNgrams, 141 word [all...] |
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
H A D | AbstractDictDecoder.java | 35 public int getTerminalPosition(final String word) argument 40 return BinaryDictIOUtils.getTerminalPosition(this, word);
|
H A D | BinaryDictIOUtils.java | 114 if (ptNodeInfo.isTerminal()) {// found word 142 * @param words the map to store the address as a key and the word as a value. 159 * Gets the address of the last PtNode of the exact matching word in the dictionary. 163 * @param word the word we search for. 170 final String word) throws IOException, UnsupportedFormatException { 171 if (word == null) return FormatSpec.NOT_VALID_WORD; 175 final int wordLen = word.codePointCount(0, word.length()); 186 for (int p = 0, j = word 169 getTerminalPosition(final DictDecoder dictDecoder, final String word) argument [all...] |
H A D | BinaryDictDecoderUtils.java | 205 * @param word the string to write. 208 static int writeString(final byte[] buffer, final int origin, final String word, argument 210 final int length = word.length(); 212 for (int i = 0; i < length; i = word.offsetByCodePoints(i, 1)) { 213 int codePoint = word.codePointAt(i); 238 * @param word the string to write. 241 static int writeString(final OutputStream stream, final String word, argument 243 final int length = word.length(); 245 for (int i = 0; i < length; i = word.offsetByCodePoints(i, 1)) { 246 final int codePoint = word [all...] |
/packages/inputmethods/LatinIME/tools/dicttool/src/com/android/inputmethod/latin/dicttool/ |
H A D | CombinedInputOutput.java | 98 String word = null; 108 if (null != word) { 109 dict.add(word, probabilityInfo, shortcuts.isEmpty() ? null : shortcuts, 112 dict.setBigram(word, s.mWord, s.mProbabilityInfo); 124 word = params[1]; 202 if (null != word) { 203 dict.add(word, probabilityInfo, shortcuts.isEmpty() ? null : shortcuts, isNotAWord, 206 dict.setBigram(word, s.mWord, s.mProbabilityInfo);
|
H A D | Info.java | 67 private static void showWordInfo(final FusionDictionary dict, final String word) { argument 68 final PtNode ptNode = FusionDictionary.findWordInTree(dict.mRootNodeArray, word); 70 System.out.println(word + " is not in the dictionary"); 73 System.out.println("Word: " + word); 76 System.out.println(" Is not a word");
|
H A D | Diff.java | 67 // pt_BR dict is almost certainly only interested in header-level diff, and the word 114 // This word is not in dict1 119 // We found the word. Compare frequencies, shortcuts, bigrams 127 System.out.println("Not a word: " + word0Property.mWord + " " 148 // This word is not in dict0 159 private static boolean hasAttributesDifferencesAndPrintThemIfAny(final String word, argument 165 System.out.println(type + " removed: " + word + " " + attribute0.mWord + " " 177 // Search for a word with the same string but a different frequency 181 System.out.println(type + " freq changed: " + word + " " 191 System.out.println(type + " removed: " + word [all...] |
/packages/inputmethods/LatinIME/native/jni/src/ |
H A D | defines.h | 114 #define DUMP_WORD(word, length) do { dumpWord(word, length); } while (0) 118 static inline void dumpWordInfo(const int *word, const int length, const int rank, argument 121 const int N = intArrayToCharArray(word, length, charBuf, NELEMS(charBuf)); 127 static AK_FORCE_INLINE void dumpWord(const int *word, const int length) { argument 129 const int N = intArrayToCharArray(word, length, charBuf, NELEMS(charBuf)); 168 #define DUMP_WORD(word, length) 243 // A special value to mean the first word confidence makes no sense in this case, 244 // e.g. this is not a multi-word suggestion. 335 // Create new word wit [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/ |
H A D | SuggestionSpanUtils.java | 90 final String word = suggestedWords.getWord(i); 91 if (!TextUtils.equals(pickedWord, word)) { 92 suggestionsList.add(word.toString());
|
/packages/inputmethods/LatinIME/native/jni/ |
H A D | com_android_inputmethod_latin_BinaryDictionary.cpp | 264 jintArray word) { 267 const jsize codePointCount = env->GetArrayLength(word); 269 env->GetIntArrayRegion(word, 0, codePointCount, codePoints); 274 JNIEnv *env, jclass clazz, jlong dict, jintArray word) { 277 const jsize codePointCount = env->GetArrayLength(word); 279 env->GetIntArrayRegion(word, 0, codePointCount, codePoints); 286 jintArray word) { 289 const jsize wordLength = env->GetArrayLength(word); 291 env->GetIntArrayRegion(word, 0, wordLength, wordCodePoints); 301 // the dictionary does not have a next word 263 latinime_BinaryDictionary_getProbability(JNIEnv *env, jclass clazz, jlong dict, jintArray word) argument 273 latinime_BinaryDictionary_getMaxProbabilityOfExactMatches( JNIEnv *env, jclass clazz, jlong dict, jintArray word) argument 284 latinime_BinaryDictionary_getNgramProbability(JNIEnv *env, jclass clazz, jlong dict, jobjectArray prevWordCodePointArrays, jbooleanArray isBeginningOfSentenceArray, jintArray word) argument 328 latinime_BinaryDictionary_getWordProperty(JNIEnv *env, jclass clazz, jlong dict, jintArray word, jboolean isBeginningOfSentence, jintArray outCodePoints, jbooleanArray outFlags, jintArray outProbabilityInfo, jobject outNgramPrevWordsArray, jobject outNgramPrevWordIsBeginningOfSentenceArray, jobject outNgramTargets, jobject outNgramProbabilityInfo, jobject outShortcutTargets, jobject outShortcutProbabilities) argument 359 latinime_BinaryDictionary_addUnigramEntry(JNIEnv *env, jclass clazz, jlong dict, jintArray word, jint probability, jintArray shortcutTarget, jint shortcutProbability, jboolean isBeginningOfSentence, jboolean isNotAWord, jboolean isPossiblyOffensive, jint timestamp) argument 386 latinime_BinaryDictionary_removeUnigramEntry(JNIEnv *env, jclass clazz, jlong dict, jintArray word) argument 398 latinime_BinaryDictionary_addNgramEntry(JNIEnv *env, jclass clazz, jlong dict, jobjectArray prevWordCodePointArrays, jbooleanArray isBeginningOfSentenceArray, jintArray word, jint probability, jint timestamp) argument 418 latinime_BinaryDictionary_removeNgramEntry(JNIEnv *env, jclass clazz, jlong dict, jobjectArray prevWordCodePointArrays, jbooleanArray isBeginningOfSentenceArray, jintArray word) argument 435 latinime_BinaryDictionary_updateEntriesForWordWithNgramContext(JNIEnv *env, jclass clazz, jlong dict, jobjectArray prevWordCodePointArrays, jbooleanArray isBeginningOfSentenceArray, jintArray word, jboolean isValidWord, jint count, jint timestamp) argument [all...] |
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/ |
H A D | CandidatesViewManager.java | 47 * Attribute of a word (no attribute) 52 * Attribute of a word (a candidate in the history list) 57 * Attribute of a word (the best candidate) 62 * Attribute of a word (auto generated/not in the dictionary) 73 /** The word pressed */ 161 * @param word Display word, 163 protected void displayDialog(View view, final WnnWord word) { argument 169 text.setText(word.candidate);
|
H A D | TextCandidatesViewManager.java | 269 WnnWord word = null; 270 while ((word = mWnnWordSelectedList.poll()) != null) { 271 selectCandidate(word); 371 WnnWord word = list.get(wordcount); 374 mWnnWordSelectedList.add(word); 378 selectCandidate(word); 875 * @param isCategory {@code true}:caption of category, {@code false}:normal word 876 * @param word A candidate word 878 private void setCandidate(boolean isCategory, WnnWord word) { argument 1290 selectCandidate(WnnWord word) argument 1451 isCategory(WnnWord word) argument 1585 isFirstListOver(boolean isFullView, int lineCount, WnnWord word) argument [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/userdictionary/ |
H A D | UserDictionarySettings.java | 87 // Either the locale is empty (means the word is applicable to all locales) 88 // or the word equals our current locale 207 final String word = getWord(position); 209 if (word != null) { 210 showAddOrEditDialog(word, shortcut); 242 * Add or edit a word. If editingWord is null, it's an add; otherwise, it's an edit. 243 * @param editingWord the word to edit, or null if it's an add. 281 public static void deleteWord(final String word, final String shortcut, argument 285 new String[] { word }); 289 new String[] { word }); [all...] |
/packages/apps/TV/src/com/android/tv/recommendation/ |
H A D | RoutineWatchEvaluator.java | 135 for (String word : toSearchWords) { 137 if (word.equals(toMatchWords.get(j))) { 211 String word = text.substring(start, end); 212 if (Character.isLetterOrDigit(word.charAt(0))) { 213 wordList.add(word);
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/layout/ |
H A D | proximity_info_state.h | 71 inline bool sameAsTyped(const int *word, int length) const { argument 77 if (*inputProximities != *word) { 81 word++;
|