docs | |
---|---|
tests | |
package |
Write a random novel using markov chains.
- Free software: BSD license
pip install markov-novel
import markovify import markov_novel with open('path/to/corpus.txt') as f: text = f.read() # Build the model. text_model = markovify.Text(text) novel = markov_novel.Novel(text_model, chapter_count=1) novel.write(novel_title='my-novel', filetype='md')
The novel will be written to your current working directory.
https://python-markov-novel.readthedocs.io/
To run the all tests run:
tox
Note, to combine the coverage data from all the tox environments run:
Windows | set PYTEST_ADDOPTS=--cov-append tox |
---|---|
Other | PYTEST_ADDOPTS=--cov-append tox |