Word Prediction Capstone Project

Peter Hagen
September 12, 2016

What is this Application

  • Application will predict the next word the user is typing
  • Similar applications used by Android, Apple, and Swiftkey to increase the speed of typing text
  • Code written for efficiency and was compiled and run on macbook pro
  • 90% prediction accuracy on Coursera's benchmark tests

How was it Built

  • 19,000,000 words used to train model
  • 3 different sources of text data (blogs, news, and twitter)
  • Important R packages: dplyr and quanteda
  • Similar algorithm used by Google for text prediction in search engine

Algorithm

“Backoff Algorithm used with up to four-gram text tokenization”

  • A four-gram is a four word text string “Sally is a dog”
  • Tri-gram, Bi-gram, and Uni-gram are lower count phrases
  • Backoff Algorithm looks for four-gram match to predict the user's next word. If no four-gram match is found, the model looks for a tri-gram match. If no tri-gram match is found, looks for Bi-gram. etc.
  • Application shows the 15 most frequently found matches in training dataset

Link to Word Prediction Application

Click Here >> Word Prediction Ap <<