The Text Predictor App is a Shiny-based web application developed as part of the Data Science Specialization Capstone Project. Its primary purpose is to demonstrate the practical use of natural language processing techniques, specifically N-gram language models, in predicting the next word in a sentence.
Key Highlights:
- Developed using pre-trained N-gram models (2-grams to 5-grams)
- Predicts the next word in a sentence based on user input
- Built with a focus on usability, clarity, and performance
- Designed for interactive exploration
The Interface
The App
Main Panel
The main panel displays the top 3 next word predictions based on user input. Each prediction is sized and colored for emphasis.
Sidebar
The sidebar features an interactive histogram that shows the frequency distribution of N-grams. Users can select the N-gram level (2–5) and adjust the number of terms to display.
Documentation
Contains a link to the full app documentation, providing users with detailed instructions on how to use the app and its features.
How It Works
The app analyzes sequences of words from a processed corpus and delivers real-time predictions, giving users insight into how language modeling works in practice.
In order:
- Uses pre-trained N-gram models from processed text
- Predicts next words based on the last few words typed
- Applies statistical modeling to sequence patterns
- Displays top 3 predictions dynamically ( First Prediction , Second Prediction , Third Prediction )
Try It Yourself!