Lines Matching refs:word

94         public void onClickComposingTextToAddToDictionary(final String word) {
95 mLatinIME.addWordToUserDictionary(word);
193 // If we had a composition in progress, we need to commit the word so that the
264 * @param suggestionInfo the suggested word chosen by the user.
309 // In the batch input mode, a manually picked suggested word should just replace
393 // If we are composing a word and moving the cursor, we would want to set a
424 // We moved the cursor. If we are touching a word, we need to resume suggestion.
461 // a word is committed.
514 // should become "I"). However for any longer word, we assume that the reason for
515 // tapping probably is that the word you intend to type is not in the dictionary,
517 // word, the user would probably have gestured instead.
617 // Put a blue underline to a word in TextView which will be auto-corrected.
856 // We want to find out whether to start composing a new word with this character. If so,
861 // We only start composing if this is a word code point. Essentially that means it's a
862 // a letter or a word connector.
866 // In languages with spaces, we only start composing a word when we are not already
867 // touching a word. In languages without spaces, the above conditions are sufficient.
870 // Reset entirely the composing state anyway, then start composing a new word unless
871 // the character is a word connector. The idea here is, word connectors are not
873 // position where they should not start composing a word.
875 // Here we don't need to reset the last composed word. It will be reset
877 // it entirely and resume suggestions on the previous word, we'd like to still
987 // then insert a comma and go on to typing the next word, I want the space to be
988 // inserted automatically before the next word, the same way it is when I don't
1089 // We should backspace one char and restart suggestion if at the end of a word.
1279 * Generally, most word characters can be followed by the double-space-to-period transformation,
1379 // suggestions with the new typed word. Exception: if the length of the
1380 // typed word is <= 1 (after a deletion typically) we clear old suggestions.
1399 * Check if the cursor is touching a word. If so, restart suggestions on this word, else
1403 * @param shouldIncludeResumedWordInSuggestions whether to include the word on which we resume
1424 // If the cursor is not touching a word, or if there is a selection, return right away.
1442 // Race condition, or touching a word in a non-supported script.
1482 // We want the previous word for suggestion. If we have chars in the word
1483 // before the cursor, then we want the word before that, hence 2; otherwise,
1484 // we want the word immediately before the cursor, hence 1.
1496 // If there weren't any suggestion spans on this word, suggestions#size() will be 1
1507 // We were able to compute new suggestions for this word.
1508 // Remove the typed word, since we don't want to display it in this
1516 // display the original word alone in the middle.
1517 // Since there is only one word, willAutoCorrect is false.
1524 // We found suggestion spans in the word. We'll create the SuggestedWords out of
1526 // color of the word in the suggestion strip changes according to this parameter,
1560 throw new RuntimeException("revertCommit, but we are composing a word");
1583 // First, add the committed word to the list of suggestions.
1587 // that the word is not the committed word. That should mostly be the case.
1618 // the word, they have to press backspace again.
1628 // with the typed word, so we need to resume suggestions right away.
1655 // We have a separator between the word and the cursor: we should show predictions.
1723 * Get information fo previous words from the nth previous word before the cursor as context
1726 * @param nthPreviousWord reverse index of the word to get (1-indexed)
1734 // word information from textview.
1746 * Tests the passed word for resumability.
1748 * We can resume suggestions on words whose first code point is a word code point (with some
1752 * @param word the word to evaluate.
1753 * @return whether it's fine to resume suggestions on this word.
1755 private static boolean isResumableWord(final SettingsValues settings, final String word) {
1756 final int firstCodePoint = word.codePointAt(0);
1810 * This will clear the composing word, reset the last composed word, clear the suggestion
1835 * @param alsoResetLastComposedWord whether to also reset the last composed word.
1845 * Make a {@link com.android.inputmethod.latin.SuggestedWords} object containing a typed word
1849 * @param typedWord The typed word as a string.
1851 * @return Obsolete suggestions with the newly typed word.
1870 * exactly to whether this word will be auto-corrected to or not: what's important here is
1872 * When we add a new code point to a composing word, we don't know yet if we are going to
1876 * the correct color for this new word. When the suggestions are finished evaluating, we
1955 * Do the final processing after a batch input has ended. This commits the word to the editor.
1972 // Commit except the last word for phrase gesture if the top suggestion is eligible for auto
2000 * This is typically called when we should commit the currently composing word without applying
2026 * the currently composing word. The IME computes suggestions and assigns a confidence score
2033 * strange if pressing space would commit a different word depending on how fast you press).
2061 throw new RuntimeException("We have an auto-correction but the typed word "
2081 * Commits the chosen word to the text field and saves it for later retrieval.
2084 * @param chosenWord the word we want to commit.
2094 // When we are composing word, get previous words information from the 2nd previous word
2095 // because the 1st previous word is the word to be committed. Otherwise get previous words
2096 // information from the 1st previous word.
2100 // Add the word to the user history dictionary
2102 // TODO: figure out here if this is an auto-correct or if the best word is actually
2141 // word in suggestions.
2156 // Get the word on which we should search the bigrams. If we are composing
2157 // a word, it's whatever is *before* the half-committed word in the buffer,
2260 * @param lastComposedWord the last composed word information.