Neil Kutty
02/09/2018
The purpose of this app is to predict the next word a user may want to type based on the previous words they type.
It is powered by text data from twitter, blogs, and news. The app predicts by searching for the user's text input within datasets of phrases extracted from this text data.
It is designed to be reactive & fast- thus it is potentially applicable to numerous modern end-purposes. For example, this technology could be used to enable autocomplete on website forms that accept user text input such as search engine input boxes.
The algorithmic logic used by the core prediction function is based on Katz's Backoff Algorithm which is a probability based NLP prediction method.
This flow chart describes how the prediction function works.
No need to click a submit button, the app reactively recalculates each time the input text box is updated.
The backend data is trimmed to exclude sparse phrases where possible, improving load time and calculation speed.
The main predictNext function is written in base R. So while generating the n-gram dataframes requires use of R libraries, the actual brain making the predictions requires none.