NextWord®

EK

Background

My team has recently developed an amazing tool. The tool is called NextWord®.

NextWord® is used to predict the NEXT WORD that comes in a sentence! We can make this cheaply, sell it fast, makes lots of money, flatten our competitors, increase collective intelligence, push the boundaries of technology, and, best of all, have fun!

How it Works

We trained our model with words from twitter feeds, news articles, and blogs. Some key points:

  • We create n-grams with the words, and rank them by frequency.
  • For this project, we used 1-grams through 5-grams.
  • A 1% sample of all data sources combined was used.

Model

The prediction model comes from an algorithm called “Stupid Backoff”. In this algorithm, the 5-gram is checked first, if we do not find a match, we back off to the 4-gram. This keeps going until we’re left with a 1-gram.

Several models were attempted, and this one was the only one fast enough to use in practice.

Shiny App

A application built with the Shiny package from Posit makes an easy way to demonstrate the functionality of the brilliant NextWord®. You can access the app at NextWord.

Click the link, type some words into the box, and you can easily predict the next word!

(Disclaimer: No data scientists were harmed in the making of this app).