Goal: Apply a Shiny app to predict the next word of a phrase.
Prediction Algorithm: N-Gram Models
Principle: Estimate the conditional probability of a word to complete a given phrase of n words, and present the word with the highest conditional probability.
Methods: Construct (unigrams), bigrams, trigrams, and fourgrams to predict the next word.