Coursera Data Science Specialization Capstone Final Project

Determining the Next Word from an Input Phrase

Vincent Kowalski
12 June 2017

Problem Statement and Project Objective

  • Problem: Given a string of words (i.e., a phrase), predict the next word that is most likely to come next. A solution to this problem would be useful in a vast array of applications such as:
    • type ahead for texting or typing apps
    • assistant apps for individuals with speech disabilities
    • educational applications
  • Objective: Using a provided training data set, train a model to predict the next word that would most likely come after a given input n-gram of words (the input phrase). Provide end-users a Shiny app that allows them to type in the input phrase, invokes the model and then presents the output predicted word.

Description of Algorithm

Slide With Code

summary(cars)
     speed           dist       
 Min.   : 4.0   Min.   :  2.00  
 1st Qu.:12.0   1st Qu.: 26.00  
 Median :15.0   Median : 36.00  
 Mean   :15.4   Mean   : 42.98  
 3rd Qu.:19.0   3rd Qu.: 56.00  
 Max.   :25.0   Max.   :120.00  

Slide With Plot

plot of chunk unnamed-chunk-2