NextWord
Compact phrase completion
2026-10-07
The opportunity
- Mobile typing is slow.
- A useful predictor must respond quickly.
- The official English corpus contains:
4,269,678 lines
Evaluated in R: sum(c(899288,1010242,2360148))
The algorithm
- Normalize and filter text.
- Search the four-gram context.
- Back off through tri-, bi-, and unigram tables.
- Return one word plus alternatives.
Evidence and limits
- 193,477 held-out tokens
- Top-1 accuracy: 12.44%
- Top-3 accuracy: 20.07%
- Sampled and domain-sensitive
The product
Enter a phrase and press Predict next word.
The compact model gives an immediate result and explains its context order and limitations.