Word prediction App

8/6/2015

Overviews

This Word Prediction App uses Ngram back-off model to predict next word based on user's input. It has two major components:

  • Side panel provides introduction, acknowledgement and algorithm indicator.
  • Main panel including Prediction, Instruction and Notes tabs is the interactive component.
  1. Prediction provides interface for user to input phrases and get word prediction.
  2. Instruction tab gives user detail instruction on how to use this app including a demo.
  3. Notes includes trouble shooting and further information about using this app.

Algorithm

After data cleaning includes profanity removal and Ngram creation, this app uses Katz's back-off model to predict next word.

  • Step 1: Match last three words from user's input, if matching found then output 4-gram as prediction word . If not, go to step 2.
  • Step 2: Remove one word and look for a match, if found then output trigram otherwise go to step 3.
  • Step 3: Reduce to one word, if matching word found then output bigram, if not go to step 4.
  • Step 4: Output the most frequently used five single words from unigram. Due to memory and speed limitation, higher Ngram and other algorithm is not applied in this app.

Features

To make the app as user friendly as possible this app feasures:

  • Clicking submit button is NOT necessary when user inputs phrases.
  • Multiple predicted words will be provided in the order of higher probability.
  • Once app finishes loading, prediction response time will reduce to minimum.
  • For easy access, Prediction tab is active right after app is loaded.
  • Each tab has its own logo to avoid confusion when switching between tabs.

Usage

The app can be used by following the simple steps (See demo below):

  • 1. Make sure Ngram at the sidebar appears. If not, app is still loading and not ready for prediction.
  • 2. Type in Text input box, a set of predicted word(s) will be shown in order of higher to lower probability separated by '/'.