We have created a next word predictor to be used by the SwiftKey keyboard to allow faster typing by users. In order to predict the next word, we use the n-gram approach, namely we analyze all unigrams, bigrams and trigrams to come up with an algorithm to predict the next word.
What is an n-gram?
An n-gram is a list of n words that occour one after an other in a sentence.
For example, in the sentence: “Today is a beautiful day to go for a walk”,
Todayis a unigram(1-gram)beautiful dayis a bigram(2-gram)for a walkis a trigram(3-gram)