A python script that uses markov chains and nGrams to generate texts (for example, presidential speeches), based on source examples.
Easy to use as a python module. Just input source texts, and see the algorithm generate randomized ones based on them.
Yields funny results, even when they're nonsensical.
WHAT I DID
- Created a nGrams model builder that analyzes texts for the probabilities of a token appearing in it.
- Implemented a function capable of merging multiple models, to facilitate inputting multiple source texts.
- Implemented a Markov Chain generator that can generate randomized texts based on the nGram model and a seed.