A Markov chain text generator written in Rust 🚀

It's messy, but gets the job done!

Note: input and generation parameters are hard-coded into the executable.

Generation

  1. Input: gpt_nonesense.txt - short text by GPT-3 Output:

    Reality, western philosophers have explored the ancient greeks, a lack, nothingness, a possibility, energy, a void that all meaning, and scholars alike. Qualities, a simple lack, nothingness is one of pure, it. Argued that nothingness is a possibility, or thought. Ones perspective, and our place in a sense, arguing that nothingness was comprised of to attain knowledge of itself, and scholars alike. Shunyata, possessing its apparent emptiness, but everything. Ones perspective, or the idea of something, which holds that the ancient greeks, or thought. Invites us to reflect on the world. All meaning, but everything. Arguing that nothingness was not simply. Others have continued to on the concept of something, purpose, but an entity in more recent times, it is a rich tapestry.

  2. Input: genesis.txt - the Book of Genesis without verses. Output:

    Off the earth, here looked upon him, and thou art. Messenger unto them, that shall be their generations of rameses, saying, the everlasting possession of. Besides jacobs anger was old age of beasts that he beget. Form, and this is a portion of their ears, that came to me, and at the. Understood them, as for a deep that thou bring upon the sons of canaan and his name of gomorrah, and blasted with him for every beast. Wondering at him, sarah should eat bread and she became into two. Grew for the bondwoman in the food but they said, in it and laban went forth, that thou hast given my voice, behold the righteous. Discerned him, when she sent and zeboim, after he said unto joseph said. Nineteen years, and he said. Embalm his firstborn esau was dry.

Steady state

dist::steady_state may be used to figure out whether the input data is random or not. The following is the output of the function, graphed. Note that the output also is sorted for clarity.