Searched refs:word (Results 1 - 25 of 80) 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());
H A DOpenWnnDictionaryImpl.java50 /** The type name of user word */
52 /** The type name of learn word */
413 * @param wnnWord The previous word for link search
466 /* If link search is enabled, insert information of the previous word */
524 /* If no word is retrieved, deactivate the cursor for reduce the resource */
536 /* Unset the previous word information */
549 /* If the key string is "", no word is retrieved */
648 /* Get the information of word */
848 public int addWordToUserDictionary( WnnWord[] word ) {
864 if( count + word
1001 learnWord( WnnWord word, WnnWord previousWord ) argument
[all...]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/makedict/
H A DWord.java25 * Utility class for a word with a frequency.
39 public Word(final String word, final int frequency, argument
43 mWord = word;
51 private static int computeHashCode(Word word) { argument
53 word.mWord,
54 word.mFrequency,
55 word.mShortcutTargets.hashCode(),
56 word.mBigrams.hashCode(),
57 word.mIsNotAWord,
58 word
[all...]
H A DFusionDictionary.java65 public WeightedString(String word, int frequency) { argument
66 mWord = word;
150 * Adds a word to the bigram list. Updates the frequency if the word already
153 public void addBigram(final String word, final int frequency) { argument
157 WeightedString bigram = getBigram(word);
161 bigram = new WeightedString(word, frequency);
167 * Gets the shortcut target for the given word. Returns null if the word is not in the
170 public WeightedString getShortcut(final String word) { argument
188 getBigram(final String word) argument
282 getCodePoints(final String word) argument
311 add(final String word, final int frequency, final ArrayList<WeightedString> shortcutTargets, final boolean isNotAWord) argument
324 addBlacklistEntry(final String word, final ArrayList<WeightedString> shortcutTargets, final boolean isNotAWord) argument
380 add(final int[] word, final int frequency, final ArrayList<WeightedString> shortcutTargets, final boolean isNotAWord, final boolean isBlacklistEntry) argument
[all...]
/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/
H A DAutoCorrection.java36 CharSequence word, boolean ignoreCase) {
37 if (TextUtils.isEmpty(word)) {
40 final CharSequence lowerCasedWord = word.toString().toLowerCase();
45 // no main dictionary and the monkey manages to type a whole word before the thread
51 if (dictionary.isValidWord(word)
60 CharSequence word) {
61 if (TextUtils.isEmpty(word)) {
68 final int tempFreq = dictionary.getFrequency(word);
79 final CharSequence word, final boolean ignoreCase) {
80 return isValidWord(dictionaries, word, ignoreCas
35 isValidWord(final ConcurrentHashMap<String, Dictionary> dictionaries, CharSequence word, boolean ignoreCase) argument
59 getMaxFrequency(final ConcurrentHashMap<String, Dictionary> dictionaries, CharSequence word) argument
77 isInTheDictionary( final ConcurrentHashMap<String, Dictionary> dictionaries, final CharSequence word, final boolean ignoreCase) argument
[all...]
H A DDictionary.java30 * The weight to give to a word if it's length is the same as the number of typed characters.
53 * previous word.
55 * @param prevWord the previous word, or null if none
59 // TODO: pass more context than just the previous word, to enable better suggestions (n-gram
72 * Checks if the given word occurs in the dictionary
73 * @param word the word to search for. The search should be case-insensitive.
74 * @return true if the word exists, false otherwise
76 abstract public boolean isValidWord(CharSequence word); argument
78 public int getFrequency(CharSequence word) { argument
90 same(final char[] word, final int length, final CharSequence typedWord) argument
[all...]
H A DPositionalInfoForUserDictPendingAddition.java22 * Holder class for data about a word already committed but that may still be edited.
24 * When the user chooses to add a word to the user dictionary by pressing the appropriate
25 * suggestion, a dialog is presented to give a chance to edit the word before it is actually
26 * registered as a user dictionary word. If the word is actually modified, the IME needs to
27 * go back and replace the word that was committed with the amended version.
28 * The word we need to replace with will only be known after it's actually committed, so
34 final private int mCursorPos; // Position of the cursor after the word
38 public PositionalInfoForUserDictPendingAddition(final String word, final int cursorPos, argument
40 mOriginalWord = word;
[all...]
H A DSynchronouslyLoadedContactsBinaryDictionary.java42 public synchronized boolean isValidWord(CharSequence word) { argument
44 return isValidWordInner(word);
H A DSynchronouslyLoadedUserBinaryDictionary.java45 public synchronized boolean isValidWord(CharSequence word) { argument
47 return isValidWordInner(word);
H A DContactsBinaryDictionary.java170 String word = name.substring(i, end);
174 final int wordLen = StringUtils.codePointCount(word);
176 super.addWord(word, null /* shortcut */, FREQUENCY_FOR_CONTACTS);
179 super.setBigram(prevWord, word, FREQUENCY_FOR_CONTACTS_BIGRAM);
182 prevWord = word;
189 * Returns the index of the last letter in the word, starting from position startIndex.
268 String word = name.substring(i, end);
270 final int wordLen = StringUtils.codePointCount(word);
273 if (!super.isValidBigramLocked(prevWord, word)) {
277 if (!super.isValidWordLocked(word)) {
[all...]
/packages/inputmethods/LatinIME/native/jni/src/
H A Dbigram_dictionary.h30 int getBigrams(const int32_t *word, int length, int *inputCodes, int codesSize,
38 bool addWordBigram(unsigned short *word, int length, int frequency,
45 bool checkFirstCharacter(unsigned short *word, int *inputCodes) const;
H A Ddefines.h32 #define DUMP_WORD(word, length) do { dumpWord(word, length); } while (0)
33 #define DUMP_WORD_INT(word, length) do { dumpWordInt(word, length); } while (0)
38 static inline void dumpWordInfo(const unsigned short *word, const int length, argument
43 const unsigned short c = word[i];
66 static inline void dumpWord(const unsigned short *word, const int length) { argument
70 const unsigned short c = word[i];
83 static inline void dumpWordInt(const int *word, const int length) { argument
87 charBuf[i] = word[
[all...]
H A Dwords_priority_queue.h38 void setParams(int score, unsigned short *word, int wordLength, int type) { argument
41 memcpy(mWord, word, sizeof(unsigned short) * wordLength);
60 void push(int score, unsigned short *word, int wordLength, int type) { argument
73 sw = getFreeSuggestedWord(score, word, wordLength, type);
75 sw->setParams(score, word, wordLength, type);
82 AKLOGI("Push word. %d, %d", score, wordLength);
83 DUMP_WORD(word, wordLength);
107 AKLOGI("dump word. %d", sw->mScore);
163 AKLOGI("Clear word. %d", sw->mScore);
195 SuggestedWord *getFreeSuggestedWord(int score, unsigned short *word, argument
209 unsigned short *word = sw->mWord; local
[all...]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
H A DUserHistoryDictIOUtilsTests.java62 private void addWord(final String word, argument
64 if (!addedWords.containsKey(word)) {
65 addedWords.put(word, new ArrayList<String>());
85 private void checkWordInFusionDict(final FusionDictionary dict, final String word, argument
87 final CharGroup group = FusionDictionary.findWordInTree(dict.mRoot, word);
98 for (final String word : bigrams.keySet()) {
99 if (bigrams.containsKey(word)) {
100 checkWordInFusionDict(dict, word, bigrams.get(word));
102 checkWordInFusionDict(dict, word, NOT_HAVE_BIGRA
107 checkWordInBigramList( final UserHistoryDictionaryBigramList bigramList, final String word, final ArrayList<String> expectedBigrams) 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/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/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/java/src/com/android/inputmethod/research/
H A DMainLogBuffer.java36 // number in the middle or an out-of-vocabulary word), then sampling is delayed until a safe
88 // Main dictionary is unavailable. Since we cannot check it, we cannot tell if a word
99 // Check each word in the buffer. If any word poses a privacy threat, we cannot upload the
104 final String word = logUnit.getWord();
105 if (word == null) {
112 if (!(dictionary.isValidWord(word))) {
/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...]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/suggestions/
H A DSuggestionStripView.java76 public void addWordToUserDictionary(String word); argument
77 public void pickSuggestionManually(int index, CharSequence word); argument
186 final TextView word = words.get(0);
188 mPadding = word.getCompoundPaddingLeft() + word.getCompoundPaddingRight();
193 final Resources res = word.getResources();
283 final CharSequence word = suggestedWords.getWord(pos);
287 return word;
289 final int len = word.length();
290 final Spannable spannedWord = new SpannableString(word);
472 layoutAddToDictionaryHint(CharSequence word, ViewGroup stripView, int stripWidth, CharSequence hintText, OnClickListener listener) argument
687 showAddToDictionaryHint(CharSequence word, CharSequence hintText) argument
[all...]

Completed in 284 milliseconds

1234