python markov.py parse <name> <depth> <file>* The `name` argument can be any non-empty value - this is just the name you have chosen for the source document * The `depth` argument is a numeric value (minimum 2) which determines how many of the previous words are used to select the next word. Normally a depth of 2 is used, meaning that each word is selected based only on the previous one. The larger the depth value, the more similar the generated sentences will be to those appearing in the source text. Beyond a certain depth the generated sentences will be identical to those appearing in the source. * The `file` argument indicates the location of the source text file For example:
python markov.py parse hitchhikers_guide 2 /path/to/hitchhikers.txtThe parsing process may take a while to complete, depending on the size of the input document.
python markov.py gen <name> <count>* The `name` argument should match the name used with the earlier `parse` command * The `count` argument is a numeric value indicating how many sentences to generate For example:
>python markov.py gen hitchhikers_guide 3 Look, I can't speak Vogon! You don't need to touch the water He frowned, then smiled, then tried to gauge the speed at which they were able to pick up hitch hikers The hatchway sealed itself tight, and all the streets around it