February 4, 2018
What is it?
- The Next Word Predict-ROAR is an app that pulls from news and Twitter data to tell you what the next likely word will be given your chosen phrase
- The user's input will be stripped of punctuation, numbers, and turned into lower case
- Currently, the app can search up to 4 consecutive words to predict the 5th (any inputs greater than 4 will be shortened to the last 4 words)

How does it work?
The Model is based off the Stupid Back-off Model. The Next Word Predictor will try to find the user's search in the appropriate n-gram table (up to 4-grams).
If a 5 word phrase is entered, the model will shorten it to 4 words then search for a match and, if there is a match, calculate the likelihood of the next word given the number of occurances of that phrase divided by total occurances of the phrase.
If there is no match, the model will back off one less word to only the last 3 words and repeat the process.
If the model can not find a match, it will display the top 3 most common words.
Performance
Out of 20 random phrases, the app was able to predict the correct word in the top three 40% of the time.
The app could be improved with the creation of 6-grams (or more) to allow the model to search for 5 words in a row. With your generous funding this could be possible!
Try it out yourself!
- Just enter a phrase in the text box to see the top 3 likely words [there may be a small delay]
- Enter another phrase to continue the fun!
- In the app, click on the Explanation tab for more information and source code
- Go have some fun! Next Word Predict-ROAR
Thanks!