- Trained on a storytelling-style corpus of 10 narrative sentences.
- Uses trigram modeling to predict the next word based on the last two.
- Tokenized with
tidytext
and filtered usingdplyr
. - Prediction logic:
- Extract last two words from input.
- Match with trigram dataset.
- Return most frequent third word.