Veronica Vaca
2026-08-09
Typing is one of the most common ways people interact with digital products. A useful next-word predictor can reduce the number of keystrokes required to complete a message and make text entry faster and more convenient.
This product predicts the next word after a user types a phrase.
It is designed for fast deployment in Shiny while still using more context than a simple n-gram model.
The app combines five signals:
Instead of relying only on the last one to three words, the model also considers recent earlier words in the phrase. This helps reduce weak fallback predictions when an exact n-gram is missing.
The final score is a weighted ranking score used to select the best next-word candidate.
The final model was tuned to balance accuracy and deployment efficiency.
Key evaluation metrics used:
The model uses pruning to remove rare n-grams and reduce memory usage. This sacrifices a small amount of accuracy but makes the application faster and easier to deploy on shinyapps.io.
The Shiny app provides a simple multilingual workflow:
The app also includes tabs for language-specific corpus summaries and model performance, including Top-1, Top-2, and Top-3 accuracy.
This product is useful because it is:
The next improvement would be tuning the model weights and sample size further to improve context-sensitive predictions without making the app too large.