## Markov chain

### Generating Text with Markov Chains

Markov Models can be used to create n-gram based language models - that is they can be used to calculate the probability of subsequent tokens after each n-gram.

To train a Markov Model we need some source text to train on.

When training a Markov Model we need to choose the window size - the count of tokens that are used as the basis for each probability table of subsequent tokens.