Data Science Capstone:

Text Predictor Application

Vamshi Krishna


  • This presentation is created as show case to the shiny application we have created
  • Find the shiny application here (
  • The goal of this project is to predict the next word when you enter some words in the input field
  • We are using ui.R , server.R , WordPredictor.R and RDS files from DataScienceCapstone_Week2_milestone_review files here
  • You will have to enter a word or sentence and we will predict the next word


  • The 3 documents of text files we have used are

    1. en_US.twitter.txt
    3. en_US.blogs.txt
  • Using above txt files and 'tm' library we have cleaned and stored the data into Rds files,

  • RDS files are unigram.Rds, bigram.Rds, Trigram.Rds and Quadgram.Rds

Predictive Model

  • Using the Rds files generated from the above markdown,
  • we will predict the text by taking input from ui and
  • giving that to server and using the WordPreictor.R source file,
  • we will get the predicted word and then we will display it on the ui.
  • If a word is not found due to small input to algorithm we will display NA in output

Shiny Application screenshot


Thank You