First, I will clarify some things for those who may not know and for those who might assume that I am confusing spell-checker with keyboard input prediction.
Then I will:
Bring back a problem that has been called for attention many times and explain why it happens;
Explain why I think it matters and why previous suggested workarounds are sub-optimal;
Discuss Google’s (Gboard) chosen workaround;
Give my suggestion to fix the problem.
Input prediction (IP) (Auto-complete and auto-correction) is a feature whose main purpose in software keyboards is to allow the user to type faster. The keyboard suggests words before you type them entirely and correct words where there are typos. By auto-correcting, the keyboard allows the user to type without painstaking care and precision, which allows for faster typing.
Spell-checking (SC) is (usually) a feature of word processors or system-wide input fields (MS Word, Android, and Google Chrome for desktop, each has its own spell-checker independent from software keyboards or any input method). Its main purpose is to alert and correct the user about the orthography of a given language.
People who use simultaneous multi-language input prediction – a feature present on SwiftKey (and Gboard also) – start seeing a red underling in all words of one of the languages.
The reason is that, while SwiftKey’s input prediction does have support for multiple languages simultaneously, the android’s system-wide spell-checker active in the user’s phone (usually AOSP’s or Google’s spell-checker) does not have.
Here it has been suggested that the user should disable the spell checker:
Notably, this is also the approach used by Gboard (more on that latter), but I think this is far from the ideal because it forces the user to resort to input prediction (IP) as a form of spell-checking (SC). This is a problem because, as I said in the beginning, input-prediction is a feature focused on fast typing (as it should be) and not on orthography. To illustrate, imagine how a user uses IP as SC:
The user types the word and hopes that the keyboard will correct it automatically if it’s wrong. Except that, even when typing correctly, sometimes the first prediction (the middle one in SwiftKey) is not the desired one. And other times the prediction dictionary doesn’t have the desired word. For those reasons, the exact typed word is always shown as an option, typos and all (as it should be), and the keyboard memorizes anything the user decides to input (as it should be) either by typing space and accepting the middle prediction, or by selecting the desired word in the list.
The result is that the IP learns a lot of slangs, acronyms and jargon (as is should be), but also learns misspelled words. And the user has no way of knowing if the thing he/her has typed didn’t appear as the first (middle) prediction because it was wrong or because the neural network crystal ball simply got it wrong or because the word doesn’t exist in the IP dictionary. Also, sometimes the misspelling is so different from the intended word that the latter doesn’t appear in the prediction list, and sometimes the misspelling is even presented as the first (middle) prediction.
The clear solution to that in my opinion is to have a separate mechanism for checking orthography, the spell-checker, which has to support simultaneously multi-language input as well (chrome desktop browser has that). This is a second independent layer that runs after input prediction, and is not affected by the IP dictionary. And when the user decides to tap a word and include it in the SC dictionary it is a conscious deliberate decision.
How does Gboard deal with that
Here it has been said that SwiftKey cannot control the spellchecker, and that Gboard doesn’t break in the same way because it has “advanced system privileges that SwiftKey cannot access”. I’m not an android programmer, but from the tests I have done, it seems to me that Gboard has the exact same level of system access that SwiftKey has with respect to spell-checking:
If my selected system-wide spell-checker is the AOSP one, it behaves in the exact same way with Gboard as it does with SwiftKey. The thing that Gboard does different is that, along with the keyboard, the app installs a spell-checking service as well. I’m using LineageOS, which doesn’t come with Gboard or Google’s spell-checker, only the AOSP ones. And when I install Gboard, Google’s SC appears as an option.
Now, Google’s solution is far from the best in my opinion. For what I tested, the ‘Google spell-checker’ (installed by Gboard) simply disables itself if it detects that Gboard is being used and uses only the system’s language when it detects other 3rd party keyboards (exactly like the AOSP one). And I already explained my problems with both solutions.
Simply put together a simple spell-checker with simultaneous multi-language support and ship it within the SwiftKey app. I think this would be simple to do, just copy the default dictionaries of the SwiftKey IP as a starting point, but it would not have to deal with predictions and other complex features that a software keyboard has to deal with. Again, copy the dictionaries, any word learned by the IP should not be automatically learned by the SC.
The simplest implementation would be to have one hash table for each language. If the user decides to use two languages simultaneously, a new empty language-agnostic hash table is created. That way, when the user includes a new word to de dictionary, it is included in the language-agnostic one to avoid guessing the language of the word. Then, spell-checking a word is simply to query the word on 3 hash tables.
Why am I suggesting this to you?
Here it has been said that SC “was never a feature of SwiftKey itself”, and that it’s an Android problem.
Indeed, if only AOSP’s SC did support multiple languages simultaneously, this problem would be solved. But I use and prefer SwiftKey; AOSP’s keyboard still doesn’t have support for simultaneous multi-language input, suggesting that this support is also not in the horizon for AOSP spell-checker; and it’s more probable that Google’s engineers will fix this only in Google’s SC, in a way that works exclusively with Gboard (as it’s the case with the ‘auto-disable SC’ workaround).
And ultimately this is a problem that (to me at least) seems extremely simple to solve and is hurting your product.
Here are some treads complaining of SC-related problems that, while not necessarily being all related to multi-language support, could benefit from a simple Spell Checker shipped inside the SwiftKey app.
I’m conscious that I might be wrong about a number of things: There could be another workaround that solves the problem in a satisfactory way; There could be a barrier to install system-wide spell-checkers on android; Maybe spell-checking is harder than I think, even without grammar-checking or prediction; etc.
In that case it would be nice if someone could explain the situation in a more in-depth way.