Next Word Predictor — Capstone Project

Anthony Acaldo • December 2025

1. The Problem & My Solution

The Problem

  • Typing on phones is slow
  • Spelling mistakes & frustration
  • Existing keyboards are limited

My Solution

Next-Word Predictor App
- Predicts next word in real time
- Click to auto-complete
- Built with R + Shiny + n-gram backoff
- Trained on full SwiftKey corpus (3.3M lines)



Saves ~30% typing time

2. How the Model Works

N-gram Backoff Algorithm

  1. Trigram → “one of the” → “most”
  2. Bigram → “of the” → “world”
  3. Unigram → fallback to most common words


- Handles apostrophes (“don’t” → “know”)
- Fast lookup with pre-built RDS tables
- Real-time response (< 10 ms)

3. Predictive Performance

Metric Result Notes
Top-1 Accuracy 32% Correct word first
Top-5 Accuracy 55% Correct word in top 5
Speed < 10 ms Instant on any device
Model Size ~15 MB Lightweight, mobile-ready


Matches early SwiftKey performance

4. The App — Live Demo


Features:
- Clickable prediction buttons
- Auto-append on click
- Confidence & source indicators
- 1-word or Top-5 mode
- Clear button + default example
- Fully responsive design


Try the live app here!

5. Why This is Awesome & Next Steps

This isn’t just a project — it’s a real product.


Ready for:
- Mobile keyboard integration
- Chat/email auto-complete
- Personalization (user history)

Next Steps:
- Add 4/5-grams → 45%+ accuracy
- Deploy to Android/iOS
- Add neural fallback for rare words



Thank you!
Anthony Acaldo
Coursera Data Science Capstone 2025 —