A very simple pseudo-random text generator using Markov Chains. This script will generate random text from a sample text (here called the file "books.txt"). It will use something like Markov Chains. This was meant as a simple reference as how to get started with markov chat bots for fun. :)
You can see an working example with this Telegram chatbot (click here)