Markovify
A simple, extensible Markov chain generator
...The software uses these patterns to construct new sentences that resemble the vocabulary and structure of the original material. Users can customize the number of preceding words considered during generation to influence coherence and variation. Built-in safeguards reduce excessive repetition of sentences from the training corpus. Markovify supports newline-separated text, custom parsing rules, and extensible generation methods. Models can be combined, serialized into JSON, and reused without repeating the training process. Its lightweight architecture makes it suitable for creative writing experiments, procedural content generation, and text-based applications.