December 23, 2025

How the Prediction Works

Core Model: N-gram Language Model

  • Method: Stupid Backoff Algorithm
  • Training Data: Sampled from blogs, news, and Twitter
  • Process:
    1. Matches user’s last words against frequent sequences (n-grams)
    2. If no match, “backs off” to simpler patterns
    3. Always returns the most probable word

Key Design Goal: Optimized for speed and reliability.

The Interactive Shiny App

Purpose: Provide an intuitive interface for instant prediction.

How to Use: 1. Type any phrase in the text box 2. Click the ‘Predict’ button
3. View the suggested next word

User Experience: - Simple & Clean: Minimalist design - Fast: Predictions in < 0.1 seconds - Robust: Handles any input by design

Model Performance & Trade-offs

Metric Result
Prediction Speed < 0.1 seconds
Model Size ~5 MB
Key Strength Always provides a suggestion

Design Insight:
Favors a speed-size trade-off for smooth user experience on limited resources.

Try It & Next Steps

Live Application:
https://rishiii.shinyapps.io/Capstone_Project/

(Note: Currently debugging server connection. Core model is fully functional locally.)

Future Enhancements: - Expand training data for accuracy - Provide multiple word suggestions - Implement advanced smoothing

Conclusion & Thank You
This project demonstrates a complete pipeline—from data to a deployed application—resulting in a functional predictive text engine.