diff --git a/java/proguard.flags b/java/proguard.flags
index 35b3ac3..0c5ad9f 100644
--- a/java/proguard.flags
+++ b/java/proguard.flags
@@ -19,6 +19,6 @@
 # to preserve changing those methods' signature.
 -keep class com.android.inputmethod.latin.AssetFileAddress
 -keep class com.android.inputmethod.latin.Dictionary
--keep class com.android.inputmethod.latin.PrevWordsInfo
+-keep class com.android.inputmethod.latin.NgramContext
 -keep class com.android.inputmethod.latin.makedict.ProbabilityInfo
 -keep class com.android.inputmethod.latin.utils.LanguageModelParam
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index b164c17..1da33ed 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -255,7 +255,7 @@
 
     @Override
     public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
-            final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
+            final NgramContext ngramContext, final ProximityInfo proximityInfo,
             final SettingsValuesForSuggestion settingsValuesForSuggestion,
             final int sessionId, final float weightForLocale,
             final float[] inOutWeightOfLangModelVsSpatialModel) {
@@ -264,7 +264,7 @@
         }
         final DicTraverseSession session = getTraverseSession(sessionId);
         Arrays.fill(session.mInputCodePoints, Constants.NOT_A_CODE);
-        prevWordsInfo.outputToArray(session.mPrevWordCodePointArrays,
+        ngramContext.outputToArray(session.mPrevWordCodePointArrays,
                 session.mIsBeginningOfSentenceArray);
         final InputPointers inputPointers = composer.getInputPointers();
         final boolean isGesture = composer.isBatchMode();
@@ -299,7 +299,7 @@
                 inputPointers.getYCoordinates(), inputPointers.getTimes(),
                 inputPointers.getPointerIds(), session.mInputCodePoints, inputSize,
                 session.mNativeSuggestOptions.getOptions(), session.mPrevWordCodePointArrays,
-                session.mIsBeginningOfSentenceArray, prevWordsInfo.getPrevWordCount(),
+                session.mIsBeginningOfSentenceArray, ngramContext.getPrevWordCount(),
                 session.mOutputSuggestionCount, session.mOutputCodePoints, session.mOutputScores,
                 session.mSpaceIndices, session.mOutputTypes,
                 session.mOutputAutoCommitFirstWordConfidence,
@@ -357,17 +357,17 @@
     }
 
     @UsedForTesting
-    public boolean isValidNgram(final PrevWordsInfo prevWordsInfo, final String word) {
-        return getNgramProbability(prevWordsInfo, word) != NOT_A_PROBABILITY;
+    public boolean isValidNgram(final NgramContext ngramContext, final String word) {
+        return getNgramProbability(ngramContext, word) != NOT_A_PROBABILITY;
     }
 
-    public int getNgramProbability(final PrevWordsInfo prevWordsInfo, final String word) {
-        if (!prevWordsInfo.isValid() || TextUtils.isEmpty(word)) {
+    public int getNgramProbability(final NgramContext ngramContext, final String word) {
+        if (!ngramContext.isValid() || TextUtils.isEmpty(word)) {
             return NOT_A_PROBABILITY;
         }
-        final int[][] prevWordCodePointArrays = new int[prevWordsInfo.getPrevWordCount()][];
-        final boolean[] isBeginningOfSentenceArray = new boolean[prevWordsInfo.getPrevWordCount()];
-        prevWordsInfo.outputToArray(prevWordCodePointArrays, isBeginningOfSentenceArray);
+        final int[][] prevWordCodePointArrays = new int[ngramContext.getPrevWordCount()][];
+        final boolean[] isBeginningOfSentenceArray = new boolean[ngramContext.getPrevWordCount()];
+        ngramContext.outputToArray(prevWordCodePointArrays, isBeginningOfSentenceArray);
         final int[] wordCodePoints = StringUtils.toCodePointArray(word);
         return getNgramProbabilityNative(mNativeDict, prevWordCodePointArrays,
                 isBeginningOfSentenceArray, wordCodePoints);
@@ -456,14 +456,14 @@
     }
 
     // Add an n-gram entry to the binary dictionary with timestamp in native code.
-    public boolean addNgramEntry(final PrevWordsInfo prevWordsInfo, final String word,
+    public boolean addNgramEntry(final NgramContext ngramContext, final String word,
             final int probability, final int timestamp) {
-        if (!prevWordsInfo.isValid() || TextUtils.isEmpty(word)) {
+        if (!ngramContext.isValid() || TextUtils.isEmpty(word)) {
             return false;
         }
-        final int[][] prevWordCodePointArrays = new int[prevWordsInfo.getPrevWordCount()][];
-        final boolean[] isBeginningOfSentenceArray = new boolean[prevWordsInfo.getPrevWordCount()];
-        prevWordsInfo.outputToArray(prevWordCodePointArrays, isBeginningOfSentenceArray);
+        final int[][] prevWordCodePointArrays = new int[ngramContext.getPrevWordCount()][];
+        final boolean[] isBeginningOfSentenceArray = new boolean[ngramContext.getPrevWordCount()];
+        ngramContext.outputToArray(prevWordCodePointArrays, isBeginningOfSentenceArray);
         final int[] wordCodePoints = StringUtils.toCodePointArray(word);
         if (!addNgramEntryNative(mNativeDict, prevWordCodePointArrays,
                 isBeginningOfSentenceArray, wordCodePoints, probability, timestamp)) {
@@ -474,13 +474,13 @@
     }
 
     // Remove an n-gram entry from the binary dictionary in native code.
-    public boolean removeNgramEntry(final PrevWordsInfo prevWordsInfo, final String word) {
-        if (!prevWordsInfo.isValid() || TextUtils.isEmpty(word)) {
+    public boolean removeNgramEntry(final NgramContext ngramContext, final String word) {
+        if (!ngramContext.isValid() || TextUtils.isEmpty(word)) {
             return false;
         }
-        final int[][] prevWordCodePointArrays = new int[prevWordsInfo.getPrevWordCount()][];
-        final boolean[] isBeginningOfSentenceArray = new boolean[prevWordsInfo.getPrevWordCount()];
-        prevWordsInfo.outputToArray(prevWordCodePointArrays, isBeginningOfSentenceArray);
+        final int[][] prevWordCodePointArrays = new int[ngramContext.getPrevWordCount()][];
+        final boolean[] isBeginningOfSentenceArray = new boolean[ngramContext.getPrevWordCount()];
+        ngramContext.outputToArray(prevWordCodePointArrays, isBeginningOfSentenceArray);
         final int[] wordCodePoints = StringUtils.toCodePointArray(word);
         if (!removeNgramEntryNative(mNativeDict, prevWordCodePointArrays,
                 isBeginningOfSentenceArray, wordCodePoints)) {
diff --git a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
index 162a209..78c6cbd 100644
--- a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
@@ -218,7 +218,7 @@
      */
     private void addNameLocked(final String name) {
         int len = StringUtils.codePointCount(name);
-        PrevWordsInfo prevWordsInfo = PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
+        NgramContext ngramContext = NgramContext.EMPTY_PREV_WORDS_INFO;
         // TODO: Better tokenization for non-Latin writing systems
         for (int i = 0; i < len; i++) {
             if (Character.isLetter(name.codePointAt(i))) {
@@ -233,19 +233,19 @@
                 final int wordLen = StringUtils.codePointCount(word);
                 if (wordLen <= MAX_WORD_LENGTH && wordLen > 1) {
                     if (DEBUG) {
-                        Log.d(TAG, "addName " + name + ", " + word + ", "  + prevWordsInfo);
+                        Log.d(TAG, "addName " + name + ", " + word + ", "  + ngramContext);
                     }
                     runGCIfRequiredLocked(true /* mindsBlockByGC */);
                     addUnigramLocked(word, FREQUENCY_FOR_CONTACTS,
                             null /* shortcut */, 0 /* shortcutFreq */, false /* isNotAWord */,
                             false /* isBlacklisted */, BinaryDictionary.NOT_A_VALID_TIMESTAMP);
-                    if (!prevWordsInfo.isValid() && mUseFirstLastBigrams) {
+                    if (!ngramContext.isValid() && mUseFirstLastBigrams) {
                         runGCIfRequiredLocked(true /* mindsBlockByGC */);
-                        addNgramEntryLocked(prevWordsInfo, word, FREQUENCY_FOR_CONTACTS_BIGRAM,
+                        addNgramEntryLocked(ngramContext, word, FREQUENCY_FOR_CONTACTS_BIGRAM,
                                 BinaryDictionary.NOT_A_VALID_TIMESTAMP);
                     }
-                    prevWordsInfo = prevWordsInfo.getNextPrevWordsInfo(
-                            new PrevWordsInfo.WordInfo(word));
+                    ngramContext = ngramContext.getNextNgramContext(
+                            new NgramContext.WordInfo(word));
                 }
             }
         }
diff --git a/java/src/com/android/inputmethod/latin/Dictionary.java b/java/src/com/android/inputmethod/latin/Dictionary.java
index b58a52b..43561ba 100644
--- a/java/src/com/android/inputmethod/latin/Dictionary.java
+++ b/java/src/com/android/inputmethod/latin/Dictionary.java
@@ -81,10 +81,9 @@
     }
 
     /**
-     * Searches for suggestions for a given context. For the moment the context is only the
-     * previous word.
+     * Searches for suggestions for a given context.
      * @param composer the key sequence to match with coordinate info, as a WordComposer
-     * @param prevWordsInfo the information of previous words.
+     * @param ngramContext the context for n-gram.
      * @param proximityInfo the object for key proximity. May be ignored by some implementations.
      * @param settingsValuesForSuggestion the settings values used for the suggestion.
      * @param sessionId the session id.
@@ -96,7 +95,7 @@
      * @return the list of suggestions (possibly null if none)
      */
     abstract public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
-            final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
+            final NgramContext ngramContext, final ProximityInfo proximityInfo,
             final SettingsValuesForSuggestion settingsValuesForSuggestion,
             final int sessionId, final float weightForLocale,
             final float[] inOutWeightOfLangModelVsSpatialModel);
@@ -191,7 +190,7 @@
 
         @Override
         public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
-                final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
+                final NgramContext ngramContext, final ProximityInfo proximityInfo,
                 final SettingsValuesForSuggestion settingsValuesForSuggestion,
                 final int sessionId, final float weightForLocale,
                 final float[] inOutWeightOfLangModelVsSpatialModel) {
diff --git a/java/src/com/android/inputmethod/latin/DictionaryCollection.java b/java/src/com/android/inputmethod/latin/DictionaryCollection.java
index b26b378..a6d7205 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryCollection.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryCollection.java
@@ -60,7 +60,7 @@
 
     @Override
     public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
-            final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
+            final NgramContext ngramContext, final ProximityInfo proximityInfo,
             final SettingsValuesForSuggestion settingsValuesForSuggestion,
             final int sessionId, final float weightForLocale,
             final float[] inOutWeightOfLangModelVsSpatialModel) {
@@ -69,13 +69,13 @@
         // To avoid creating unnecessary objects, we get the list out of the first
         // dictionary and add the rest to it if not null, hence the get(0)
         ArrayList<SuggestedWordInfo> suggestions = dictionaries.get(0).getSuggestions(composer,
-                prevWordsInfo, proximityInfo, settingsValuesForSuggestion, sessionId,
+                ngramContext, proximityInfo, settingsValuesForSuggestion, sessionId,
                 weightForLocale, inOutWeightOfLangModelVsSpatialModel);
         if (null == suggestions) suggestions = new ArrayList<>();
         final int length = dictionaries.size();
         for (int i = 1; i < length; ++ i) {
             final ArrayList<SuggestedWordInfo> sugg = dictionaries.get(i).getSuggestions(composer,
-                    prevWordsInfo, proximityInfo, settingsValuesForSuggestion, sessionId,
+                    ngramContext, proximityInfo, settingsValuesForSuggestion, sessionId,
                     weightForLocale, inOutWeightOfLangModelVsSpatialModel);
             if (null != sugg) suggestions.addAll(sugg);
         }
diff --git a/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java b/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java
index 1b1162b..6dc1e82 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java
@@ -25,7 +25,7 @@
 import com.android.inputmethod.annotations.UsedForTesting;
 import com.android.inputmethod.keyboard.ProximityInfo;
 import com.android.inputmethod.latin.ExpandableBinaryDictionary.AddMultipleDictionaryEntriesCallback;
-import com.android.inputmethod.latin.PrevWordsInfo.WordInfo;
+import com.android.inputmethod.latin.NgramContext.WordInfo;
 import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
 import com.android.inputmethod.latin.personalization.ContextualDictionary;
 import com.android.inputmethod.latin.personalization.PersonalizationDataChunk;
@@ -509,23 +509,23 @@
     }
 
     public void addToUserHistory(final String suggestion, final boolean wasAutoCapitalized,
-            final PrevWordsInfo prevWordsInfo, final int timeStampInSeconds,
+            final NgramContext ngramContext, final int timeStampInSeconds,
             final boolean blockPotentiallyOffensive) {
         final DictionaryGroup dictionaryGroup = getDictionaryGroupForActiveLanguage();
         final String[] words = suggestion.split(Constants.WORD_SEPARATOR);
-        PrevWordsInfo prevWordsInfoForCurrentWord = prevWordsInfo;
+        NgramContext ngramContextForCurrentWord = ngramContext;
         for (int i = 0; i < words.length; i++) {
             final String currentWord = words[i];
             final boolean wasCurrentWordAutoCapitalized = (i == 0) ? wasAutoCapitalized : false;
-            addWordToUserHistory(dictionaryGroup, prevWordsInfoForCurrentWord, currentWord,
+            addWordToUserHistory(dictionaryGroup, ngramContextForCurrentWord, currentWord,
                     wasCurrentWordAutoCapitalized, timeStampInSeconds, blockPotentiallyOffensive);
-            prevWordsInfoForCurrentWord =
-                    prevWordsInfoForCurrentWord.getNextPrevWordsInfo(new WordInfo(currentWord));
+            ngramContextForCurrentWord =
+                    ngramContextForCurrentWord.getNextNgramContext(new WordInfo(currentWord));
         }
     }
 
     private void addWordToUserHistory(final DictionaryGroup dictionaryGroup,
-            final PrevWordsInfo prevWordsInfo, final String word, final boolean wasAutoCapitalized,
+            final NgramContext ngramContext, final String word, final boolean wasAutoCapitalized,
             final int timeStampInSeconds, final boolean blockPotentiallyOffensive) {
         final ExpandableBinaryDictionary userHistoryDictionary =
                 dictionaryGroup.getSubDict(Dictionary.TYPE_USER_HISTORY);
@@ -571,7 +571,7 @@
         // We demote unrecognized words (frequency < 0, below) by specifying them as "invalid".
         // We don't add words with 0-frequency (assuming they would be profanity etc.).
         final boolean isValid = maxFreq > 0;
-        UserHistoryDictionary.addToDictionary(userHistoryDictionary, prevWordsInfo, secondWord,
+        UserHistoryDictionary.addToDictionary(userHistoryDictionary, ngramContext, secondWord,
                 isValid, timeStampInSeconds,
                 new DistracterFilterCheckingIsInDictionary(
                         mDistracterFilter, userHistoryDictionary));
@@ -593,11 +593,11 @@
 
     // TODO: Revise the way to fusion suggestion results.
     public SuggestionResults getSuggestionResults(final WordComposer composer,
-            final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
+            final NgramContext ngramContext, final ProximityInfo proximityInfo,
             final SettingsValuesForSuggestion settingsValuesForSuggestion, final int sessionId) {
         final DictionaryGroup[] dictionaryGroups = mDictionaryGroups;
         final SuggestionResults suggestionResults = new SuggestionResults(
-                SuggestedWords.MAX_SUGGESTIONS, prevWordsInfo.isBeginningOfSentenceContext());
+                SuggestedWords.MAX_SUGGESTIONS, ngramContext.isBeginningOfSentenceContext());
         final float[] weightOfLangModelVsSpatialModel =
                 new float[] { Dictionary.NOT_A_WEIGHT_OF_LANG_MODEL_VS_SPATIAL_MODEL };
         for (final DictionaryGroup dictionaryGroup : dictionaryGroups) {
@@ -605,7 +605,7 @@
                 final Dictionary dictionary = dictionaryGroup.getDict(dictType);
                 if (null == dictionary) continue;
                 final ArrayList<SuggestedWordInfo> dictionarySuggestions =
-                        dictionary.getSuggestions(composer, prevWordsInfo, proximityInfo,
+                        dictionary.getSuggestions(composer, ngramContext, proximityInfo,
                                 settingsValuesForSuggestion, sessionId,
                                 dictionaryGroup.mWeightForLocale, weightOfLangModelVsSpatialModel);
                 if (null == dictionarySuggestions) continue;
@@ -719,7 +719,7 @@
         if (contextualDict == null) {
             return;
         }
-        PrevWordsInfo prevWordsInfo = PrevWordsInfo.BEGINNING_OF_SENTENCE;
+        NgramContext ngramContext = NgramContext.BEGINNING_OF_SENTENCE;
         for (int i = 0; i < phrase.length; i++) {
             final String[] subPhrase = Arrays.copyOfRange(phrase, i /* start */, phrase.length);
             final String subPhraseStr = TextUtils.join(Constants.WORD_SEPARATOR, subPhrase);
@@ -729,7 +729,7 @@
                     false /* isNotAWord */, false /* isBlacklisted */,
                     BinaryDictionary.NOT_A_VALID_TIMESTAMP,
                     DistracterFilter.EMPTY_DISTRACTER_FILTER);
-            contextualDict.addNgramEntry(prevWordsInfo, subPhraseStr,
+            contextualDict.addNgramEntry(ngramContext, subPhraseStr,
                     bigramProbabilityForPhrases, BinaryDictionary.NOT_A_VALID_TIMESTAMP);
 
             if (i < phrase.length - 1) {
@@ -739,11 +739,11 @@
                         false /* isNotAWord */, false /* isBlacklisted */,
                         BinaryDictionary.NOT_A_VALID_TIMESTAMP,
                         DistracterFilter.EMPTY_DISTRACTER_FILTER);
-                contextualDict.addNgramEntry(prevWordsInfo, phrase[i],
+                contextualDict.addNgramEntry(ngramContext, phrase[i],
                         bigramProbabilityForWords, BinaryDictionary.NOT_A_VALID_TIMESTAMP);
             }
-            prevWordsInfo =
-                    prevWordsInfo.getNextPrevWordsInfo(new PrevWordsInfo.WordInfo(phrase[i]));
+            ngramContext =
+                    ngramContext.getNextNgramContext(new NgramContext.WordInfo(phrase[i]));
         }
     }
 
diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
index 68f2b62..1bdadc3 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
@@ -305,7 +305,7 @@
                     @Override
                     public Boolean call() throws Exception {
                         return !distracterFilter.isDistracterToWordsInDictionaries(
-                                PrevWordsInfo.EMPTY_PREV_WORDS_INFO, word, mLocale);
+                                NgramContext.EMPTY_PREV_WORDS_INFO, word, mLocale);
                     }
                 },
                 new Runnable() {
@@ -354,7 +354,7 @@
     /**
      * Adds n-gram information of a word to the dictionary. May overwrite an existing entry.
      */
-    public void addNgramEntry(final PrevWordsInfo prevWordsInfo, final String word,
+    public void addNgramEntry(final NgramContext ngramContext, final String word,
             final int frequency, final int timestamp) {
         reloadDictionaryIfRequired();
         asyncExecuteTaskWithWriteLock(new Runnable() {
@@ -364,17 +364,17 @@
                     return;
                 }
                 runGCIfRequiredLocked(true /* mindsBlockByGC */);
-                addNgramEntryLocked(prevWordsInfo, word, frequency, timestamp);
+                addNgramEntryLocked(ngramContext, word, frequency, timestamp);
             }
         });
     }
 
-    protected void addNgramEntryLocked(final PrevWordsInfo prevWordsInfo, final String word,
+    protected void addNgramEntryLocked(final NgramContext ngramContext, final String word,
             final int frequency, final int timestamp) {
-        if (!mBinaryDictionary.addNgramEntry(prevWordsInfo, word, frequency, timestamp)) {
+        if (!mBinaryDictionary.addNgramEntry(ngramContext, word, frequency, timestamp)) {
             if (DEBUG) {
                 Log.i(TAG, "Cannot add n-gram entry.");
-                Log.i(TAG, "  PrevWordsInfo: " + prevWordsInfo + ", word: " + word);
+                Log.i(TAG, "  NgramContext: " + ngramContext + ", word: " + word);
             }
         }
     }
@@ -383,7 +383,7 @@
      * Dynamically remove the n-gram entry in the dictionary.
      */
     @UsedForTesting
-    public void removeNgramDynamically(final PrevWordsInfo prevWordsInfo, final String word) {
+    public void removeNgramDynamically(final NgramContext ngramContext, final String word) {
         reloadDictionaryIfRequired();
         asyncExecuteTaskWithWriteLock(new Runnable() {
             @Override
@@ -392,10 +392,10 @@
                     return;
                 }
                 runGCIfRequiredLocked(true /* mindsBlockByGC */);
-                if (!mBinaryDictionary.removeNgramEntry(prevWordsInfo, word)) {
+                if (!mBinaryDictionary.removeNgramEntry(ngramContext, word)) {
                     if (DEBUG) {
                         Log.i(TAG, "Cannot remove n-gram entry.");
-                        Log.i(TAG, "  PrevWordsInfo: " + prevWordsInfo + ", word: " + word);
+                        Log.i(TAG, "  NgramContext: " + ngramContext + ", word: " + word);
                     }
                 }
             }
@@ -434,7 +434,7 @@
 
     @Override
     public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
-            final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
+            final NgramContext ngramContext, final ProximityInfo proximityInfo,
             final SettingsValuesForSuggestion settingsValuesForSuggestion, final int sessionId,
             final float weightForLocale, final float[] inOutWeightOfLangModelVsSpatialModel) {
         reloadDictionaryIfRequired();
@@ -447,7 +447,7 @@
                     return null;
                 }
                 final ArrayList<SuggestedWordInfo> suggestions =
-                        mBinaryDictionary.getSuggestions(composer, prevWordsInfo, proximityInfo,
+                        mBinaryDictionary.getSuggestions(composer, ngramContext, proximityInfo,
                                 settingsValuesForSuggestion, sessionId, weightForLocale,
                                 inOutWeightOfLangModelVsSpatialModel);
                 if (mBinaryDictionary.isCorrupted()) {
@@ -519,9 +519,9 @@
     }
 
 
-    protected boolean isValidNgramLocked(final PrevWordsInfo prevWordsInfo, final String word) {
+    protected boolean isValidNgramLocked(final NgramContext ngramContext, final String word) {
         if (mBinaryDictionary == null) return false;
-        return mBinaryDictionary.isValidNgram(prevWordsInfo, word);
+        return mBinaryDictionary.isValidNgram(ngramContext, word);
     }
 
     /**
diff --git a/java/src/com/android/inputmethod/latin/LastComposedWord.java b/java/src/com/android/inputmethod/latin/LastComposedWord.java
index 8cbf837..f3f736f 100644
--- a/java/src/com/android/inputmethod/latin/LastComposedWord.java
+++ b/java/src/com/android/inputmethod/latin/LastComposedWord.java
@@ -48,7 +48,7 @@
     public final String mTypedWord;
     public final CharSequence mCommittedWord;
     public final String mSeparatorString;
-    public final PrevWordsInfo mPrevWordsInfo;
+    public final NgramContext mNgramContext;
     public final int mCapitalizedMode;
     public final InputPointers mInputPointers =
             new InputPointers(Constants.DICTIONARY_MAX_WORD_LENGTH);
@@ -64,7 +64,7 @@
     public LastComposedWord(final ArrayList<Event> events,
             final InputPointers inputPointers, final String typedWord,
             final CharSequence committedWord, final String separatorString,
-            final PrevWordsInfo prevWordsInfo, final int capitalizedMode) {
+            final NgramContext ngramContext, final int capitalizedMode) {
         if (inputPointers != null) {
             mInputPointers.copy(inputPointers);
         }
@@ -73,7 +73,7 @@
         mCommittedWord = committedWord;
         mSeparatorString = separatorString;
         mActive = true;
-        mPrevWordsInfo = prevWordsInfo;
+        mNgramContext = ngramContext;
         mCapitalizedMode = capitalizedMode;
     }
 
diff --git a/java/src/com/android/inputmethod/latin/PrevWordsInfo.java b/java/src/com/android/inputmethod/latin/NgramContext.java
similarity index 87%
rename from java/src/com/android/inputmethod/latin/PrevWordsInfo.java
rename to java/src/com/android/inputmethod/latin/NgramContext.java
index 1ef1bbb..c35c6e2 100644
--- a/java/src/com/android/inputmethod/latin/PrevWordsInfo.java
+++ b/java/src/com/android/inputmethod/latin/NgramContext.java
@@ -27,11 +27,11 @@
  * Class to represent information of previous words. This class is used to add n-gram entries
  * into binary dictionaries, to get predictions, and to get suggestions.
  */
-public class PrevWordsInfo {
-    public static final PrevWordsInfo EMPTY_PREV_WORDS_INFO =
-            new PrevWordsInfo(WordInfo.EMPTY_WORD_INFO);
-    public static final PrevWordsInfo BEGINNING_OF_SENTENCE =
-            new PrevWordsInfo(WordInfo.BEGINNING_OF_SENTENCE);
+public class NgramContext {
+    public static final NgramContext EMPTY_PREV_WORDS_INFO =
+            new NgramContext(WordInfo.EMPTY_WORD_INFO);
+    public static final NgramContext BEGINNING_OF_SENTENCE =
+            new NgramContext(WordInfo.BEGINNING_OF_SENTENCE);
 
     /**
      * Word information used to represent previous words information.
@@ -91,31 +91,31 @@
     private final int mPrevWordsCount;
 
     // Construct from the previous word information.
-    public PrevWordsInfo(final WordInfo... prevWordsInfo) {
+    public NgramContext(final WordInfo... prevWordsInfo) {
         mPrevWordsInfo = prevWordsInfo;
         mPrevWordsCount = prevWordsInfo.length;
     }
 
     // Construct from WordInfo array and size. The caller shouldn't change prevWordsInfo after
     // calling this method.
-    private PrevWordsInfo(final PrevWordsInfo prevWordsInfo, final int prevWordsCount) {
-        if (prevWordsInfo.mPrevWordsCount < prevWordsCount) {
-            throw new IndexOutOfBoundsException("prevWordsInfo.mPrevWordsCount ("
-                    + prevWordsInfo.mPrevWordsCount + ") is smaller than prevWordsCount ("
+    private NgramContext(final NgramContext ngramContext, final int prevWordsCount) {
+        if (ngramContext.mPrevWordsCount < prevWordsCount) {
+            throw new IndexOutOfBoundsException("ngramContext.mPrevWordsCount ("
+                    + ngramContext.mPrevWordsCount + ") is smaller than prevWordsCount ("
                     + prevWordsCount + ")");
         }
-        mPrevWordsInfo = prevWordsInfo.mPrevWordsInfo;
+        mPrevWordsInfo = ngramContext.mPrevWordsInfo;
         mPrevWordsCount = prevWordsCount;
     }
 
     // Create next prevWordsInfo using current prevWordsInfo.
-    public PrevWordsInfo getNextPrevWordsInfo(final WordInfo wordInfo) {
+    public NgramContext getNextNgramContext(final WordInfo wordInfo) {
         final int nextPrevWordCount = Math.min(Constants.MAX_PREV_WORD_COUNT_FOR_N_GRAM,
                 mPrevWordsCount + 1);
         final WordInfo[] prevWordsInfo = new WordInfo[nextPrevWordCount];
         prevWordsInfo[0] = wordInfo;
         System.arraycopy(mPrevWordsInfo, 0, prevWordsInfo, 1, nextPrevWordCount - 1);
-        return new PrevWordsInfo(prevWordsInfo);
+        return new NgramContext(prevWordsInfo);
     }
 
     public boolean isValid() {
@@ -158,9 +158,9 @@
         }
     }
 
-    public PrevWordsInfo getTrimmedPrevWordsInfo(final int maxPrevWordCount) {
+    public NgramContext getTrimmedNgramContext(final int maxPrevWordCount) {
         final int newSize = Math.min(maxPrevWordCount, mPrevWordsCount);
-        return new PrevWordsInfo(this /* prevWordsInfo */, newSize);
+        return new NgramContext(this /* prevWordsInfo */, newSize);
     }
 
     public int getPrevWordCount() {
@@ -176,8 +176,8 @@
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
-        if (!(o instanceof PrevWordsInfo)) return false;
-        final PrevWordsInfo prevWordsInfo = (PrevWordsInfo)o;
+        if (!(o instanceof NgramContext)) return false;
+        final NgramContext prevWordsInfo = (NgramContext)o;
 
         final int minLength = Math.min(mPrevWordsCount, prevWordsInfo.mPrevWordsCount);
         for (int i = 0; i < minLength; i++) {
diff --git a/java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java
index 827367b..bc8bd83 100644
--- a/java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java
@@ -51,13 +51,13 @@
 
     @Override
     public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
-            final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
+            final NgramContext ngramContext, final ProximityInfo proximityInfo,
             final SettingsValuesForSuggestion settingsValuesForSuggestion,
             final int sessionId, final float weightForLocale,
             final float[] inOutWeightOfLangModelVsSpatialModel) {
         if (mLock.readLock().tryLock()) {
             try {
-                return mBinaryDictionary.getSuggestions(composer, prevWordsInfo, proximityInfo,
+                return mBinaryDictionary.getSuggestions(composer, ngramContext, proximityInfo,
                         settingsValuesForSuggestion, sessionId, weightForLocale,
                         inOutWeightOfLangModelVsSpatialModel);
             } finally {
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index d672430..7507061 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -36,7 +36,7 @@
 import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
 import com.android.inputmethod.latin.utils.CapsModeUtils;
 import com.android.inputmethod.latin.utils.DebugLogUtils;
-import com.android.inputmethod.latin.utils.PrevWordsInfoUtils;
+import com.android.inputmethod.latin.utils.NgramContextUtils;
 import com.android.inputmethod.latin.utils.ScriptUtils;
 import com.android.inputmethod.latin.utils.SpannableStringUtils;
 import com.android.inputmethod.latin.utils.StringUtils;
@@ -593,11 +593,11 @@
     }
 
     @SuppressWarnings("unused")
-    public PrevWordsInfo getPrevWordsInfoFromNthPreviousWord(
+    public NgramContext getNgramContextFromNthPreviousWord(
             final SpacingAndPunctuations spacingAndPunctuations, final int n) {
         mIC = mParent.getCurrentInputConnection();
         if (null == mIC) {
-            return PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
+            return NgramContext.EMPTY_PREV_WORDS_INFO;
         }
         final CharSequence prev = getTextBeforeCursor(LOOKBACK_CHARACTER_NUM, 0);
         if (DEBUG_PREVIOUS_TEXT && null != prev) {
@@ -618,7 +618,7 @@
                 }
             }
         }
-        return PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        return NgramContextUtils.getNgramContextFromNthPreviousWord(
                 prev, spacingAndPunctuations, n);
     }
 
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 1ecc995..d2d9b9b 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -68,15 +68,15 @@
     }
 
     public void getSuggestedWords(final WordComposer wordComposer,
-            final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
+            final NgramContext ngramContext, final ProximityInfo proximityInfo,
             final SettingsValuesForSuggestion settingsValuesForSuggestion,
             final boolean isCorrectionEnabled, final int inputStyle, final int sequenceNumber,
             final OnGetSuggestedWordsCallback callback) {
         if (wordComposer.isBatchMode()) {
-            getSuggestedWordsForBatchInput(wordComposer, prevWordsInfo, proximityInfo,
+            getSuggestedWordsForBatchInput(wordComposer, ngramContext, proximityInfo,
                     settingsValuesForSuggestion, inputStyle, sequenceNumber, callback);
         } else {
-            getSuggestedWordsForNonBatchInput(wordComposer, prevWordsInfo, proximityInfo,
+            getSuggestedWordsForNonBatchInput(wordComposer, ngramContext, proximityInfo,
                     settingsValuesForSuggestion, inputStyle, isCorrectionEnabled,
                     sequenceNumber, callback);
         }
@@ -121,7 +121,7 @@
     // Retrieves suggestions for non-batch input (typing, recorrection, predictions...)
     // and calls the callback function with the suggestions.
     private void getSuggestedWordsForNonBatchInput(final WordComposer wordComposer,
-            final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
+            final NgramContext ngramContext, final ProximityInfo proximityInfo,
             final SettingsValuesForSuggestion settingsValuesForSuggestion,
             final int inputStyleIfNotPrediction, final boolean isCorrectionEnabled,
             final int sequenceNumber, final OnGetSuggestedWordsCallback callback) {
@@ -132,7 +132,7 @@
                 : typedWord;
 
         final SuggestionResults suggestionResults = mDictionaryFacilitator.getSuggestionResults(
-                wordComposer, prevWordsInfo, proximityInfo, settingsValuesForSuggestion,
+                wordComposer, ngramContext, proximityInfo, settingsValuesForSuggestion,
                 SESSION_ID_TYPING);
         final ArrayList<SuggestedWordInfo> suggestionsContainer =
                 getTransformedSuggestedWordInfoList(wordComposer, suggestionResults,
@@ -209,12 +209,12 @@
     // Retrieves suggestions for the batch input
     // and calls the callback function with the suggestions.
     private void getSuggestedWordsForBatchInput(final WordComposer wordComposer,
-            final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo,
+            final NgramContext ngramContext, final ProximityInfo proximityInfo,
             final SettingsValuesForSuggestion settingsValuesForSuggestion,
             final int inputStyle, final int sequenceNumber,
             final OnGetSuggestedWordsCallback callback) {
         final SuggestionResults suggestionResults = mDictionaryFacilitator.getSuggestionResults(
-                wordComposer, prevWordsInfo, proximityInfo, settingsValuesForSuggestion,
+                wordComposer, ngramContext, proximityInfo, settingsValuesForSuggestion,
                 SESSION_ID_GESTURE);
         final Locale defaultLocale = mDictionaryFacilitator.getLocale();
         final ArrayList<SuggestedWordInfo> suggestionsContainer =
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index 567aa07..f85b34b 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -448,13 +448,13 @@
     // `type' should be one of the LastComposedWord.COMMIT_TYPE_* constants above.
     // committedWord should contain suggestion spans if applicable.
     public LastComposedWord commitWord(final int type, final CharSequence committedWord,
-            final String separatorString, final PrevWordsInfo prevWordsInfo) {
+            final String separatorString, final NgramContext ngramContext) {
         // Note: currently, we come here whenever we commit a word. If it's a MANUAL_PICK
         // or a DECIDED_WORD we may cancel the commit later; otherwise, we should deactivate
         // the last composed word to ensure this does not happen.
         final LastComposedWord lastComposedWord = new LastComposedWord(mEvents,
                 mInputPointers, mTypedWordCache.toString(), committedWord, separatorString,
-                prevWordsInfo, mCapitalizedMode);
+                ngramContext, mCapitalizedMode);
         mInputPointers.reset();
         if (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD
                 && type != LastComposedWord.COMMIT_TYPE_MANUAL_PICK) {
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 46427e5..27af161 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -45,7 +45,7 @@
 import com.android.inputmethod.latin.InputPointers;
 import com.android.inputmethod.latin.LastComposedWord;
 import com.android.inputmethod.latin.LatinIME;
-import com.android.inputmethod.latin.PrevWordsInfo;
+import com.android.inputmethod.latin.NgramContext;
 import com.android.inputmethod.latin.RichInputConnection;
 import com.android.inputmethod.latin.Suggest;
 import com.android.inputmethod.latin.Suggest.OnGetSuggestedWordsCallback;
@@ -1376,7 +1376,7 @@
     }
 
     private void performAdditionToUserHistoryDictionary(final SettingsValues settingsValues,
-            final String suggestion, final PrevWordsInfo prevWordsInfo) {
+            final String suggestion, final NgramContext ngramContext) {
         // If correction is not enabled, we don't add words to the user history dictionary.
         // That's to avoid unintended additions in some sensitive fields, or fields that
         // expect to receive non-words.
@@ -1388,7 +1388,7 @@
         final int timeStampInSeconds = (int)TimeUnit.MILLISECONDS.toSeconds(
                 System.currentTimeMillis());
         mDictionaryFacilitator.addToUserHistory(suggestion, wasAutoCapitalized,
-                prevWordsInfo, timeStampInSeconds, settingsValues.mBlockPotentiallyOffensive);
+                ngramContext, timeStampInSeconds, settingsValues.mBlockPotentiallyOffensive);
     }
 
     public void performUpdateSuggestionStripSync(final SettingsValues settingsValues,
@@ -1519,10 +1519,10 @@
             }
         }
         final int[] codePoints = StringUtils.toCodePointArray(typedWord);
-        // We want the previous word for suggestion. If we have chars in the word
+        // We want the context of preceding words for suggestion. If we have chars in the word
         // before the cursor, then we want the word before that, hence 2; otherwise,
         // we want the word immediately before the cursor, hence 1.
-        final PrevWordsInfo prevWordsInfo = getPrevWordsInfoFromNthPreviousWordForSuggestion(
+        final NgramContext ngramContext = getNgramContextFromNthPreviousWordForSuggestion(
                 settingsValues.mSpacingAndPunctuations,
                 0 == numberOfCharsInWordBeforeCursor ? 1 : 2);
         mWordComposer.setComposingWord(codePoints,
@@ -1760,24 +1760,24 @@
     }
 
     /**
-     * Get information fo previous words from the nth previous word before the cursor as context
+     * Get n-gram context from the nth previous word before the cursor as context
      * for the suggestion process.
      * @param spacingAndPunctuations the current spacing and punctuations settings.
      * @param nthPreviousWord reverse index of the word to get (1-indexed)
      * @return the information of previous words
      */
     // TODO: Make this private
-    public PrevWordsInfo getPrevWordsInfoFromNthPreviousWordForSuggestion(
+    public NgramContext getNgramContextFromNthPreviousWordForSuggestion(
             final SpacingAndPunctuations spacingAndPunctuations, final int nthPreviousWord) {
         if (spacingAndPunctuations.mCurrentLanguageHasSpaces) {
             // If we are typing in a language with spaces we can just look up the previous
             // word information from textview.
-            return mConnection.getPrevWordsInfoFromNthPreviousWord(
+            return mConnection.getNgramContextFromNthPreviousWord(
                     spacingAndPunctuations, nthPreviousWord);
         } else {
             return LastComposedWord.NOT_A_COMPOSED_WORD == mLastComposedWord ?
-                    PrevWordsInfo.BEGINNING_OF_SENTENCE :
-                            new PrevWordsInfo(new PrevWordsInfo.WordInfo(
+                    NgramContext.BEGINNING_OF_SENTENCE :
+                            new NgramContext(new NgramContext.WordInfo(
                                     mLastComposedWord.mCommittedWord.toString()));
         }
     }
@@ -2140,20 +2140,20 @@
         final CharSequence chosenWordWithSuggestions =
                 SuggestionSpanUtils.getTextWithSuggestionSpan(mLatinIME, chosenWord,
                         suggestedWords);
-        // When we are composing word, get previous words information from the 2nd previous word
-        // because the 1st previous word is the word to be committed. Otherwise get previous words
-        // information from the 1st previous word.
-        final PrevWordsInfo prevWordsInfo = mConnection.getPrevWordsInfoFromNthPreviousWord(
+        // When we are composing word, get n-gram context from the 2nd previous word because the
+        // 1st previous word is the word to be committed. Otherwise get n-gram context from the 1st
+        // previous word.
+        final NgramContext ngramContext = mConnection.getNgramContextFromNthPreviousWord(
                 settingsValues.mSpacingAndPunctuations, mWordComposer.isComposingWord() ? 2 : 1);
         mConnection.commitText(chosenWordWithSuggestions, 1);
         // Add the word to the user history dictionary
-        performAdditionToUserHistoryDictionary(settingsValues, chosenWord, prevWordsInfo);
+        performAdditionToUserHistoryDictionary(settingsValues, chosenWord, ngramContext);
         // TODO: figure out here if this is an auto-correct or if the best word is actually
         // what user typed. Note: currently this is done much later in
         // LastComposedWord#didCommitTypedWord by string equality of the remembered
         // strings.
         mLastComposedWord = mWordComposer.commitWord(commitType,
-                chosenWordWithSuggestions, separatorString, prevWordsInfo);
+                chosenWordWithSuggestions, separatorString, ngramContext);
     }
 
     /**
@@ -2200,7 +2200,7 @@
         mWordComposer.adviseCapitalizedModeBeforeFetchingSuggestions(
                 getActualCapsMode(settingsValues, keyboardShiftMode));
         mSuggest.getSuggestedWords(mWordComposer,
-                getPrevWordsInfoFromNthPreviousWordForSuggestion(
+                getNgramContextFromNthPreviousWordForSuggestion(
                         settingsValues.mSpacingAndPunctuations,
                         // Get the word on which we should search the bigrams. If we are composing
                         // a word, it's whatever is *before* the half-committed word in the buffer,
diff --git a/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java b/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java
index 121c89e..d616846 100644
--- a/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java
@@ -23,7 +23,7 @@
 import com.android.inputmethod.latin.Constants;
 import com.android.inputmethod.latin.Dictionary;
 import com.android.inputmethod.latin.ExpandableBinaryDictionary;
-import com.android.inputmethod.latin.PrevWordsInfo;
+import com.android.inputmethod.latin.NgramContext;
 import com.android.inputmethod.latin.utils.DistracterFilter;
 
 import java.io.File;
@@ -53,14 +53,14 @@
      * Add a word to the user history dictionary.
      *
      * @param userHistoryDictionary the user history dictionary
-     * @param prevWordsInfo the information of previous words
+     * @param ngramContext the n-gram context
      * @param word the word the user inputted
      * @param isValid whether the word is valid or not
      * @param timestamp the timestamp when the word has been inputted
      * @param distracterFilter the filter to check whether the word is a distracter
      */
     public static void addToDictionary(final ExpandableBinaryDictionary userHistoryDictionary,
-            final PrevWordsInfo prevWordsInfo, final String word, final boolean isValid,
+            final NgramContext ngramContext, final String word, final boolean isValid,
             final int timestamp, final DistracterFilter distracterFilter) {
         if (word.length() > Constants.DICTIONARY_MAX_WORD_LENGTH) {
             return;
@@ -71,11 +71,11 @@
                 null /* shortcutTarget */, 0 /* shortcutFreq */, false /* isNotAWord */,
                 false /* isBlacklisted */, timestamp, distracterFilter);
 
-        final boolean isBeginningOfSentenceContext = prevWordsInfo.isBeginningOfSentenceContext();
-        final PrevWordsInfo prevWordsInfoToBeSaved =
-                prevWordsInfo.getTrimmedPrevWordsInfo(SUPPORTED_NGRAM - 1);
-        for (int i = 0; i < prevWordsInfoToBeSaved.getPrevWordCount(); i++) {
-            final CharSequence prevWord = prevWordsInfoToBeSaved.getNthPrevWord(1 /* n */);
+        final boolean isBeginningOfSentenceContext = ngramContext.isBeginningOfSentenceContext();
+        final NgramContext ngramContextToBeSaved =
+                ngramContext.getTrimmedNgramContext(SUPPORTED_NGRAM - 1);
+        for (int i = 0; i < ngramContextToBeSaved.getPrevWordCount(); i++) {
+            final CharSequence prevWord = ngramContextToBeSaved.getNthPrevWord(1 /* n */);
             if (prevWord == null || (prevWord.length() > Constants.DICTIONARY_MAX_WORD_LENGTH)) {
                 return;
             }
@@ -86,11 +86,11 @@
             if (isBeginningOfSentenceContext) {
                 // Beginning-of-Sentence n-gram entry is added as an n-gram entry of an OOV word.
                 userHistoryDictionary.addNgramEntry(
-                        prevWordsInfoToBeSaved.getTrimmedPrevWordsInfo(i + 1), word,
+                        ngramContextToBeSaved.getTrimmedNgramContext(i + 1), word,
                         FREQUENCY_FOR_WORDS_NOT_IN_DICTS, timestamp);
             } else {
                 userHistoryDictionary.addNgramEntry(
-                        prevWordsInfoToBeSaved.getTrimmedPrevWordsInfo(i + 1), word, frequency,
+                        ngramContextToBeSaved.getTrimmedNgramContext(i + 1), word, frequency,
                         timestamp);
             }
         }
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
index 3523916..2a4e14c 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -31,7 +31,7 @@
 import com.android.inputmethod.keyboard.ProximityInfo;
 import com.android.inputmethod.latin.DictionaryFacilitator;
 import com.android.inputmethod.latin.DictionaryFacilitatorLruCache;
-import com.android.inputmethod.latin.PrevWordsInfo;
+import com.android.inputmethod.latin.NgramContext;
 import com.android.inputmethod.latin.R;
 import com.android.inputmethod.latin.RichInputMethodSubtype;
 import com.android.inputmethod.latin.settings.SettingsValuesForSuggestion;
@@ -163,14 +163,14 @@
     }
 
     public SuggestionResults getSuggestionResults(final Locale locale, final WordComposer composer,
-            final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo) {
+            final NgramContext ngramContext, final ProximityInfo proximityInfo) {
         Integer sessionId = null;
         mSemaphore.acquireUninterruptibly();
         try {
             sessionId = mSessionIdPool.poll();
             DictionaryFacilitator dictionaryFacilitatorForLocale =
                     mDictionaryFacilitatorCache.get(locale);
-            return dictionaryFacilitatorForLocale.getSuggestionResults(composer, prevWordsInfo,
+            return dictionaryFacilitatorForLocale.getSuggestionResults(composer, ngramContext,
                     proximityInfo, mSettingsValuesForSuggestion, sessionId);
         } finally {
             if (sessionId != null) {
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerSession.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerSession.java
index 34e0119..8393b30 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerSession.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerSession.java
@@ -25,7 +25,7 @@
 import android.view.textservice.TextInfo;
 
 import com.android.inputmethod.compat.TextInfoCompatUtils;
-import com.android.inputmethod.latin.PrevWordsInfo;
+import com.android.inputmethod.latin.NgramContext;
 import com.android.inputmethod.latin.utils.StringUtils;
 
 import java.util.ArrayList;
@@ -62,8 +62,8 @@
             final int offset = ssi.getOffsetAt(i);
             final int length = ssi.getLengthAt(i);
             final CharSequence subText = typedText.subSequence(offset, offset + length);
-            final PrevWordsInfo prevWordsInfo =
-                    new PrevWordsInfo(new PrevWordsInfo.WordInfo(currentWord));
+            final NgramContext ngramContext =
+                    new NgramContext(new NgramContext.WordInfo(currentWord));
             currentWord = subText;
             if (!subText.toString().contains(AndroidSpellCheckerService.SINGLE_QUOTE)) {
                 continue;
@@ -80,7 +80,7 @@
                 if (TextUtils.isEmpty(splitText)) {
                     continue;
                 }
-                if (mSuggestionsCache.getSuggestionsFromCache(splitText.toString(), prevWordsInfo)
+                if (mSuggestionsCache.getSuggestionsFromCache(splitText.toString(), ngramContext)
                         == null) {
                     continue;
                 }
@@ -208,10 +208,10 @@
                 } else {
                     prevWord = null;
                 }
-                final PrevWordsInfo prevWordsInfo =
-                        new PrevWordsInfo(new PrevWordsInfo.WordInfo(prevWord));
+                final NgramContext ngramContext =
+                        new NgramContext(new NgramContext.WordInfo(prevWord));
                 final TextInfo textInfo = textInfos[i];
-                retval[i] = onGetSuggestionsInternal(textInfo, prevWordsInfo, suggestionsLimit);
+                retval[i] = onGetSuggestionsInternal(textInfo, ngramContext, suggestionsLimit);
                 retval[i].setCookieAndSequence(textInfo.getCookie(), textInfo.getSequence());
             }
             return retval;
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java
index d668672..7b6aacd 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java
@@ -31,7 +31,7 @@
 import com.android.inputmethod.keyboard.Keyboard;
 import com.android.inputmethod.keyboard.ProximityInfo;
 import com.android.inputmethod.latin.Constants;
-import com.android.inputmethod.latin.PrevWordsInfo;
+import com.android.inputmethod.latin.NgramContext;
 import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
 import com.android.inputmethod.latin.WordComposer;
 import com.android.inputmethod.latin.utils.BinaryDictionaryUtils;
@@ -73,27 +73,25 @@
         private final LruCache<String, SuggestionsParams> mUnigramSuggestionsInfoCache =
                 new LruCache<>(MAX_CACHE_SIZE);
 
-        // TODO: Support n-gram input
-        private static String generateKey(final String query, final PrevWordsInfo prevWordsInfo) {
-            if (TextUtils.isEmpty(query) || !prevWordsInfo.isValid()) {
+        private static String generateKey(final String query, final NgramContext ngramContext) {
+            if (TextUtils.isEmpty(query) || !ngramContext.isValid()) {
                 return query;
             }
-            return query + CHAR_DELIMITER + prevWordsInfo;
+            return query + CHAR_DELIMITER + ngramContext;
         }
 
         public SuggestionsParams getSuggestionsFromCache(String query,
-                final PrevWordsInfo prevWordsInfo) {
-            return mUnigramSuggestionsInfoCache.get(generateKey(query, prevWordsInfo));
+                final NgramContext ngramContext) {
+            return mUnigramSuggestionsInfoCache.get(generateKey(query, ngramContext));
         }
 
-        public void putSuggestionsToCache(
-                final String query, final PrevWordsInfo prevWordsInfo,
+        public void putSuggestionsToCache(final String query, final NgramContext ngramContext,
                 final String[] suggestions, final int flags) {
             if (suggestions == null || TextUtils.isEmpty(query)) {
                 return;
             }
             mUnigramSuggestionsInfoCache.put(
-                    generateKey(query, prevWordsInfo), new SuggestionsParams(suggestions, flags));
+                    generateKey(query, ngramContext), new SuggestionsParams(suggestions, flags));
         }
 
         public void clearCache() {
@@ -223,12 +221,11 @@
     }
 
     protected SuggestionsInfo onGetSuggestionsInternal(
-            final TextInfo textInfo, final PrevWordsInfo prevWordsInfo,
-            final int suggestionsLimit) {
+            final TextInfo textInfo, final NgramContext ngramContext, final int suggestionsLimit) {
         try {
             final String inText = textInfo.getText();
             final SuggestionsParams cachedSuggestionsParams =
-                    mSuggestionsCache.getSuggestionsFromCache(inText, prevWordsInfo);
+                    mSuggestionsCache.getSuggestionsFromCache(inText, ngramContext);
             if (cachedSuggestionsParams != null) {
                 if (DBG) {
                     Log.d(TAG, "Cache hit: " + inText + ", " + cachedSuggestionsParams.mFlags);
@@ -283,7 +280,7 @@
             composer.setComposingWord(codePoints, coordinates);
             // TODO: Don't gather suggestions if the limit is <= 0 unless necessary
             final SuggestionResults suggestionResults = mService.getSuggestionResults(
-                    mLocale, composer, prevWordsInfo, proximityInfo);
+                    mLocale, composer, ngramContext, proximityInfo);
             final Result result = getResult(capitalizeType, mLocale, suggestionsLimit,
                     mService.getRecommendedThreshold(), text, suggestionResults);
             isInDict = isInDictForAnyCapitalization(text, capitalizeType);
@@ -308,7 +305,7 @@
                                     .getValueOf_RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS()
                             : 0);
             final SuggestionsInfo retval = new SuggestionsInfo(flags, result.mSuggestions);
-            mSuggestionsCache.putSuggestionsToCache(text, prevWordsInfo, result.mSuggestions,
+            mSuggestionsCache.putSuggestionsToCache(text, ngramContext, result.mSuggestions,
                     flags);
             return retval;
         } catch (RuntimeException e) {
diff --git a/java/src/com/android/inputmethod/latin/utils/DistracterFilter.java b/java/src/com/android/inputmethod/latin/utils/DistracterFilter.java
index 6fd241e..355d00d 100644
--- a/java/src/com/android/inputmethod/latin/utils/DistracterFilter.java
+++ b/java/src/com/android/inputmethod/latin/utils/DistracterFilter.java
@@ -22,23 +22,23 @@
 import android.view.inputmethod.InputMethodSubtype;
 
 import com.android.inputmethod.annotations.UsedForTesting;
-import com.android.inputmethod.latin.PrevWordsInfo;
+import com.android.inputmethod.latin.NgramContext;
 
 public interface DistracterFilter {
     /**
      * Determine whether a word is a distracter to words in dictionaries.
      *
-     * @param prevWordsInfo the information of previous words.
+     * @param ngramContext the n-gram context
      * @param testedWord the word that will be tested to see whether it is a distracter to words
      *                   in dictionaries.
      * @param locale the locale of word.
      * @return true if testedWord is a distracter, otherwise false.
      */
-    public boolean isDistracterToWordsInDictionaries(final PrevWordsInfo prevWordsInfo,
+    public boolean isDistracterToWordsInDictionaries(final NgramContext ngramContext,
             final String testedWord, final Locale locale);
 
     @UsedForTesting
-    public int getWordHandlingType(final PrevWordsInfo prevWordsInfo, final String testedWord,
+    public int getWordHandlingType(final NgramContext ngramContext, final String testedWord,
             final Locale locale);
 
     public void updateEnabledSubtypes(final List<InputMethodSubtype> enabledSubtypes);
@@ -72,13 +72,13 @@
 
     public static final DistracterFilter EMPTY_DISTRACTER_FILTER = new DistracterFilter() {
         @Override
-        public boolean isDistracterToWordsInDictionaries(PrevWordsInfo prevWordsInfo,
+        public boolean isDistracterToWordsInDictionaries(NgramContext ngramContext,
                 String testedWord, Locale locale) {
             return false;
         }
 
         @Override
-        public int getWordHandlingType(final PrevWordsInfo prevWordsInfo,
+        public int getWordHandlingType(final NgramContext ngramContext,
                 final String testedWord, final Locale locale) {
             return HandlingType.REQUIRE_NO_SPECIAL_HANDLINGS;
         }
diff --git a/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java b/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java
index f8a8453..8f0f9bb 100644
--- a/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java
+++ b/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java
@@ -36,7 +36,7 @@
 import com.android.inputmethod.keyboard.KeyboardLayoutSet;
 import com.android.inputmethod.latin.DictionaryFacilitator;
 import com.android.inputmethod.latin.DictionaryFacilitatorLruCache;
-import com.android.inputmethod.latin.PrevWordsInfo;
+import com.android.inputmethod.latin.NgramContext;
 import com.android.inputmethod.latin.RichInputMethodSubtype;
 import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
 import com.android.inputmethod.latin.WordComposer;
@@ -156,14 +156,14 @@
     /**
      * Determine whether a word is a distracter to words in dictionaries.
      *
-     * @param prevWordsInfo the information of previous words. Not used for now.
+     * @param ngramContext the n-gram context. Not used for now.
      * @param testedWord the word that will be tested to see whether it is a distracter to words
      *                   in dictionaries.
      * @param locale the locale of word.
      * @return true if testedWord is a distracter, otherwise false.
      */
     @Override
-    public boolean isDistracterToWordsInDictionaries(final PrevWordsInfo prevWordsInfo,
+    public boolean isDistracterToWordsInDictionaries(final NgramContext ngramContext,
             final String testedWord, final Locale locale) {
         if (locale == null) {
             return false;
@@ -250,7 +250,7 @@
         final SuggestionResults suggestionResults;
         synchronized (mLock) {
             suggestionResults = dictionaryFacilitator.getSuggestionResults(
-                    composer, PrevWordsInfo.EMPTY_PREV_WORDS_INFO, keyboard.getProximityInfo(),
+                    composer, NgramContext.EMPTY_PREV_WORDS_INFO, keyboard.getProximityInfo(),
                     settingsValuesForSuggestion, 0 /* sessionId */);
         }
         if (suggestionResults.isEmpty()) {
@@ -283,7 +283,7 @@
         return false;
     }
 
-    private boolean shouldBeLowerCased(final PrevWordsInfo prevWordsInfo, final String testedWord,
+    private boolean shouldBeLowerCased(final NgramContext ngramContext, final String testedWord,
             final Locale locale) {
         final DictionaryFacilitator dictionaryFacilitator =
                 mDictionaryFacilitatorLruCache.get(locale);
@@ -298,7 +298,7 @@
             return true;
         }
         if (StringUtils.getCapitalizationType(testedWord) == StringUtils.CAPITALIZE_FIRST
-                && !prevWordsInfo.isValid()) {
+                && !ngramContext.isValid()) {
             // TODO: Check beginning-of-sentence.
             return true;
         }
@@ -306,13 +306,13 @@
     }
 
     @Override
-    public int getWordHandlingType(final PrevWordsInfo prevWordsInfo, final String testedWord,
+    public int getWordHandlingType(final NgramContext ngramContext, final String testedWord,
             final Locale locale) {
         // TODO: Use this method for user history dictionary.
         if (testedWord == null|| locale == null) {
             return HandlingType.getHandlingType(false /* shouldBeLowerCased */, false /* isOov */);
         }
-        final boolean shouldBeLowerCased = shouldBeLowerCased(prevWordsInfo, testedWord, locale);
+        final boolean shouldBeLowerCased = shouldBeLowerCased(ngramContext, testedWord, locale);
         final String caseModifiedWord =
                 shouldBeLowerCased ? testedWord.toLowerCase(locale) : testedWord;
         final boolean isOov = !mDictionaryFacilitatorLruCache.get(locale).isValidWord(
diff --git a/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingIsInDictionary.java b/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingIsInDictionary.java
index 349236f..df6e970 100644
--- a/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingIsInDictionary.java
+++ b/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingIsInDictionary.java
@@ -22,7 +22,7 @@
 import android.view.inputmethod.InputMethodSubtype;
 
 import com.android.inputmethod.latin.Dictionary;
-import com.android.inputmethod.latin.PrevWordsInfo;
+import com.android.inputmethod.latin.NgramContext;
 
 public class DistracterFilterCheckingIsInDictionary implements DistracterFilter {
     private final DistracterFilter mDistracterFilter;
@@ -35,7 +35,7 @@
     }
 
     @Override
-    public boolean isDistracterToWordsInDictionaries(PrevWordsInfo prevWordsInfo,
+    public boolean isDistracterToWordsInDictionaries(NgramContext ngramContext,
             String testedWord, Locale locale) {
         if (mDictionary.isInDictionary(testedWord)) {
             // This filter treats entries that are already in the dictionary as non-distracters
@@ -43,14 +43,14 @@
             return false;
         } else {
             return mDistracterFilter.isDistracterToWordsInDictionaries(
-                    prevWordsInfo, testedWord, locale);
+                    ngramContext, testedWord, locale);
         }
     }
 
     @Override
-    public int getWordHandlingType(final PrevWordsInfo prevWordsInfo, final String testedWord,
+    public int getWordHandlingType(final NgramContext ngramContext, final String testedWord,
             final Locale locale) {
-        return mDistracterFilter.getWordHandlingType(prevWordsInfo, testedWord, locale);
+        return mDistracterFilter.getWordHandlingType(ngramContext, testedWord, locale);
     }
 
     @Override
diff --git a/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java b/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java
index be92807..73aefb8 100644
--- a/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java
+++ b/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java
@@ -21,7 +21,7 @@
 import com.android.inputmethod.annotations.UsedForTesting;
 import com.android.inputmethod.latin.Dictionary;
 import com.android.inputmethod.latin.DictionaryFacilitator;
-import com.android.inputmethod.latin.PrevWordsInfo;
+import com.android.inputmethod.latin.NgramContext;
 import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
 import com.android.inputmethod.latin.utils.DistracterFilter.HandlingType;
 
@@ -89,7 +89,7 @@
             final DistracterFilter distracterFilter) {
         final ArrayList<LanguageModelParam> languageModelParams = new ArrayList<>();
         final int N = tokens.size();
-        PrevWordsInfo prevWordsInfo = PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
+        NgramContext ngramContext = NgramContext.EMPTY_PREV_WORDS_INFO;
         for (int i = 0; i < N; ++i) {
             final String tempWord = tokens.get(i);
             if (StringUtils.isEmptyStringOrWhiteSpaces(tempWord)) {
@@ -106,7 +106,7 @@
                             + tempWord + "\"");
                 }
                 // Sentence terminator found. Split.
-                prevWordsInfo = PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
+                ngramContext = NgramContext.EMPTY_PREV_WORDS_INFO;
                 continue;
             }
             if (DEBUG_TOKEN) {
@@ -114,41 +114,41 @@
             }
             final LanguageModelParam languageModelParam =
                     detectWhetherVaildWordOrNotAndGetLanguageModelParam(
-                            prevWordsInfo, tempWord, timestamp, locale, distracterFilter);
+                            ngramContext, tempWord, timestamp, locale, distracterFilter);
             if (languageModelParam == null) {
                 continue;
             }
             languageModelParams.add(languageModelParam);
-            prevWordsInfo = prevWordsInfo.getNextPrevWordsInfo(
-                    new PrevWordsInfo.WordInfo(tempWord));
+            ngramContext = ngramContext.getNextNgramContext(
+                    new NgramContext.WordInfo(tempWord));
         }
         return languageModelParams;
     }
 
     private static LanguageModelParam detectWhetherVaildWordOrNotAndGetLanguageModelParam(
-            final PrevWordsInfo prevWordsInfo, final String targetWord, final int timestamp,
+            final NgramContext ngramContext, final String targetWord, final int timestamp,
             final Locale locale, final DistracterFilter distracterFilter) {
         if (locale == null) {
             return null;
         }
-        final int wordHandlingType = distracterFilter.getWordHandlingType(prevWordsInfo,
+        final int wordHandlingType = distracterFilter.getWordHandlingType(ngramContext,
                 targetWord, locale);
         final String word = HandlingType.shouldBeLowerCased(wordHandlingType) ?
                 targetWord.toLowerCase(locale) : targetWord;
-        if (distracterFilter.isDistracterToWordsInDictionaries(prevWordsInfo, targetWord, locale)) {
+        if (distracterFilter.isDistracterToWordsInDictionaries(ngramContext, targetWord, locale)) {
             // The word is a distracter.
             return null;
         }
-        return createAndGetLanguageModelParamOfWord(prevWordsInfo, word, timestamp,
+        return createAndGetLanguageModelParamOfWord(ngramContext, word, timestamp,
                 !HandlingType.shouldBeHandledAsOov(wordHandlingType));
     }
 
     private static LanguageModelParam createAndGetLanguageModelParamOfWord(
-            final PrevWordsInfo prevWordsInfo, final String word, final int timestamp,
+            final NgramContext ngramContext, final String word, final int timestamp,
             final boolean isValidWord) {
         final int unigramProbability = isValidWord ?
                 UNIGRAM_PROBABILITY_FOR_VALID_WORD : UNIGRAM_PROBABILITY_FOR_OOV_WORD;
-        if (!prevWordsInfo.isValid()) {
+        if (!ngramContext.isValid()) {
             if (DEBUG) {
                 Log.d(TAG, "--- add unigram: current("
                         + (isValidWord ? "Valid" : "OOV") + ") = " + word);
@@ -156,12 +156,12 @@
             return new LanguageModelParam(word, unigramProbability, timestamp);
         }
         if (DEBUG) {
-            Log.d(TAG, "--- add bigram: prev = " + prevWordsInfo + ", current("
+            Log.d(TAG, "--- add bigram: prev = " + ngramContext + ", current("
                     + (isValidWord ? "Valid" : "OOV") + ") = " + word);
         }
         final int bigramProbability = isValidWord ?
                 BIGRAM_PROBABILITY_FOR_VALID_WORD : BIGRAM_PROBABILITY_FOR_OOV_WORD;
-        return new LanguageModelParam(prevWordsInfo.getNthPrevWord(1 /* n */), word,
+        return new LanguageModelParam(ngramContext.getNthPrevWord(1 /* n */), word,
                 unigramProbability, bigramProbability, timestamp);
     }
 }
diff --git a/java/src/com/android/inputmethod/latin/utils/PrevWordsInfoUtils.java b/java/src/com/android/inputmethod/latin/utils/NgramContextUtils.java
similarity index 90%
rename from java/src/com/android/inputmethod/latin/utils/PrevWordsInfoUtils.java
rename to java/src/com/android/inputmethod/latin/utils/NgramContextUtils.java
index 5720d93..34eeac2 100644
--- a/java/src/com/android/inputmethod/latin/utils/PrevWordsInfoUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/NgramContextUtils.java
@@ -20,12 +20,12 @@
 import java.util.regex.Pattern;
 
 import com.android.inputmethod.latin.Constants;
-import com.android.inputmethod.latin.PrevWordsInfo;
-import com.android.inputmethod.latin.PrevWordsInfo.WordInfo;
+import com.android.inputmethod.latin.NgramContext;
+import com.android.inputmethod.latin.NgramContext.WordInfo;
 import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
 
-public final class PrevWordsInfoUtils {
-    private PrevWordsInfoUtils() {
+public final class NgramContextUtils {
+    private NgramContextUtils() {
         // Intentional empty constructor for utility class.
     }
 
@@ -44,7 +44,7 @@
     // (n = 2) "abc def|" -> beginning-of-sentence, abc
     // (n = 2) "abc def |" -> beginning-of-sentence, abc
     // (n = 2) "abc 'def|" -> empty. The context is different from "abc def", but we cannot
-    // represent this situation using PrevWordsInfo. See TODO in the method.
+    // represent this situation using NgramContext. See TODO in the method.
     // TODO: The next example's result should be "abc, def". This have to be fixed before we
     // retrieve the prior context of Beginning-of-Sentence.
     // (n = 2) "abc def. |" -> beginning-of-sentence, abc
@@ -52,9 +52,9 @@
     // (n = 2) "abc|" -> beginning-of-sentence
     // (n = 2) "abc |" -> beginning-of-sentence
     // (n = 2) "abc. def|" -> beginning-of-sentence
-    public static PrevWordsInfo getPrevWordsInfoFromNthPreviousWord(final CharSequence prev,
+    public static NgramContext getNgramContextFromNthPreviousWord(final CharSequence prev,
             final SpacingAndPunctuations spacingAndPunctuations, final int n) {
-        if (prev == null) return PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
+        if (prev == null) return NgramContext.EMPTY_PREV_WORDS_INFO;
         final String[] w = SPACE_REGEX.split(prev);
         final WordInfo[] prevWordsInfo = new WordInfo[Constants.MAX_PREV_WORD_COUNT_FOR_N_GRAM];
         Arrays.fill(prevWordsInfo, WordInfo.EMPTY_WORD_INFO);
@@ -98,6 +98,6 @@
             }
             prevWordsInfo[i] = new WordInfo(focusedWord);
         }
-        return new PrevWordsInfo(prevWordsInfo);
+        return new NgramContext(prevWordsInfo);
     }
 }
diff --git a/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java b/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java
index d6f6442..4e2e396 100644
--- a/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java
+++ b/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java
@@ -31,7 +31,7 @@
 public final class SuggestionResults extends TreeSet<SuggestedWordInfo> {
     public final ArrayList<SuggestedWordInfo> mRawSuggestions;
     // TODO: Instead of a boolean , we may want to include the context of this suggestion results,
-    // such as {@link PrevWordsInfo}.
+    // such as {@link NgramContext}.
     public final boolean mIsBeginningOfSentence;
     private final int mCapacity;
 
diff --git a/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java b/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java
index f3bbe4a..8d5d6cc 100644
--- a/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java
+++ b/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java
@@ -20,7 +20,7 @@
 import android.test.suitebuilder.annotation.LargeTest;
 import android.util.Pair;
 
-import com.android.inputmethod.latin.PrevWordsInfo.WordInfo;
+import com.android.inputmethod.latin.NgramContext.WordInfo;
 import com.android.inputmethod.latin.makedict.BinaryDictIOUtils;
 import com.android.inputmethod.latin.makedict.CodePointUtils;
 import com.android.inputmethod.latin.makedict.DictDecoder;
@@ -78,13 +78,13 @@
 
     private void addBigramWords(final BinaryDictionary binaryDictionary, final String word0,
             final String word1, final int probability) {
-        binaryDictionary.addNgramEntry(new PrevWordsInfo(new WordInfo(word0)), word1, probability,
+        binaryDictionary.addNgramEntry(new NgramContext(new WordInfo(word0)), word1, probability,
                 mCurrentTime /* timestamp */);
     }
 
     private static boolean isValidBigram(final BinaryDictionary binaryDictionary,
             final String word0, final String word1) {
-        return binaryDictionary.isValidNgram(new PrevWordsInfo(new WordInfo(word0)), word1);
+        return binaryDictionary.isValidNgram(new NgramContext(new WordInfo(word0)), word1);
     }
 
     private void forcePassingShortTime(final BinaryDictionary binaryDictionary) {
@@ -661,31 +661,31 @@
                 BinaryDictionary.NOT_A_PROBABILITY /* shortcutProbability */,
                 true /* isBeginningOfSentence */, true /* isNotAWord */, false /* isBlacklisted */,
                 mCurrentTime);
-        final PrevWordsInfo prevWordsInfoStartOfSentence = PrevWordsInfo.BEGINNING_OF_SENTENCE;
+        final NgramContext beginningOfSentenceContext = NgramContext.BEGINNING_OF_SENTENCE;
         addUnigramWord(binaryDictionary, "aaa", DUMMY_PROBABILITY);
-        binaryDictionary.addNgramEntry(prevWordsInfoStartOfSentence, "aaa", DUMMY_PROBABILITY,
+        binaryDictionary.addNgramEntry(beginningOfSentenceContext, "aaa", DUMMY_PROBABILITY,
                 mCurrentTime);
-        assertTrue(binaryDictionary.isValidNgram(prevWordsInfoStartOfSentence, "aaa"));
-        binaryDictionary.addNgramEntry(prevWordsInfoStartOfSentence, "aaa", DUMMY_PROBABILITY,
+        assertTrue(binaryDictionary.isValidNgram(beginningOfSentenceContext, "aaa"));
+        binaryDictionary.addNgramEntry(beginningOfSentenceContext, "aaa", DUMMY_PROBABILITY,
                 mCurrentTime);
         addUnigramWord(binaryDictionary, "bbb", DUMMY_PROBABILITY);
-        binaryDictionary.addNgramEntry(prevWordsInfoStartOfSentence, "bbb", DUMMY_PROBABILITY,
+        binaryDictionary.addNgramEntry(beginningOfSentenceContext, "bbb", DUMMY_PROBABILITY,
                 mCurrentTime);
-        assertTrue(binaryDictionary.isValidNgram(prevWordsInfoStartOfSentence, "aaa"));
-        assertTrue(binaryDictionary.isValidNgram(prevWordsInfoStartOfSentence, "bbb"));
+        assertTrue(binaryDictionary.isValidNgram(beginningOfSentenceContext, "aaa"));
+        assertTrue(binaryDictionary.isValidNgram(beginningOfSentenceContext, "bbb"));
 
         forcePassingLongTime(binaryDictionary);
-        assertFalse(binaryDictionary.isValidNgram(prevWordsInfoStartOfSentence, "aaa"));
-        assertFalse(binaryDictionary.isValidNgram(prevWordsInfoStartOfSentence, "bbb"));
+        assertFalse(binaryDictionary.isValidNgram(beginningOfSentenceContext, "aaa"));
+        assertFalse(binaryDictionary.isValidNgram(beginningOfSentenceContext, "bbb"));
 
         addUnigramWord(binaryDictionary, "aaa", DUMMY_PROBABILITY);
-        binaryDictionary.addNgramEntry(prevWordsInfoStartOfSentence, "aaa", DUMMY_PROBABILITY,
+        binaryDictionary.addNgramEntry(beginningOfSentenceContext, "aaa", DUMMY_PROBABILITY,
                 mCurrentTime);
         addUnigramWord(binaryDictionary, "bbb", DUMMY_PROBABILITY);
-        binaryDictionary.addNgramEntry(prevWordsInfoStartOfSentence, "bbb", DUMMY_PROBABILITY,
+        binaryDictionary.addNgramEntry(beginningOfSentenceContext, "bbb", DUMMY_PROBABILITY,
                 mCurrentTime);
-        assertTrue(binaryDictionary.isValidNgram(prevWordsInfoStartOfSentence, "aaa"));
-        assertTrue(binaryDictionary.isValidNgram(prevWordsInfoStartOfSentence, "bbb"));
+        assertTrue(binaryDictionary.isValidNgram(beginningOfSentenceContext, "aaa"));
+        assertTrue(binaryDictionary.isValidNgram(beginningOfSentenceContext, "bbb"));
         binaryDictionary.close();
         dictFile.delete();
     }
diff --git a/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java b/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
index 4025744..e6f00b6 100644
--- a/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
+++ b/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
@@ -21,7 +21,7 @@
 import android.text.TextUtils;
 import android.util.Pair;
 
-import com.android.inputmethod.latin.PrevWordsInfo.WordInfo;
+import com.android.inputmethod.latin.NgramContext.WordInfo;
 import com.android.inputmethod.latin.makedict.CodePointUtils;
 import com.android.inputmethod.latin.makedict.FormatSpec;
 import com.android.inputmethod.latin.makedict.WeightedString;
@@ -208,45 +208,45 @@
 
     private static void addBigramWords(final BinaryDictionary binaryDictionary, final String word0,
             final String word1, final int probability) {
-        binaryDictionary.addNgramEntry(new PrevWordsInfo(new WordInfo(word0)), word1, probability,
+        binaryDictionary.addNgramEntry(new NgramContext(new WordInfo(word0)), word1, probability,
                 BinaryDictionary.NOT_A_VALID_TIMESTAMP /* timestamp */);
     }
 
     private static void addTrigramEntry(final BinaryDictionary binaryDictionary, final String word0,
             final String word1, final String word2, final int probability) {
-        final PrevWordsInfo prevWordsInfo =
-                new PrevWordsInfo(new WordInfo[] { new WordInfo(word1), new WordInfo(word0) } );
-        binaryDictionary.addNgramEntry(prevWordsInfo, word2, probability,
+        final NgramContext ngramContext =
+                new NgramContext(new WordInfo[] { new WordInfo(word1), new WordInfo(word0) } );
+        binaryDictionary.addNgramEntry(ngramContext, word2, probability,
                 BinaryDictionary.NOT_A_VALID_TIMESTAMP /* timestamp */);
     }
 
     private static boolean isValidBigram(final BinaryDictionary binaryDictionary,
             final String word0, final String word1) {
-        return binaryDictionary.isValidNgram(new PrevWordsInfo(new WordInfo(word0)), word1);
+        return binaryDictionary.isValidNgram(new NgramContext(new WordInfo(word0)), word1);
     }
 
     private static void removeBigramEntry(final BinaryDictionary binaryDictionary,
             final String word0, final String word1) {
-        binaryDictionary.removeNgramEntry(new PrevWordsInfo(new WordInfo(word0)), word1);
+        binaryDictionary.removeNgramEntry(new NgramContext(new WordInfo(word0)), word1);
     }
 
     private static void removeTrigramEntry(final BinaryDictionary binaryDictionary,
             final String word0, final String word1, final String word2) {
-        final PrevWordsInfo prevWordsInfo =
-                new PrevWordsInfo(new WordInfo[] { new WordInfo(word1), new WordInfo(word0) } );
-        binaryDictionary.removeNgramEntry(prevWordsInfo, word2);
+        final NgramContext ngramContext =
+                new NgramContext(new WordInfo[] { new WordInfo(word1), new WordInfo(word0) } );
+        binaryDictionary.removeNgramEntry(ngramContext, word2);
     }
 
     private static int getBigramProbability(final BinaryDictionary binaryDictionary,
             final String word0,  final String word1) {
-        return binaryDictionary.getNgramProbability(new PrevWordsInfo(new WordInfo(word0)), word1);
+        return binaryDictionary.getNgramProbability(new NgramContext(new WordInfo(word0)), word1);
     }
 
     private static int getTrigramProbability(final BinaryDictionary binaryDictionary,
             final String word0, final String word1, final String word2) {
-        final PrevWordsInfo prevWordsInfo =
-                new PrevWordsInfo(new WordInfo[] { new WordInfo(word1), new WordInfo(word0) } );
-        return binaryDictionary.getNgramProbability(prevWordsInfo, word2);
+        final NgramContext ngramContext =
+                new NgramContext(new WordInfo[] { new WordInfo(word1), new WordInfo(word0) } );
+        return binaryDictionary.getNgramProbability(ngramContext, word2);
     }
 
     public void testAddUnigramWord() {
@@ -1422,7 +1422,7 @@
         binaryDictionary.addUnigramEntry("ddd", unigramProbability, null /* shortcutTarget */,
                 Dictionary.NOT_A_PROBABILITY, false /* isBeginningOfSentence */,
                 true /* isNotAWord */, true /* isBlacklisted */, 0 /* timestamp */);
-        binaryDictionary.addNgramEntry(PrevWordsInfo.BEGINNING_OF_SENTENCE,
+        binaryDictionary.addNgramEntry(NgramContext.BEGINNING_OF_SENTENCE,
                 "aaa", bigramProbability, 0 /* timestamp */);
         assertEquals(unigramProbability, binaryDictionary.getFrequency("aaa"));
         assertEquals(unigramProbability, binaryDictionary.getFrequency("bbb"));
@@ -1436,7 +1436,7 @@
         if (canCheckBigramProbability(toFormatVersion)) {
             assertEquals(bigramProbability, getBigramProbability(binaryDictionary, "aaa", "bbb"));
             assertEquals(bigramProbability, binaryDictionary.getNgramProbability(
-                    PrevWordsInfo.BEGINNING_OF_SENTENCE, "aaa"));
+                    NgramContext.BEGINNING_OF_SENTENCE, "aaa"));
         }
         assertTrue(isValidBigram(binaryDictionary, "aaa", "bbb"));
         WordProperty wordProperty = binaryDictionary.getWordProperty("ccc",
@@ -1546,23 +1546,23 @@
                 0 /* offset */, dictFile.length(), true /* useFullEditDistance */,
                 Locale.getDefault(), TEST_LOCALE, true /* isUpdatable */);
         final int dummyProbability = 0;
-        final PrevWordsInfo prevWordsInfoBeginningOfSentence = PrevWordsInfo.BEGINNING_OF_SENTENCE;
+        final NgramContext beginningOfSentenceContext = NgramContext.BEGINNING_OF_SENTENCE;
         final int bigramProbability = 200;
         addUnigramWord(binaryDictionary, "aaa", dummyProbability);
-        binaryDictionary.addNgramEntry(prevWordsInfoBeginningOfSentence, "aaa", bigramProbability,
+        binaryDictionary.addNgramEntry(beginningOfSentenceContext, "aaa", bigramProbability,
                 BinaryDictionary.NOT_A_VALID_TIMESTAMP /* timestamp */);
         assertEquals(bigramProbability,
-                binaryDictionary.getNgramProbability(prevWordsInfoBeginningOfSentence, "aaa"));
-        binaryDictionary.addNgramEntry(prevWordsInfoBeginningOfSentence, "aaa", bigramProbability,
+                binaryDictionary.getNgramProbability(beginningOfSentenceContext, "aaa"));
+        binaryDictionary.addNgramEntry(beginningOfSentenceContext, "aaa", bigramProbability,
                 BinaryDictionary.NOT_A_VALID_TIMESTAMP /* timestamp */);
         addUnigramWord(binaryDictionary, "bbb", dummyProbability);
-        binaryDictionary.addNgramEntry(prevWordsInfoBeginningOfSentence, "bbb", bigramProbability,
+        binaryDictionary.addNgramEntry(beginningOfSentenceContext, "bbb", bigramProbability,
                 BinaryDictionary.NOT_A_VALID_TIMESTAMP /* timestamp */);
         binaryDictionary.flushWithGC();
         assertEquals(bigramProbability,
-                binaryDictionary.getNgramProbability(prevWordsInfoBeginningOfSentence, "aaa"));
+                binaryDictionary.getNgramProbability(beginningOfSentenceContext, "aaa"));
         assertEquals(bigramProbability,
-                binaryDictionary.getNgramProbability(prevWordsInfoBeginningOfSentence, "bbb"));
+                binaryDictionary.getNgramProbability(beginningOfSentenceContext, "bbb"));
     }
 
     public void testGetMaxFrequencyOfExactMatches() {
diff --git a/tests/src/com/android/inputmethod/latin/NgramContextTests.java b/tests/src/com/android/inputmethod/latin/NgramContextTests.java
new file mode 100644
index 0000000..ecc2c63
--- /dev/null
+++ b/tests/src/com/android/inputmethod/latin/NgramContextTests.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.latin;
+
+import com.android.inputmethod.latin.NgramContext.WordInfo;
+
+import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
+
+@SmallTest
+public class NgramContextTests extends AndroidTestCase {
+    public void testConstruct() {
+        assertEquals(new NgramContext(new WordInfo("a")), new NgramContext(new WordInfo("a")));
+        assertEquals(new NgramContext(WordInfo.BEGINNING_OF_SENTENCE),
+                new NgramContext(WordInfo.BEGINNING_OF_SENTENCE));
+        assertEquals(new NgramContext(WordInfo.EMPTY_WORD_INFO),
+                new NgramContext(WordInfo.EMPTY_WORD_INFO));
+        assertEquals(new NgramContext(WordInfo.EMPTY_WORD_INFO),
+                new NgramContext(WordInfo.EMPTY_WORD_INFO));
+    }
+
+    public void testIsBeginningOfSentenceContext() {
+        assertFalse(new NgramContext().isBeginningOfSentenceContext());
+        assertTrue(new NgramContext(WordInfo.BEGINNING_OF_SENTENCE)
+                .isBeginningOfSentenceContext());
+        assertTrue(NgramContext.BEGINNING_OF_SENTENCE.isBeginningOfSentenceContext());
+        assertFalse(new NgramContext(new WordInfo("a")).isBeginningOfSentenceContext());
+        assertFalse(new NgramContext(new WordInfo("")).isBeginningOfSentenceContext());
+        assertFalse(new NgramContext(WordInfo.EMPTY_WORD_INFO).isBeginningOfSentenceContext());
+        assertTrue(new NgramContext(WordInfo.BEGINNING_OF_SENTENCE, new WordInfo("a"))
+                .isBeginningOfSentenceContext());
+        assertFalse(new NgramContext(new WordInfo("a"), WordInfo.BEGINNING_OF_SENTENCE)
+                .isBeginningOfSentenceContext());
+        assertFalse(new NgramContext(WordInfo.EMPTY_WORD_INFO, WordInfo.BEGINNING_OF_SENTENCE)
+                .isBeginningOfSentenceContext());
+    }
+
+    public void testGetNextNgramContext() {
+        final NgramContext ngramContext_a = new NgramContext(new WordInfo("a"));
+        final NgramContext ngramContext_b_a =
+                ngramContext_a.getNextNgramContext(new WordInfo("b"));
+        assertEquals("b", ngramContext_b_a.getNthPrevWord(1));
+        assertEquals("a", ngramContext_b_a.getNthPrevWord(2));
+        final NgramContext ngramContext_bos_b =
+                ngramContext_b_a.getNextNgramContext(WordInfo.BEGINNING_OF_SENTENCE);
+        assertTrue(ngramContext_bos_b.isBeginningOfSentenceContext());
+        assertEquals("b", ngramContext_bos_b.getNthPrevWord(2));
+        final NgramContext ngramContext_c_bos =
+                ngramContext_b_a.getNextNgramContext(new WordInfo("c"));
+        assertEquals("c", ngramContext_c_bos.getNthPrevWord(1));
+    }
+}
diff --git a/tests/src/com/android/inputmethod/latin/PrevWordsInfoTests.java b/tests/src/com/android/inputmethod/latin/PrevWordsInfoTests.java
deleted file mode 100644
index c571d98..0000000
--- a/tests/src/com/android/inputmethod/latin/PrevWordsInfoTests.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.inputmethod.latin;
-
-import com.android.inputmethod.latin.PrevWordsInfo.WordInfo;
-
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-
-@SmallTest
-public class PrevWordsInfoTests extends AndroidTestCase {
-    public void testConstruct() {
-        assertEquals(new PrevWordsInfo(new WordInfo("a")), new PrevWordsInfo(new WordInfo("a")));
-        assertEquals(new PrevWordsInfo(WordInfo.BEGINNING_OF_SENTENCE),
-                new PrevWordsInfo(WordInfo.BEGINNING_OF_SENTENCE));
-        assertEquals(new PrevWordsInfo(WordInfo.EMPTY_WORD_INFO),
-                new PrevWordsInfo(WordInfo.EMPTY_WORD_INFO));
-        assertEquals(new PrevWordsInfo(WordInfo.EMPTY_WORD_INFO),
-                new PrevWordsInfo(WordInfo.EMPTY_WORD_INFO));
-    }
-
-    public void testIsBeginningOfSentenceContext() {
-        assertFalse(new PrevWordsInfo().isBeginningOfSentenceContext());
-        assertTrue(new PrevWordsInfo(WordInfo.BEGINNING_OF_SENTENCE)
-                .isBeginningOfSentenceContext());
-        assertTrue(PrevWordsInfo.BEGINNING_OF_SENTENCE.isBeginningOfSentenceContext());
-        assertFalse(new PrevWordsInfo(new WordInfo("a")).isBeginningOfSentenceContext());
-        assertFalse(new PrevWordsInfo(new WordInfo("")).isBeginningOfSentenceContext());
-        assertFalse(new PrevWordsInfo(WordInfo.EMPTY_WORD_INFO).isBeginningOfSentenceContext());
-        assertTrue(new PrevWordsInfo(WordInfo.BEGINNING_OF_SENTENCE, new WordInfo("a"))
-                .isBeginningOfSentenceContext());
-        assertFalse(new PrevWordsInfo(new WordInfo("a"), WordInfo.BEGINNING_OF_SENTENCE)
-                .isBeginningOfSentenceContext());
-        assertFalse(new PrevWordsInfo(WordInfo.EMPTY_WORD_INFO, WordInfo.BEGINNING_OF_SENTENCE)
-                .isBeginningOfSentenceContext());
-    }
-
-    public void testGetNextPrevWordsInfo() {
-        final PrevWordsInfo prevWordsInfo_a = new PrevWordsInfo(new WordInfo("a"));
-        final PrevWordsInfo prevWordsInfo_b_a =
-                prevWordsInfo_a.getNextPrevWordsInfo(new WordInfo("b"));
-        assertEquals("b", prevWordsInfo_b_a.getNthPrevWord(1));
-        assertEquals("a", prevWordsInfo_b_a.getNthPrevWord(2));
-        final PrevWordsInfo prevWordsInfo_bos_b =
-                prevWordsInfo_b_a.getNextPrevWordsInfo(WordInfo.BEGINNING_OF_SENTENCE);
-        assertTrue(prevWordsInfo_bos_b.isBeginningOfSentenceContext());
-        assertEquals("b", prevWordsInfo_bos_b.getNthPrevWord(2));
-        final PrevWordsInfo prevWordsInfo_c_bos =
-                prevWordsInfo_b_a.getNextPrevWordsInfo(new WordInfo("c"));
-        assertEquals("c", prevWordsInfo_c_bos.getNthPrevWord(1));
-    }
-}
diff --git a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java
index 2712dc2..7a32336 100644
--- a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java
+++ b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java
@@ -31,7 +31,7 @@
 import android.view.inputmethod.InputConnectionWrapper;
 
 import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
-import com.android.inputmethod.latin.utils.PrevWordsInfoUtils;
+import com.android.inputmethod.latin.utils.NgramContextUtils;
 import com.android.inputmethod.latin.utils.RunInLocale;
 import com.android.inputmethod.latin.utils.ScriptUtils;
 import com.android.inputmethod.latin.utils.StringUtils;
@@ -157,24 +157,24 @@
      */
     public void testGetPreviousWord() {
         // If one of the following cases breaks, the bigram suggestions won't work.
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc def", mSpacingAndPunctuations, 2).getNthPrevWord(1), "abc");
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
-                "abc", mSpacingAndPunctuations, 2), PrevWordsInfo.BEGINNING_OF_SENTENCE);
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
-                "abc. def", mSpacingAndPunctuations, 2), PrevWordsInfo.BEGINNING_OF_SENTENCE);
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
+                "abc", mSpacingAndPunctuations, 2), NgramContext.BEGINNING_OF_SENTENCE);
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
+                "abc. def", mSpacingAndPunctuations, 2), NgramContext.BEGINNING_OF_SENTENCE);
 
-        assertFalse(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertFalse(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc def", mSpacingAndPunctuations, 2).isBeginningOfSentenceContext());
-        assertTrue(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertTrue(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc", mSpacingAndPunctuations, 2).isBeginningOfSentenceContext());
 
         // For n-gram
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc def", mSpacingAndPunctuations, 1).getNthPrevWord(1), "def");
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc def", mSpacingAndPunctuations, 1).getNthPrevWord(2), "abc");
-        assertTrue(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertTrue(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc def", mSpacingAndPunctuations, 2).isNthPrevWordBeginningOfSontence(2));
 
         // The following tests reflect the current behavior of the function
@@ -184,33 +184,33 @@
         // this function if needed - especially since it does not seem very
         // logical. These tests are just there to catch any unintentional
         // changes in the behavior of the RichInputConnection#getPreviousWord method.
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc def ", mSpacingAndPunctuations, 2).getNthPrevWord(1), "abc");
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc def.", mSpacingAndPunctuations, 2).getNthPrevWord(1), "abc");
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc def .", mSpacingAndPunctuations, 2).getNthPrevWord(1), "def");
-        assertTrue(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertTrue(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc ", mSpacingAndPunctuations, 2).isBeginningOfSentenceContext());
 
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc def", mSpacingAndPunctuations, 1).getNthPrevWord(1), "def");
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc def ", mSpacingAndPunctuations, 1).getNthPrevWord(1), "def");
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
                 "abc 'def", mSpacingAndPunctuations, 1).getNthPrevWord(1), "'def");
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
-                "abc def.", mSpacingAndPunctuations, 1), PrevWordsInfo.BEGINNING_OF_SENTENCE);
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
-                "abc def .", mSpacingAndPunctuations, 1), PrevWordsInfo.BEGINNING_OF_SENTENCE);
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
-                "abc, def", mSpacingAndPunctuations, 2), PrevWordsInfo.EMPTY_PREV_WORDS_INFO);
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
-                "abc? def", mSpacingAndPunctuations, 2), PrevWordsInfo.EMPTY_PREV_WORDS_INFO);
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
-                "abc! def", mSpacingAndPunctuations, 2), PrevWordsInfo.EMPTY_PREV_WORDS_INFO);
-        assertEquals(PrevWordsInfoUtils.getPrevWordsInfoFromNthPreviousWord(
-                "abc 'def", mSpacingAndPunctuations, 2), PrevWordsInfo.EMPTY_PREV_WORDS_INFO);
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
+                "abc def.", mSpacingAndPunctuations, 1), NgramContext.BEGINNING_OF_SENTENCE);
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
+                "abc def .", mSpacingAndPunctuations, 1), NgramContext.BEGINNING_OF_SENTENCE);
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
+                "abc, def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO);
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
+                "abc? def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO);
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
+                "abc! def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO);
+        assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
+                "abc 'def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO);
     }
 
     public void testGetWordRangeAtCursor() {
diff --git a/tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java b/tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java
index 2e54351..74da937 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java
@@ -19,7 +19,7 @@
 import com.android.inputmethod.annotations.UsedForTesting;
 import com.android.inputmethod.latin.BinaryDictionary;
 import com.android.inputmethod.latin.Dictionary;
-import com.android.inputmethod.latin.PrevWordsInfo;
+import com.android.inputmethod.latin.NgramContext;
 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
 import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode;
 import com.android.inputmethod.latin.utils.BinaryDictionaryUtils;
@@ -104,12 +104,12 @@
         for (final WordProperty word0Property : dict) {
             if (null == word0Property.mBigrams) continue;
             for (final WeightedString word1 : word0Property.mBigrams) {
-                final PrevWordsInfo prevWordsInfo =
-                        new PrevWordsInfo(new PrevWordsInfo.WordInfo(word0Property.mWord));
-                if (!binaryDict.addNgramEntry(prevWordsInfo, word1.mWord,
+                final NgramContext ngramContext =
+                        new NgramContext(new NgramContext.WordInfo(word0Property.mWord));
+                if (!binaryDict.addNgramEntry(ngramContext, word1.mWord,
                         word1.getProbability(), 0 /* timestamp */)) {
                     MakedictLog.e("Cannot add n-gram entry for "
-                            + prevWordsInfo + " -> " + word1.mWord);
+                            + ngramContext + " -> " + word1.mWord);
                     return;
                 }
                 if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) {
diff --git a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
index 6162096..290c067 100644
--- a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
+++ b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
@@ -21,8 +21,8 @@
 import android.util.Log;
 
 import com.android.inputmethod.latin.ExpandableBinaryDictionary;
-import com.android.inputmethod.latin.PrevWordsInfo;
-import com.android.inputmethod.latin.PrevWordsInfo.WordInfo;
+import com.android.inputmethod.latin.NgramContext;
+import com.android.inputmethod.latin.NgramContext.WordInfo;
 import com.android.inputmethod.latin.utils.BinaryDictionaryUtils;
 import com.android.inputmethod.latin.utils.DistracterFilter;
 import com.android.inputmethod.latin.utils.FileUtils;
@@ -160,12 +160,12 @@
     }
 
     private static void addToDict(final UserHistoryDictionary dict, final List<String> words) {
-        PrevWordsInfo prevWordsInfo = PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
+        NgramContext ngramContext = NgramContext.EMPTY_PREV_WORDS_INFO;
         for (String word : words) {
-            UserHistoryDictionary.addToDictionary(dict, prevWordsInfo, word, true,
+            UserHistoryDictionary.addToDictionary(dict, ngramContext, word, true,
                     (int)TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()),
                     DistracterFilter.EMPTY_DISTRACTER_FILTER);
-            prevWordsInfo = prevWordsInfo.getNextPrevWordsInfo(new WordInfo(word));
+            ngramContext = ngramContext.getNextNgramContext(new WordInfo(word));
         }
     }
 
@@ -288,11 +288,11 @@
         clearHistory(dict);
         final List<String> words = generateWords(numberOfWords, random);
         dict.waitAllTasksForTests();
-        PrevWordsInfo prevWordsInfo = PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
+        NgramContext ngramContext = NgramContext.EMPTY_PREV_WORDS_INFO;
         for (final String word : words) {
-            UserHistoryDictionary.addToDictionary(dict, prevWordsInfo, word, true, mCurrentTime,
+            UserHistoryDictionary.addToDictionary(dict, ngramContext, word, true, mCurrentTime,
                     DistracterFilter.EMPTY_DISTRACTER_FILTER);
-            prevWordsInfo = prevWordsInfo.getNextPrevWordsInfo(new WordInfo(word));
+            ngramContext = ngramContext.getNextNgramContext(new WordInfo(word));
             dict.waitAllTasksForTests();
             assertTrue(dict.isInDictionary(word));
         }
diff --git a/tests/src/com/android/inputmethod/latin/utils/DistracterFilterTest.java b/tests/src/com/android/inputmethod/latin/utils/DistracterFilterTest.java
index 6ed9120..8360d53 100644
--- a/tests/src/com/android/inputmethod/latin/utils/DistracterFilterTest.java
+++ b/tests/src/com/android/inputmethod/latin/utils/DistracterFilterTest.java
@@ -24,7 +24,7 @@
 import android.test.suitebuilder.annotation.LargeTest;
 import android.view.inputmethod.InputMethodSubtype;
 
-import com.android.inputmethod.latin.PrevWordsInfo;
+import com.android.inputmethod.latin.NgramContext;
 import com.android.inputmethod.latin.RichInputMethodManager;
 import com.android.inputmethod.latin.utils.DistracterFilter.HandlingType;
 
@@ -58,7 +58,7 @@
     }
 
     public void testIsDistracterToWordsInDictionaries() {
-        final PrevWordsInfo EMPTY_PREV_WORDS_INFO = PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
+        final NgramContext EMPTY_PREV_WORDS_INFO = NgramContext.EMPTY_PREV_WORDS_INFO;
 
         final Locale localeEnUs = new Locale("en", "US");
         String typedWord;
@@ -204,7 +204,7 @@
 
     public void testGetWordHandlingType() {
         final Locale localeEnUs = new Locale("en", "US");
-        final PrevWordsInfo EMPTY_PREV_WORDS_INFO = PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
+        final NgramContext EMPTY_PREV_WORDS_INFO = NgramContext.EMPTY_PREV_WORDS_INFO;
         int handlingType = 0;
 
         handlingType = mDistracterFilter.getWordHandlingType(EMPTY_PREV_WORDS_INFO,
diff --git a/tools/dicttool/Android.mk b/tools/dicttool/Android.mk
index 3e3d419..7f34ccf 100644
--- a/tools/dicttool/Android.mk
+++ b/tools/dicttool/Android.mk
@@ -50,7 +50,7 @@
         latin/Dictionary.java \
         latin/InputPointers.java \
         latin/LastComposedWord.java \
-        latin/PrevWordsInfo.java \
+        latin/NgramContext.java \
         latin/SuggestedWords.java \
         latin/WordComposer.java \
         latin/settings/NativeSuggestOptions.java \
