Andi M Masanam
04 June 2016
For this Capstone project, I created a simple next word prediction app
The app allows a user to input a sentence fragment and suggests the next word in the fragment
The app is trained on large samples of text from blogs, news reports and tweets.
You can try out the app using this link!
The algorithm was used as it offers comparable accuracy to more sophisticated models while being less computationally expensive
The algorithm takes user input and matches it against the n-gram with the greatest frequency in order to predict the next word
If there is no match, it then recursively searches for a match against successive lists of (n-1)grams, until it finds a match
The algorithm terminates at the 1-gram level, in which it simply outputs the most common unigram in case no match is found
The app employs the algorithm to provide a best-guess prediction of the next word in a sentence fragment, and displays all possible predictions in an accompanying word cloud of the desired size