Next Word Prediction Engine

Sagnik Bhowmik
January 11, 2026

Slide 2: The Project Goal

Typing on mobile devices can be slow and tedious. Our goal was to create a data product that:

  • Predicts the next word in a phrase instantly.
  • Reduces user keystrokes for better efficiency.
  • Operates with high speed and low memory usage.

Slide 3: The Algorithm

The app uses a N-gram model with a Stupid Back-off strategy.

  • It first checks for a 4-word match (Quadgram).
  • If no match, it “backs off” to a 3-word match (Trigram).
  • If still no match, it checks for a 2-word match (Bigram).
  • This ensures a prediction is always provided.

Slide 4: How to Use the App

The interface is designed for simplicity and speed:

  • Enter a phrase in the provided text box.
  • No “Submit” button is required; the app is reactive.
  • The predicted word appears instantly in large blue text.

Slide 5: Performance & Links

  • Accuracy: Based on millions of words from blogs, news, and twitter.
  • Speed: Optimized .rds files allow for sub-second responses.

Link: