Word prediction App

Coursera Student
8/6/2015

Overviews

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

  • Side panel which provides introduction, acknowledgement and app algorithm indicator.
  • Main panel including Prediction, Instruction and Notes tabs is the interactive component for users.
  1. Prediction provides interface for user to input phrase and get word prediction.

  2. Instruction tab will give them detail instruction on how to use this app.

  3. Notes is where further information about using this app can be found.

Algorithm

After data cleaning profanity removal and Ngram creation, this app predicts next word using Ngram(up to 4gram) backoff model.

  • Step 1: Match last three words from user's input, if matching found then output the 4gram as prediction word . If not, go to step 2.
  • Step 2: Remove one word and look for match in trigram, if found then output trigram otherwise go to step 3.
  • Step 3: Reduce to one word, if matching word found in bigram then output bigram otherwise 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:

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

Usage

The app can be used by two steps:(See demo below)

  • 1. Please make sure Ngram at the sidebar appears before using it. If not, app is still loading and not ready for prediction.
  • 2. Type in Text input box: If you don't see the Swiftkey keyboard, please click Prediction tab to bring you back to the text input box and start typing. Following your entry a set of predicted word(s) will be shown. If there are multiple predicted words they will be provided in order of higher to lower probability separated by '/'.