diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index 46c0151..9d72c64 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -547,14 +547,17 @@
     // Get information of the nth word before cursor. n = 1 retrieves the word immediately before
     // the cursor, n = 2 retrieves the word before that, and so on. This splits on whitespace only.
     // Also, it won't return words that end in a separator (if the nth word before the cursor
-    // ends in a separator, it returns information represents beginning-of-sentence).
+    // ends in a separator, it returns information representing beginning-of-sentence).
     // Example :
     // (n = 1) "abc def|" -> def
     // (n = 1) "abc def |" -> def
+    // (n = 1) "abc 'def|" -> 'def
     // (n = 1) "abc def. |" -> beginning-of-sentence
     // (n = 1) "abc def . |" -> beginning-of-sentence
     // (n = 2) "abc def|" -> abc
     // (n = 2) "abc def |" -> 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.
     // (n = 2) "abc def. |" -> abc
     // (n = 2) "abc def . |" -> def
     // (n = 2) "abc|" -> beginning-of-sentence
@@ -565,6 +568,19 @@
         if (prev == null) return PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
         final String[] w = spaceRegex.split(prev);
 
+        // Referring to the word after the nth word.
+        if ((n - 1) > 0 && (n - 1) <= w.length) {
+            final String wordFollowingTheNthPrevWord = w[w.length - n + 1];
+            if (!wordFollowingTheNthPrevWord.isEmpty()) {
+                final char firstChar = wordFollowingTheNthPrevWord.charAt(0);
+                if (spacingAndPunctuations.isWordConnector(firstChar)) {
+                    // The word following the n-th prev word is starting with a word connector.
+                    // TODO: Return meaningful context for this case.
+                    return PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
+                }
+            }
+        }
+
         // If we can't find n words, or we found an empty word, the context is
         // beginning-of-sentence.
         if (w.length < n) {
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index d4833f5..f36b42a 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -704,11 +704,10 @@
                 (!mConnection.isCursorTouchingWord(settingsValues.mSpacingAndPunctuations)
                         || !settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces)) {
             // Reset entirely the composing state anyway, then start composing a new word unless
-            // the character is a single quote or a dash. The idea here is, single quote and dash
-            // are not separators and they should be treated as normal characters, except in the
-            // first position where they should not start composing a word.
-            isComposingWord = (Constants.CODE_SINGLE_QUOTE != codePoint
-                    && Constants.CODE_DASH != codePoint);
+            // the character is a word connector. The idea here is, word connectors are not
+            // separators and they should be treated as normal characters, except in the first
+            // position where they should not start composing a word.
+            isComposingWord = !settingsValues.mSpacingAndPunctuations.isWordConnector(codePoint);
             // Here we don't need to reset the last composed word. It will be reset
             // when we commit this one, if we ever do; if on the other hand we backspace
             // it entirely and resume suggestions on the previous word, we'd like to still
@@ -719,12 +718,15 @@
             mWordComposer.processEvent(inputTransaction.mEvent);
             // If it's the first letter, make note of auto-caps state
             if (mWordComposer.isSingleLetter()) {
-                // We pass 1 to getPreviousWordForSuggestion because we were not composing a word
-                // yet, so the word we want is the 1st word before the cursor.
+                // We pass 2 to getPreviousWordForSuggestion when the previous code point is a word
+                // connector. Otherwise, we pass 1 because we were not composing a word yet, so the
+                // word we want is the 1st word before the cursor.
                 mWordComposer.setCapitalizedModeAndPreviousWordAtStartComposingTime(
                         inputTransaction.mShiftState,
                         getPrevWordsInfoFromNthPreviousWordForSuggestion(
-                                settingsValues.mSpacingAndPunctuations, 1 /* nthPreviousWord */));
+                                settingsValues.mSpacingAndPunctuations,
+                                settingsValues.mSpacingAndPunctuations.isWordConnector(
+                                        mConnection.getCodePointBeforeCursor()) ? 2 : 1));
             }
             mConnection.setComposingText(getTextWithUnderline(
                     mWordComposer.getTypedWord()), 1);
diff --git a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java
index c471eca..2c92bb3 100644
--- a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java
+++ b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java
@@ -187,6 +187,8 @@
         assertEquals(RichInputConnection.getPrevWordsInfoFromNthPreviousWord(
                 "abc def ", mSpacingAndPunctuations, 1).mPrevWord, "def");
         assertEquals(RichInputConnection.getPrevWordsInfoFromNthPreviousWord(
+                "abc 'def", mSpacingAndPunctuations, 1).mPrevWord, "'def");
+        assertEquals(RichInputConnection.getPrevWordsInfoFromNthPreviousWord(
                 "abc def.", mSpacingAndPunctuations, 1), PrevWordsInfo.BEGINNING_OF_SENTENCE);
         assertEquals(RichInputConnection.getPrevWordsInfoFromNthPreviousWord(
                 "abc def .", mSpacingAndPunctuations, 1), PrevWordsInfo.BEGINNING_OF_SENTENCE);
@@ -196,6 +198,8 @@
                 "abc? def", mSpacingAndPunctuations, 2), PrevWordsInfo.EMPTY_PREV_WORDS_INFO);
         assertEquals(RichInputConnection.getPrevWordsInfoFromNthPreviousWord(
                 "abc! def", mSpacingAndPunctuations, 2), PrevWordsInfo.EMPTY_PREV_WORDS_INFO);
+        assertEquals(RichInputConnection.getPrevWordsInfoFromNthPreviousWord(
+                "abc 'def", mSpacingAndPunctuations, 2), PrevWordsInfo.EMPTY_PREV_WORDS_INFO);
     }
 
     /**
