We all have used SwiftKey at some point of time and a large number of users use it everyday. It is known to reduce keystrokes by providing pretty amazing and highly addictive feature called Swipe. The company hasn't stopped there and has taken text prediction to the next level.
We already have basic prediction in all keyboards but this one stands apart. The accuracy with which it predicts next words of user no matter how complex the sentence is pretty amazing. Let us explore how they do it and their underlying technology.

The text processing problem

The text processing by machines has always been hard and the reason behind it is context. A chunk of text is not a single entity like numbers but each word is written in context to another word to make a logical sense.
In text, words are dependent not only on other words but even sentences. That makes it whole lot complex for machine to learn the text semantics and provide us with meaningful results. The different combinations of words and sentences is so huge that it's impossible for any computer system to learn it perfectly. The problem which was unsolved for years is now getting solved by new technology named Recurrent Neural Networks(RNN). An RNN defines an algorithmic system, modeled in the way the brain processes information that can learn from data-sets. They are fundamentally pattern recognition systems and tend to be more useful for tasks which can be described in terms of pattern recognition. They are 'trained' by feeding them with data-sets with known outputs.
As an example imagine that you are trying to train a network to output "cat" when it is given a picture of a cat and "none" when it sees a picture that is not a cat. You would train the network by running lots of pictures of cats through it and using an algorithm to tweak the parameters until it gave the correct response. The same concept is applied to text as well.

1_ifwFFvgJrdgda_p3ADMO8Q
Well, that ain't no CAT.

The latest version of SwiftKey is combination of their current keyboard and a previously release pure neural network based keyboard called Neural Alpha. The Neural Alpha did away with all the traditional prediction layers and instead relied solely on a neural network.
To train its network, SwiftKey used millions of complete sentences and applied tags to each word. These tagged terms helped the network to understand what the sentences meant, or more accurately, how they were structured. This tagged database essentially created a broad pool of interconnected synonyms, but rather than linking words by meaning, like a thesaurus, SwiftKey's database links them by their linguistic use.

1_R77VgWiu_MrhmrdJpSA_zw
Auto-correct goof-ups which almost always happen with everyone [credits: theoatmeal.com]

The biggest problem in the older n-gram model based keyboard is that while word predictions aren't bad but they are not relevant to the context of the sentence. The SwiftKey Neural Alpha will offer the most appropriate words based on the sentence being typed, accurate enough that users will end up using them fairly often. For example, in the below mentioned picture, having previously seen the phrase "Let's meet at the airport", the technology is able to infer that "office" or "hotel" are similar words which could also be appropriate predictions in place of "airport".
1_LHYW13jo9MPniJskFODE4A

The Future: Your keyboard will predict entire messages for you.

The next level of product that SwiftKey team is working on is the Keyboard of tomorrow. It's just possible that the keyboard of the future could know the users so well, it will accurately predict entire messages for them, in their tone of voice, reflecting the events that go on in their daily life.

1_snnyoqPrVcsSDSucpIU3Iw
Image credits: https://blog.swiftkey.com/neural-networks-a-meaningful-leap-for-mobile-typing/

Machine Learning can help us in many of our every day activities which involve recognizing patterns and using them to make decisions. SwiftKey Neural Alpha is just the tip of the iceberg of the revolution of how Machine Learning is transforming and making machines think more and more as humans.

About Us
“Turing Analytics is a machine learning company that delivers intelligent solutions to Retailers helping them improve product discovery, customer engagement and boost conversion rates. They expertise in building Visual Search & recommendation solutions, which enable retailers to recommend visually similar products to their customers and search products by uploading a picture.”