Meet Wordsley

by Austin Routt
August 23 2015

What is Wordsley?

Wordsley is a learnable predictive text engine that uses a statistical model to anticipate the next word a user will type. More specifically, the algorithm relies on :

  • Multiple N-gram models, from unigrams to quadrigrams; these use word frequency data from blogs, news reports, tweets, and sentences entered by users into Wordsley to determine the most probable next word.
  • Back-off smoothing, so if a next word probability is not found in a higher order n-gram model a lower order model is used.
  • Google spreadsheets, which provide a form of persistent memory, allowing users to teach Wordsley additional n-grams.

How does Wordsley work?

Whenever you enter text into Wordsley he checks the number of words you've given him. Based on that, the highest order n-gram model is chosen, and he then looks through that particular model to find a list of all n-grams that match what has been typed; if no match exists he defaults to a lower model. Using his list, Wordsley normalizes the frequency data, and then orders it so that the n-grams with the highest probability are first. The top five are displayed as buttons.

All n-grams are stored online as a google spreadsheet. Whenever Wordsley completes a set of rounds he updates his google spreadsheet by adding to the frequency of those n-grams he already knew, or storing the count of those which he did not; in this way he can learn new n-grams, as well as refine his ability to predict the most appropriate one for you.

At its core, Wordsley is an entirely data driven application, as he's mainly a collection of n-gram models derived from a large corpus of english text. Nevertheless, Wordsley is special in that he can learn new n-grams, as well as refine his ability to predict the most appropriate one for you. Using a data set provided by SwiftKey, unigram, bigram, trigram, and quadrigram models were created, and these were then glued together by a very simple back-off smoothing algorithm.

How do I use Wordsley?

  • First, click the App tab in the left side panel and select the number of rounds that you would like to test Wordsley.
  • Next, type an incomplete sentence into the text input prompt; see if Wordsley has the next word in one of his five buttons to the right.
  • If Wordsley has your word click on it, and then click the “Good Wordsley!” button
  • If Wordsley does NOT have your word type the missing word back in the input box, and tell Wordsley “Bad Wordsley!
  • After completing all rounds, submit your test; please give Wordsley a little time to calculate his performance, as well as learn the new n-grams you may have taught him.

Where can I find Wordsley?

Wordsley can be found at the following web address:

https://austin-routt.shinyapps.io/Wordsley