Predictive Text - A Rob Creel Shiny App

July 27, 2018

The Problem

texting

Typing on certain platforms is hard.

  • Cell phones
  • Tablets
  • Touch screens in general
  • Voice dictation services

The Solution

A predictive text app can help.

  • Typed words can predict the likely next word
  • My Shiny app uses the ngram package to analyze text scraped from the internet.
  • Common phrases were organized into phrasetables

predictive text

A peek inside

Here are the three most common five word phrases in the data.

head(phrasetable5, 3)
                setup punch     prop
1      at the end of   the  4.37e-05
2   in the middle of   the  2.18e-05
3 for the first time    in  1.92e-05

And here are the three most common five word phrases that start with the words “one of the best.”

head(phrasetable5[phrasetable5$setup == "one of the best ", ], 3)
                setup   punch     prop
682  one of the best  things  1.76e-06
1633 one of the best      in  1.09e-06
1776 one of the best    ways  1.05e-06

The app in action

the app at work

[A note to the grader: If you are feeling kind, you might review my milestone report.]