Your Name
2026-06-15
“Typing is slow. Predicting the next word saves time.”
Use Case
Our Goal
Why n-grams?
Stupid Backoff (Brants et al., 2007)
1. Check 4-gram table → prefix = last 3 words
2. If no match, try 3-gram → prefix = last 2 words
3. If no match, try 2-gram → prefix = last 1 word
4. Fall back to top unigrams
Training Data
Pruning
User Flow
Live Demo Screenshot
Input: "I would like to"
──────────────────────────
Top prediction: go
Other: see | know | be | have
| Metric | Value |
|---|---|
| Top-1 accuracy (Twitter test set) | 18 % |
| Top-3 accuracy | 32 % |
| Median prediction latency | < 40 ms |
| Compressed model size | ~28 MB |
| Memory at runtime | ~85 MB RSS |
Benchmarked against 5 phrases from BBC News (June 2025)
| Phrase (last word removed) | Predicted | Actual |
|---|---|---|
| “The stock market fell sharply …” | after | after ✓ |
| “Scientists have discovered a new …” | species | type — |
| “The president signed the …” | bill | bill ✓ |
| “She said she would never …” | leave | forget — |
| “This is one of the best …” | ways | films — |
3 / 5 top-1 hits — typical for small n-gram models
What Makes This App Solid
What I'd Add with More Time
Business Value
A keyboard or search app using this model could reduce typing effort by 20–30 %, improving accessibility and speed — at near-zero compute cost per query.
Thank you — Questions?