am 11a3965f: Fix a misspelled method name
* commit '11a3965f8c376db4d8fbdf3c6ea6ac54550ae6ed': Fix a misspelled method namemain
commit
f8f1bb2235
|
@ -133,7 +133,7 @@ public class NgramContext {
|
||||||
|
|
||||||
// n is 1-indexed.
|
// n is 1-indexed.
|
||||||
@UsedForTesting
|
@UsedForTesting
|
||||||
public boolean isNthPrevWordBeginningOfSontence(final int n) {
|
public boolean isNthPrevWordBeginningOfSentence(final int n) {
|
||||||
if (n <= 0 || n > mPrevWordsCount) {
|
if (n <= 0 || n > mPrevWordsCount) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class CombinedFormatUtils {
|
||||||
for (int i = 0; i < ngramProperty.mNgramContext.getPrevWordCount(); i++) {
|
for (int i = 0; i < ngramProperty.mNgramContext.getPrevWordCount(); i++) {
|
||||||
builder.append(" " + NGRAM_PREV_WORD_TAG + "[" + i + "]="
|
builder.append(" " + NGRAM_PREV_WORD_TAG + "[" + i + "]="
|
||||||
+ ngramProperty.mNgramContext.getNthPrevWord(i + 1));
|
+ 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("," + BEGINNING_OF_SENTENCE_TAG + "=true");
|
||||||
}
|
}
|
||||||
builder.append("\n");
|
builder.append("\n");
|
||||||
|
|
|
@ -176,7 +176,7 @@ public class RichInputConnectionAndTextRangeTests extends AndroidTestCase {
|
||||||
assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
|
assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
|
||||||
"abc def", mSpacingAndPunctuations, 1).getNthPrevWord(2), "abc");
|
"abc def", mSpacingAndPunctuations, 1).getNthPrevWord(2), "abc");
|
||||||
assertTrue(NgramContextUtils.getNgramContextFromNthPreviousWord(
|
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
|
// The following tests reflect the current behavior of the function
|
||||||
// RichInputConnection#getNthPreviousWord.
|
// RichInputConnection#getNthPreviousWord.
|
||||||
|
|
Loading…
Reference in New Issue