Ngram-based text prediction

Yudhanjaya Wijeratne
6/8/2020

Introduction

Text prediction is an extraordinarily useful thing. It exists in smartphones, accessibility applications, search engines and many more cases where helping the user input data improves quality of service.

This project demoes a simple implementation of text predication which uses Twitter data and news as the source of its patterns.

Because of this, it's true to the language that people actually use and encounter in their daily lives.

The demo in action, working in your browser

Goals

The purpose was to create an application that would be:

  • easy for anyone to use, with an intuitive interface
  • light on the resources, so that it can be used in mobile phone applications
  • built on solid data from Swiftkey

Usage

Using the app is simple: head on over to https://yudhanjaya.shinyapps.io/Simplewordprediction/

Enter a word or a set of words in the space

Click the button

And viola! The program predicts your next word based on common language seen across the Internet. Obviously, this is just a demo - this can be made vastly more sophisticated, faster, and even more easy to use.