The Word Prediction App

Khairul Azhar Kasmiran
24 April 2016

App Description -- Solving a Problem

Want to write long memos but dread the keyboard hunt-and-peck?
Mobile's touchscreen keyboard got you down?
Enter The Word Prediction App!

  • App predicts the words that you want to type in and allows you to add them with just a simple click.
  • Should eventually increase your typing speed considerably!

This app is a proof of concept. User interface, features and performance may change before final release.

App Functionality -- How to Use

  1. Type in a phrase in the text box. After you stop typing, the app will show its predictions after a short delay.
  2. If the phrase ends with a partial word, the app will show predictions for that word. If the phrase ends with a space, the app will show predictions for the next word.
  3. Click on a word to add it to the phrase.

Phrase ends with partial word:

Ends with partial word

Phrase ends with space:

Ends with space

Inside Look -- The Algorithm Used

A straightforward algorithm is used to populate the prediction list:

  1. Check a bigram table and rank candidate words by bigram frequency.
  2. If that is not possible or if there aren't enough candidates, check a unigram table and rank candidate words by unigram frequency.

Go to https://kazhar.shinyapps.io/the_word_prediction_app/ and check out the algorithm's effectiveness for yourself!

Future Directions

  • Better prediction algorithms (using trigrams*, skipgrams etc.).
  • Faster and better user interface!
  • Predictors specialized to particular domains!
  • Other languages besides English!
  • More features! For example:
    • Capitalizing candidate words if appropriate.
    • Learning word preferences from the user.

*Currently trigrams are not used because of concerns about memory usage.