Author: Mahavir Rajpurohit
Date: 2026-01-13
2026-01-13
Author: Mahavir Rajpurohit
Date: 2026-01-13
Problem
Typing content takes time. Predicting the next word can improve writing speed.
Goal
Build a Shiny app that predicts the next word using an n-gram language model.
Approach - Build a text corpus - Tokenize text into bigrams (two-word sequences) - Count bigram frequencies - Extract last word from user input - Predict the most frequent next word
Tools Used - R (tidyverse, tidytext) - Shiny
Input