Skip to content

Latest commit

 

History

History
6 lines (4 loc) · 531 Bytes

README.md

File metadata and controls

6 lines (4 loc) · 531 Bytes

markov-next-word

A script that will generate a word to follow any input word, based on a Markov transition matrix computed from a corpus text.

For example, if using Lincoln's Gettysburg Address as a corpus, entering the word "four" will cause the script to output "score". Entering the word "and" will cause the script to output either "seven", "that", dedicated", "proper", "so", or "dead" with equal probability.

I used this script as a tool for college-level math students to explore a simple Markov Chain on their devices.