Searched refs:word (Results 1 - 25 of 95) sorted by relevance

1234

/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/
H A DWnnEngine.java57 * @param minLen The minimum length of a word to predict (0 : no limit)
58 * @param maxLen The maximum length of a word to predict (-1 : no limit)
89 * @param word A word to search
92 public int searchWords(WnnWord word); argument
111 * @return {@code null} if no word is registered; the array of {@link WnnWord} if some words is registered.
116 * Learn a word.
118 * This method is used to register the word selected from
120 * of the word.
122 * @param word Th
125 learn(WnnWord word) argument
133 addWord(WnnWord word) argument
141 deleteWord(WnnWord word) argument
[all...]
H A DCandidateFilter.java36 * Checking whether a specified word is filtered.
38 * @param word A word
39 * @return {@code true} if the word is allowed; {@code false} if the word is denied.
41 public boolean isAllowed(WnnWord word) { argument
46 String str = word.candidate;
H A DWnnDictionary.java138 * Searched word's frequency in the dictionary is mapped to the range from {@code base} to {@code high}.
191 * To get the searched word's information, use {@link #getNextWord()}.<br>
192 * If a same word existed in the set of dictionary, the search result may contain some same words.<br>
194 * If approximate patterns were set, the first word in search
195 * results is the highest approximation word which contains best
224 * @return 0 if no word is found; 1 if some words found; minus value if a error occurs.
229 * Search words from dictionaries with specified conditions and previous word.
231 * For using link search function, specify the {@code wnnWord} as previous word and
235 * If the prediction dictionary for reading is set to use, the previous word must contain
237 * for part of speech is set to use, the previous word mus
358 learnWord( WnnWord word, WnnWord previousWord ) argument
[all...]
H A DOpenWnnEvent.java181 * Get a word from the user dictionary.
183 * Get a word from top of the list made by {@code LIST_WORDS_IN_USER_DICTIONARY}.
188 * Add word to the user dictionary.
193 * Delete a word from the dictionary.
277 public WnnWord word = null; field in class:OpenWnnEvent
369 * @param word The selected candidate
371 public OpenWnnEvent(int code, WnnWord word) { argument
373 this.word = word;
381 * @param word Th
383 OpenWnnEvent(int code, int dict, WnnWord word) argument
[all...]
H A DCandidateTextView.java96 public CandidateTextView setCandidateTextView(WnnWord word, int wordCount, argument
100 setText(word.candidate);
108 setCustomCandidate(word);
115 * @param WnnWord candidate word
118 public int setCustomCandidate(WnnWord word) { argument
120 int width = (int)paint.measureText(word.candidate, 0, word.candidate.length());
131 width = (int)paint.measureText(word.candidate, 0, word.candidate.length());
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/EN/
H A DOpenWnnEngineEN.java35 /** Score(frequency value) of word in the learning dictionary */
37 /** Score(frequency value) of word in the user dictionary */
46 /** HashMap for checking duplicate word */
108 WnnWord word;
111 while ((word = mDictionary.getNextWord()) != null) {
113 char c = word.candidate.charAt(0);
120 word.candidate = Character.toString(Character.toUpperCase(c)) + word.candidate.substring(1);
124 word.candidate = word
162 addCandidate(WnnWord word) argument
295 searchWords(WnnWord word) argument
313 learn(WnnWord word) argument
318 addWord(WnnWord word) argument
327 deleteWord(WnnWord word) argument
[all...]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/makedict/
H A DWeightedString.java32 public WeightedString(final String word, final int probability) { argument
33 this(word, new ProbabilityInfo(probability));
36 public WeightedString(final String word, final ProbabilityInfo probabilityInfo) { argument
37 mWord = word;
H A DWordProperty.java28 * Utility class for a word with a probability.
47 public WordProperty(final String word, final ProbabilityInfo probabilityInfo, argument
51 mWord = word;
70 // Construct word property using information from native code.
71 // This represents invalid word when the probability is BinaryDictionary.NOT_A_PROBABILITY.
109 private static int computeHashCode(WordProperty word) { argument
111 word.mWord,
112 word.mProbabilityInfo,
113 word.mShortcutTargets.hashCode(),
114 word
[all...]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/suggestions/
H A DSuggestionStripViewAccessor.java25 public void showAddToDictionaryHint(final String word); argument
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
H A DDictionary.java72 * previous word.
89 * Checks if the given word has to be treated as a valid word. Please note that some
91 * @param word the word to search for. The search should be case-insensitive.
92 * @return true if the word is valid, false otherwise
94 public boolean isValidWord(final String word) { argument
95 return isInDictionary(word);
99 * Checks if the given word is in the dictionary regardless of it being valid or not.
101 abstract public boolean isInDictionary(final String word); argument
103 getFrequency(final String word) argument
107 getMaxFrequencyOfExactMatches(final String word) argument
119 same(final char[] word, final int length, final String typedWord) argument
177 isInDictionary(String word) argument
[all...]
H A DReadOnlyBinaryDictionary.java69 public boolean isInDictionary(final String word) { argument
72 return mBinaryDictionary.isInDictionary(word);
93 public int getFrequency(final String word) { argument
96 return mBinaryDictionary.getFrequency(word);
105 public int getMaxFrequencyOfExactMatches(final String word) { argument
108 return mBinaryDictionary.getMaxFrequencyOfExactMatches(word);
H A DBinaryDictionary.java177 private static native int getProbabilityNative(long dict, int[] word); argument
178 private static native int getMaxProbabilityOfExactMatchesNative(long dict, int[] word); argument
180 boolean[] isBeginningOfSentenceArray, int[] word);
181 private static native void getWordPropertyNative(long dict, int[] word, argument
195 private static native boolean addUnigramEntryNative(long dict, int[] word, int probability, argument
198 private static native boolean removeUnigramEntryNative(long dict, int[] word); argument
201 int[] word, int probability, int timestamp);
203 int[][] prevWordCodePointArrays, boolean[] isBeginningOfSentenceArray, int[] word);
337 public boolean isInDictionary(final String word) { argument
338 return getFrequency(word) !
179 getNgramProbabilityNative(long dict, int[][] prevWordCodePointArrays, boolean[] isBeginningOfSentenceArray, int[] word) argument
199 addNgramEntryNative(long dict, int[][] prevWordCodePointArrays, boolean[] isBeginningOfSentenceArray, int[] word, int probability, int timestamp) argument
202 removeNgramEntryNative(long dict, int[][] prevWordCodePointArrays, boolean[] isBeginningOfSentenceArray, int[] word) argument
342 getFrequency(final String word) argument
349 getMaxFrequencyOfExactMatches(final String word) argument
356 isValidNgram(final PrevWordsInfo prevWordsInfo, final String word) argument
360 getNgramProbability(final PrevWordsInfo prevWordsInfo, final String word) argument
373 getWordProperty(final String word, final boolean isBeginningOfSentence) argument
424 addUnigramEntry(final String word, final int probability, final String shortcutTarget, final int shortcutProbability, final boolean isBeginningOfSentence, final boolean isNotAWord, final boolean isBlacklisted, final int timestamp) argument
443 removeUnigramEntry(final String word) argument
456 addNgramEntry(final PrevWordsInfo prevWordsInfo, final String word, final int probability, final int timestamp) argument
475 removeNgramEntry(final PrevWordsInfo prevWordsInfo, final String word) argument
[all...]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/
H A DUserDictionaryCompatUtils.java32 public static void addWord(final Context context, final String word, argument
35 CompatUtils.invoke(Words.class, null, METHOD_addWord, context, word, freq, shortcut,
50 Words.addWord(context, word, freq, localeType);
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/personalization/
H A DUserHistoryDictionary.java52 * Add a word to the user history dictionary.
56 * @param word the word the user inputted
57 * @param isValid whether the word is valid or not
58 * @param timestamp the timestamp when the word has been inputted
59 * @param distracterFilter the filter to check whether the word is a distracter
62 final PrevWordsInfo prevWordsInfo, final String word, final boolean isValid,
65 if (word.length() > Constants.DICTIONARY_MAX_WORD_LENGTH ||
71 userHistoryDictionary.addUnigramEntryWithCheckingDistracter(word, frequency,
74 // Do not insert a word a
61 addToDictionary(final ExpandableBinaryDictionary userHistoryDictionary, final PrevWordsInfo prevWordsInfo, final String word, final boolean isValid, final int timestamp, final DistracterFilter distracterFilter) argument
[all...]
/packages/apps/Music/src/com/android/music/
H A DMusicAlphabetIndexer.java35 protected int compare(String word, String letter) { argument
36 String wordKey = MediaStore.Audio.keyFor(word);
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
H A DLanguageModelParam.java60 public LanguageModelParam(final CharSequence word, final int unigramProbability, argument
62 this(null /* word0 */, word, unigramProbability, Dictionary.NOT_A_PROBABILITY, timestamp);
110 Log.d(TAG, "--- word: \"" + tempWord + "\"");
141 // Add the lower-cased word.
146 // Treat the word as an OOV word.
155 final String word;
158 word = targetWord.toLowerCase(locale);
160 word = targetWord;
162 // Check whether the word i
[all...]
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/JAJP/
H A DOpenWnnEngineJAJP.java72 /** Score(frequency value) of word in the learning dictionary */
74 /** Score(frequency value) of word in the user dictionary */
91 /** HashMap for checking duplicate word */
109 /** Previously selected word */
201 WnnWord word;
214 if ((word = mDictionaryJP.getNextWord()) == null) {
218 if (!mExactMatchMode || mInputHiragana.equals(word.stroke)) {
219 addCandidate(word);
266 * This method adds a word to the result buffer if there is not
270 * @param word
273 addCandidate(WnnWord word) argument
475 searchWords(WnnWord word) argument
493 learn(WnnWord word) argument
528 addWord(WnnWord word) argument
539 deleteWord(WnnWord word) argument
[all...]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
H A DLatinImeStressTests.java39 final String word = CodePointUtils.generateWord(random, codePointSet);
40 type(word);
57 final String word = CodePointUtils.generateWord(random, codePointSet);
58 type(word);
H A DBinaryDictionaryTests.java137 addUnigramWord(binaryDictionary, "word", probability);
138 assertEquals(probability, binaryDictionary.getFrequency("word"));
144 assertEquals(probability, binaryDictionary.getFrequency("word"));
197 private static void addUnigramWord(final BinaryDictionary binaryDictionary, final String word, argument
199 binaryDictionary.addUnigramEntry(word, probability, "" /* shortcutTarget */,
292 // Test a word that isn't contained within the dictionary.
296 final String word = CodePointUtils.generateWord(random, codePointSet);
297 probabilityMap.put(word, random.nextInt(0xFF));
299 for (String word : probabilityMap.keySet()) {
300 addUnigramWord(binaryDictionary, word, probabilityMa
[all...]
/packages/inputmethods/OpenWnn/libs/libwnnDictionary/include/
H A Dnj_ext.h83 extern NJ_INT16 njd_get_word_data(NJ_CLASS *iwnn, NJ_DIC_SET *dicset, NJ_SEARCH_LOCATION_SET *loctset, NJ_UINT16 dic_idx, NJ_WORD *word);
89 extern NJ_INT16 njd_init_word(NJ_WORD* word);
93 extern NJ_INT16 njd_b_get_word(NJ_SEARCH_LOCATION_SET *loctset, NJ_WORD *word);
94 extern NJ_INT16 njd_b_get_candidate(NJ_WORD *word, NJ_CHAR *candidate,
96 extern NJ_INT16 njd_b_get_stroke(NJ_WORD *word, NJ_CHAR *stroke, NJ_UINT16 size);
100 extern NJ_INT16 njd_f_get_word(NJ_SEARCH_LOCATION_SET *loctset, NJ_WORD *word);
101 extern NJ_INT16 njd_f_get_stroke(NJ_WORD *word, NJ_CHAR *stroke,
103 extern NJ_INT16 njd_f_get_candidate(NJ_WORD *word, NJ_CHAR *candidate,
108 extern NJ_INT16 njd_l_add_word(NJ_CLASS *iwnn, NJ_LEARN_WORD_INFO *word,
113 extern NJ_INT16 njd_l_get_word(NJ_CLASS *iwnn, NJ_SEARCH_LOCATION_SET *loctset, NJ_WORD *word);
[all...]
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/makedict/
H A DFusionDictionaryTest.java46 * Generates a random word.
73 for (final String word : words) {
75 final PtNode ptNode = FusionDictionary.findWordInTree(dict.mRootNodeArray, word);
80 private String dumpWord(final String word) { argument
82 for (int i = 0; i < word.length(); i = word.offsetByCodePoints(i, 1)) {
83 sb.append(word.codePointAt(i));
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dictionary/
H A Ddictionary.h46 static const int KIND_WHITELIST = 3; // Whitelisted word
47 static const int KIND_BLACKLIST = 4; // Blacklisted word
74 int getProbability(const int *word, int length) const;
76 int getMaxProbabilityOfExactMatches(const int *word, int length) const;
79 const int *word, int length) const;
89 bool removeNgramEntry(const PrevWordsInfo *const prevWordsInfo, const int *const word,
104 // The returned token has to be used to get the next word. If token is 0, this method newly
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
H A DFusionDictionary.java181 * Adds a word to the bigram list. Updates the probability information if the word already
184 public void addBigram(final String word, final ProbabilityInfo probabilityInfo) { argument
188 WeightedString bigram = getBigram(word);
192 bigram = new WeightedString(word, probabilityInfo);
198 * Gets the shortcut target for the given word. Returns null if the word is not in the
201 public WeightedString getShortcut(final String word) { argument
207 if (shortcut.mWord.equals(word)) {
216 * Gets the bigram for the given word
219 getBigram(final String word) argument
297 getCodePoints(final String word) argument
327 add(final String word, final ProbabilityInfo probabilityInfo, final ArrayList<WeightedString> shortcutTargets, final boolean isNotAWord) argument
340 addBlacklistEntry(final String word, final ArrayList<WeightedString> shortcutTargets, final boolean isNotAWord) argument
402 add(final int[] word, final ProbabilityInfo probabilityInfo, final ArrayList<WeightedString> shortcutTargets, final boolean isNotAWord, final boolean isBlacklistEntry) argument
[all...]
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/policy/
H A Ddictionary_structure_with_buffer_policy.h73 virtual bool addUnigramEntry(const int *const word, const int length,
77 virtual bool removeUnigramEntry(const int *const word, const int length) = 0;
85 const int *const word, const int length) = 0;
105 // The returned token has to be used to get the next word. If token is 0, this method newly
/packages/inputmethods/OpenWnn/libs/libwnnDictionary/engine/
H A Dndapi.c204 result->word = tmp_word;
205 tmp_result.word = tmp_word;
226 tmp_result.word.yomi = cursor->cond.yomi;
227 tmp_result.word.stem.info1 = cursor->cond.ylen;
241 ret = njd_get_word_data(iwnn, cursor->cond.ds, loctset, (NJ_UINT16)i, &tmp_result.word);
283 ret = njd_get_word_data(iwnn, cursor->cond.ds, loctset, (NJ_UINT16)i, &tmp_result.word);
291 ((j == max_len) && (loctset->cache_freq > result->word.stem.hindo)) ||
296 result->word = tmp_result.word;
304 ret = njd_get_word_data(iwnn, cursor->cond.ds, loctset, (NJ_UINT16)i, &(tmp_result.word));
372 njd_get_word_data(NJ_CLASS *iwnn, NJ_DIC_SET *dicset, NJ_SEARCH_LOCATION_SET *loctset, NJ_UINT16 dic_idx, NJ_WORD *word) argument
885 njd_init_word(NJ_WORD* word) argument
[all...]

Completed in 494 milliseconds

1234