Goal: Predict the next word a user will type, in real time.
Training Data: HC Corpora (Coursera / SwiftKey)
- ~4 million lines of English text
- Sources: Twitter, News articles, Blog posts
- Sampled 5% per source → 213,000 lines for training
Why N-grams?
- No external APIs or large language models needed
- Runs entirely offline inside a Shiny app
- Fast lookup — predictions return in milliseconds