FinalProjectSubmission

Sumeet Singhal
6/11/2020

Get the inout from the textbox and clean the

For more details on authoring R presentations please visit https://support.rstudio.com/hc/en-us/articles/200486468.

The goal of this exercise is to create a product to highlight the prediction algorithm that you have built and to provide an interface that can be accessed by others

Shiny App URL : https://courserads.shinyapps.io/FinalProjectSubmission/

Loading the data and pre processing

Twitter data set for us is used for this analysis

Data cleaning is done by conversion to lowercase, strip white space, and removing punctuation and numbers.

The n-grams (4-gram,3-gram and 2-gram) are then created .

The n-gram objects are saved .RData files

RData will be used for prediction

Exploratory analysis

Please out the exploratory analysis done as part of the project

library(imager)
myimg <- load.image("./explorAnan.jpg")
plot(myimg)

plot of chunk unnamed-chunk-1

Created a dictionary of words, wordpair 2-gram, tri-gram wordpair . These words help us predict the next words when we type any word. Frequency of 2-gram and 3-gram will help us in defining the weight .

The word prediction application

The application does the prediction of the next possible word in a sentence.

Enter the text in an input box , the application returns the most probability word to be used.

The predicted word with frequency of 2, 3 and 4 grams sequences.

the field with the predicted next word is displayed

The UI for application

Screen shot of the application that should come when you hit the app URL

library(imager)
myimg <- load.image("./app.jpg")
plot(myimg)

plot of chunk unnamed-chunk-2