From 11a3965f8c376db4d8fbdf3c6ea6ac54550ae6ed Mon Sep 17 00:00:00 2001 From: Adrian Velicu Date: Tue, 2 Dec 2014 12:53:56 +0900 Subject: [PATCH] Fix a misspelled method name Change-Id: I1151dc1d5db3986a97daf68c1e387dbc2e4610dc --- java/src/com/android/inputmethod/latin/NgramContext.java | 2 +- .../android/inputmethod/latin/utils/CombinedFormatUtils.java | 2 +- .../inputmethod/latin/RichInputConnectionAndTextRangeTests.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/NgramContext.java b/java/src/com/android/inputmethod/latin/NgramContext.java index 82a13274d..b47731229 100644 --- a/java/src/com/android/inputmethod/latin/NgramContext.java +++ b/java/src/com/android/inputmethod/latin/NgramContext.java @@ -133,7 +133,7 @@ public class NgramContext { // n is 1-indexed. @UsedForTesting - public boolean isNthPrevWordBeginningOfSontence(final int n) { + public boolean isNthPrevWordBeginningOfSentence(final int n) { if (n <= 0 || n > mPrevWordsCount) { return false; } diff --git a/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java b/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java index 8699f2ce7..476c13406 100644 --- a/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java @@ -88,7 +88,7 @@ public class CombinedFormatUtils { for (int i = 0; i < ngramProperty.mNgramContext.getPrevWordCount(); i++) { builder.append(" " + NGRAM_PREV_WORD_TAG + "[" + i + "]=" + ngramProperty.mNgramContext.getNthPrevWord(i + 1)); - if (ngramProperty.mNgramContext.isNthPrevWordBeginningOfSontence(i + 1)) { + if (ngramProperty.mNgramContext.isNthPrevWordBeginningOfSentence(i + 1)) { builder.append("," + BEGINNING_OF_SENTENCE_TAG + "=true"); } builder.append("\n"); diff --git a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java index bcf016ae9..8614ccc0e 100644 --- a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java +++ b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java @@ -176,7 +176,7 @@ public class RichInputConnectionAndTextRangeTests extends AndroidTestCase { assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord( "abc def", mSpacingAndPunctuations, 1).getNthPrevWord(2), "abc"); assertTrue(NgramContextUtils.getNgramContextFromNthPreviousWord( - "abc def", mSpacingAndPunctuations, 2).isNthPrevWordBeginningOfSontence(2)); + "abc def", mSpacingAndPunctuations, 2).isNthPrevWordBeginningOfSentence(2)); // The following tests reflect the current behavior of the function // RichInputConnection#getNthPreviousWord.