Markov Text Generator
Generates text based on some input text. Currently designed to parse Hamlet and write like any of the characters. Downloads the text from the internet.
Requires python3, best run inside a virtualenv.
# requires python3 # setup virtualenv python3 -m venv ./env # activate env . ./env/bin/activate # install requirements pip install -r requirements.txt
Command line usage
from sources.shakespeare import load, plays from markov import write_like_this speeches = load(plays["hamlet"]) speech = write_like_this(speeches["HAMLET"])
Running a server
You can run a server to generate speeches from your favourite characters! Fire it up as follows:
Generate a speech
## Sample Output
aside nay speak 'sblood there seek out at a divinity that ever the ominous horse hath made am easier to make the king's mess 'tis not shame to note that i for the death have it is fashion i' the mean my word for god's love make known now my weakness and thereabout of his visage together
could beauty my lord you now receive them
think it my father comes a woodcock to my lord