Typing on mobile devices can be slow and error-prone Predictive text helps users type faster and more accurately
Accepts user input of a phrase Predicts the most probable next word Powered by cleaned SwiftKey dataset and n-gram models
Text corpus cleaned: lowercase, punctuation removal, whitespace trim N-grams generated: Unigrams, Bigrams, Trigrams Prediction Logic: If trigram match: return word3 Else bigram match: return word2 Else: return most frequent unigram ```r predict_next_word(“I am”, …) # returns: “going”