This is a basic predictive text search application which is one of the key areas of "Natural Language Processing" (NLP).
The application user enters a phrase and the application tries to predict the next possibile word based on the common langauge patterns. User can optionally use this application as a fun activity, where he/she enters the word which they think should be the match. The application would display a message about the result.
Steps involved in creating the application
The underlying model has been trained on corpora of various social media feeds such as "blogs", "twitter" and "news". The following high level steps have been followed:
Data loading and cleaning (handing lowercase, punchuation, hashtags etc.)
Exploratory Analysis
Tokenizing the corpus (this is done per sentence)
Creation of n-Grams using "quanteda" package. The application used 2/3/4/5 Grams for predictions.
Removed low frequency n-Grams (<5)
Builing the predictive model
Creating the application front-end using Shiny