@Override
 public void loadDictionaryAsync() {
   // Load the words that correspond to the current input locale
   Cursor cursor = query(MAIN_COLUMN_LOCALE + "=?", new String[] {mLocale});
   try {
     if (cursor.moveToFirst()) {
       int word1Index = cursor.getColumnIndex(MAIN_COLUMN_WORD1);
       int word2Index = cursor.getColumnIndex(MAIN_COLUMN_WORD2);
       int frequencyIndex = cursor.getColumnIndex(FREQ_COLUMN_FREQUENCY);
       while (!cursor.isAfterLast()) {
         String word1 = cursor.getString(word1Index);
         String word2 = cursor.getString(word2Index);
         int frequency = cursor.getInt(frequencyIndex);
         // Safeguard against adding really long words. Stack may overflow due
         // to recursive lookup
         if (word1.length() < MAX_WORD_LENGTH && word2.length() < MAX_WORD_LENGTH) {
           super.setBigram(word1, word2, frequency);
         }
         cursor.moveToNext();
       }
     }
   } finally {
     cursor.close();
   }
 }