My iPhone hassles

Painful autocorrections with multilingual texting

UnReleased: Automating text replacement iPhone

Bulk add autocorrects for iPhone

I text a lot on my iPhone, be it on WhatsApp or Messenger. I noticed that since I migrated from Android to an iPhone around 3 months ago, my keyboard has still not become seamless to use. I get pissed now and then by some silly text autocorrections or when iPhone does not recognize the word I intend to swipe, especially when those words are very frequently used. I was so pissed at a moment that this weekend I thought to do something about it and I started looking for possible solutions and this blog is exactly about what I was able to explore so far. I do not want to leave any surprise here, hence I would give a TLDR that I could not fully resolve this issue but just a few hints towards possible solutions to look for.

Android users never face this problem as Android’s keyboards learn Hindi words written in English writing system (Roman/Latin alphabets) automatically based on usage (learning the words on the go). I paid for Swiftkey keyboard on Android device so I never faced this problem before.

Why iPhone fails to identify my words

iPhone supports pure language dictionaries which means we can go into Settings > General > Keyboard > Keyboards and add our own language dictionary in it’s popular scripts. (Refer to Note 4) But for most multilingual people, one language uses a different script but we still tend to use English writing system (Roman/Latin alphabets) to write them which often does not have a standard spelling syntax. This leads to a situation where iPhone either gives weird swipe suggestions or tries to auto-correct words when I type. For example:

Raho (means stay there), Chalo (means let's go) are Hindi words which will be swiped/autocorrected as Radio and Chair.

Solution 1: Transliteration

iPhone supports transliteration for some languages (fortunately includes Hindi) which translates Raho to रहो and Chalo to चलो respectively as we type. We can add this via Settings > General > Keyboard > Keyboards > Add New Keybaord... > Hindi > Transliteration. Note that this will use Devanagari script to type and users need to change the keyboard mode every time the input language changes. They can phonetically type words and it will transliterate only when the keyboard input mode is Hindi.

Now, Many folks either cannot read Hindi because they never had that subject back in School and could also get offended if we do that say Tamils (maybe?). It becomes effortful to type since we need to change the keyboard type every time we change the language of the word in our head and it looks weird because our sentences appear in mixed scripts. For example:

No, मैं उस restaurant में dinner नहीं karunga.

Needless to say, transliteration feature is not available for all the languages who commonly have their scripts, hence limiting the applicability.

Solution 2: Add Text replacement

This solution works like a charm and is very exhaustive. Like I have added replacement phrases like ttyl (talk to you later) and omw (on my way) and it works very smoothly. One can add text replacements via Settings > General > Keyboard > Text Replacement > + > Add Phrase and Shortcut > Save.

Estimation

I felt this was a great discovery and my life will be happy thereafter until I realized that I have a huge list of words that I want to add to this replacement. So, I thought to do some estimations:

  1. Downloaded the WhatsApp chat history on mac via Whatsapp Web
  2. Replaced non-alpha characters with new lines
  3. Did a sort based on word frequency:
    tr ' ' '\12' <FILE_NAME.txt| sort | uniq -c | sort -nr > result.txt
  4. Removed words with one frequency assuming they have incorrect spellings mostly and are sparingly used.
  5. Removed all non-alpha characters again and I got 8K words, yes that’s true!
Realization

I now needed a way to automatically add all the words into iPhone text replacements. After a quick search, I dwelled into two thoughts to do the same.

  1. What if I add the words into mac dictionary and it automatically syncs to iPhone
    • I added the dictionary to ~/Library/Spelling/LocalDictionary but it does not sync at all!
  2. What if I just automate the Settings app action somehow, maybe via Shortcuts app
    • I could not complete the workflow since auto-clicking the + part is not supported in the Shortcuts app.

My Take Away

I did not find a very comprehensive answer to this problem and I hope Apple will resolve this issue by adding either learning words on-the-go or by allowing some sort of multilingual dictionary in English writing system (Roman/Latin alphabets). But before that day comes, maybe life will continue to be hard for iPhone users.

I have put unreleased in the blog’s title, just to denote that this problem has not yet been resolved!

Notes:

  1. Shortcuts Gallery website (here) provides a great list of shortcuts that can be built for iPhone.

  2. MacStories provides a list of all shortcut URLs to land on a certain settings page.

  3. My shortcut was based on pulling the dictionary from the iCloud line by line and putting into the Settings app. Here is a sneak peek of what I wrote in the Shortcuts app. Note that it misses the final action where we click on (+) button.

  4. After I wrote this blog, my good friend Sushant reached out to me claiming that this feature is covered by Hindi(Latin) keyboard which appears in Keyboard -> All Other Keyboards section. I have tested this out just for a day and it seems to consistently miss out my commonly used words. I think I can safely conclude that Hindi-Latin keyboard does not learn words on-the-go using my type history like how Android counterparts do.

BUSINESS
iOS mobile Keyboard

Dialogue & Discussion