August 18, 2026

Our Approach

Typing on a phone is slow. A smart keyboard that predicts your next word — like SwiftKey’s — turns three or four taps into one.

  • Trained on ~500,000 real sentences from blogs, news articles, and tweets
  • Cleaned and standardized the text (removed links, usernames, profanity)
  • Built a statistical language model that has learned which words tend to follow which
Sequence length Patterns learned
Single words 30,000
Two-word pairs 767,946
Three-word phrases 881,611
Four-word phrases 432,526

How Prediction Works

The model looks for the most specific match to what’s already been typed — and if it hasn’t seen that exact phrase before, it falls back to a shorter, more general one, so it always has an answer ready.

This is a live result from the trained model, not a mockup.

The Product

A web app: type a phrase, click Predict, get the top 3 next-word guesses — just like the suggestion bar on a phone keyboard.

  • Try it now: nicsookraj.shinyapps.io/next-word-predictor
  • Five example phrases built in, for a one-click test drive
  • Fast: loads in ~1.3 seconds, predicts in a few milliseconds
  • Lightweight: the entire trained model is ~11 MB

“I went to the ___“
→ movies  ·  library  ·  store

Results & Next Steps

What’s working today:

  • Deployed, tested end-to-end, and live for anyone to try
  • Handles both everyday phrases and unfamiliar input gracefully — it never just gives up

Being upfront about a limitation:

  • Right now, common short phrases can occasionally outrank a more specific longer match. It’s a known tuning opportunity, not a blocker.

What we’d build next:

  • Train on the full text corpus, not just a 12% sample
  • Refine the scoring so specific matches are favored more consistently
  • Learn from an individual user’s own writing style over time