Markov chains are a list ngrams (grouped portions of text) from a work of text with probabilities of what will come next grouped to each ngram. You can then use this to generate new text based on those probabilities.
Here’s some made with Alice in Wonderland:
cupboards as long ago anything; she had began dream. There isn't,' said to Alice laughed so far
'Ugh!' said the puppy began, in a low, trembling voice. 'I've offended tone, and raised him declare it's
ven't think I can't help that,' said the Hatter. He had caught there ought Alice thought she went on,
A Markov chain can also be made with words instead of ngrams.
dogs The Pool of uglifying it flashed across her draw the baby at last concert on in a crimson velvet cushion resting their slates when he went Alice its voice Fetch me for some executions I make it unfolded the Pigeon but it was too much of course the other the Mouse who will you want to the March Hare I didnt interrupted in Alice who had put his scaly friend replied counting off her hand round THAT direction waving its full of mine said to set the Duchess asked triumphantly pointing to your waist the slate with Seaography then another moment he knows it is wrong and marked poison or something better