2026-01-14

Project Overview & Model

Goal:
Build a next-word prediction model and deploy it as a Shiny web application.

Training Data: - Sample text sentences
- Converted to lowercase and tokenized

Model: - Bigram (2-gram) frequency table
- Predicts next word based on last word of input

Fallback: - If no match found → returns “no_prediction”

Shiny App Interface

User Steps: 1. Enter a phrase in text box
2. Click “Predict Next Word”
3. View predicted word instantly

Interface: - Text input
- Action button
- Output display panel

Example Predictions

Input Phrase Predicted Word
i love data
data science is
machine learning is
unknown phrase no_prediction

Result:
Fast and responsive predictions

Conclusion

Experience: - Clean and easy-to-use interface - Instant prediction response

Strengths: - Lightweight model - Fully deployed online - Demonstrates NLP pipeline

Future Work: - Train on larger dataset - Add higher-order n-grams