Parikshit Sanyal
16 Nov 18
This prediction model takes a text string, a decay factor f (between 0 and 1) and a number top_n as input, and then prints the top n predictions following the string.
The n-grams used for prediction were collected from a dataset of blogs, tweets and news. A set of 1, 2, 3, 4 and 5-grams were generated from the training set.
Given a string, the function finds
Probable words follwing 'i think'
The program runs with only moderate memory usage (19.7 MB saved environment data), which makes it useful for smartphones. However, predictive accuracy is yet to be tested in real world.