Objective Predict the next word from a user-entered phrase. Use an n-gram language model. Provide predictions through a Shiny application. Data English Blogs English News English Twitter
Method Convert text to lowercase. Remove punctuation. Search the trigram table. If no match, search the bigram table. If still no match, return the most frequent unigram. Example Input: I love Prediction: you
Features Text input box Predict button Displays the predicted next word Fast response using precomputed n-gram tables Screenshot (Insert a screenshot of your Shiny app here.)
Summary Built a next-word prediction model. Developed an interactive Shiny application. Used a backoff strategy to improve prediction coverage. Future Improvements Larger training dataset Four-gram or five-gram models Better handling of unknown words