An R Shiny App that takes a typed out sentence as input and predicts the next word using an N-gram model. This project was carried out as part of the Data Science Capstone Coursera course taught by Jeff Meek, Roger D. Peng, and Brian Caffo of Johns Hopkins University. The finished product can be found here.
The code for running the R Shiny app can be found in the RShinyApp folder. This contains data on the probabilities of unigrams, bigrams, and trigrams found in the training corpus. The code to calculate the probabilities from the input dataset can be foud in the R folder, as well as code for an LSTM model that was not used in the final product.
A detailed description of how the app works and was constructed is given in the NextWordPredict markdown file. An html version of this file is also available here.