author: Gonzalo Andres Moreno date: April 24/2016
https://gonzalomoreno.shinyapps.io/CapstoneProjectwordpredictor/
In this capstone project, we will apply data science in the area of natural language processing
It uses n-grams with n=1,2,3,4
It uses frequency table of each n-grams
Recommend three possible words based on the “backoff” algorithm. If the phrase is not found in a n-gram model then we need to backoff to a n-1 gram model. For e.g. a lookup will be done in trigram, if not found the algorithm will backoff to bigram and finally to unigram.
Hence if we had the phrase
The App uses n-grams with n=1,2,3, 4 (see http://en.wikipedia.org/wiki/N-gram) to predict the next word in a text. If no word is predicted with the n-gram of size 3, then the algorithms attempts to predict the next word with n-gram of size 2 or 1.
The App is coded in such a way the you will have the predicted word in the right panel in real time(!). While typing the App gives you one suggestion of what the next word can be
Enjoy playing around.. :-). Next slide provides a simple example of how things work.give it a try!
Write your text in the Input Text Box of the main panel. Avoid final spaces.
In case you find a word (without spaces) that matches with your preferences,please digit the button in front of it to take in account the amount of sucesses and failures.
If any choices fits with your preferences, go on writing in the Input Text Box