Text Prediction App

Joel Polanco
June 2016

Data Science Specialization Capstone Project

alt text

Background

  • The prediction algorithm used
  • A 3-gram example
  • How the app works

    alt text

The prediction algorithm used

  • Collect token counts over a large text corpus
  • Limit prediction to last x words using Markov theory

  • Markov assumptions
    • only previous history matters
    • limited memory: only last k words are included in history

A 3-Gram Example

alt text

  • 225 trigrams in the corpus start with
    the biggest

  • 123 of them end with
    place

  • The maximum likelihood estimate (probability) is (123/225) = 0.547

How the app works

  1. Load the application
  2. Input a sentence
  3. Select n-gram method
  4. Wait for your results, they will show up on the right of your screen.
  5. Repeat steps 2-4

Connect with me on LinkedIn

alt text