Next word prediction using Markov chain and trigram model.