Generate a novel using Markov chains
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
710 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. # NaNoGenMo 2020 - markov.py
  2. Gernerate a novel using Markov chains
  3. ## Installation
  4. ```text
  5. $ python3 -m venv venv
  6. $ . venv/bin/activate
  7. (venv) $ pip install -r requirements.txt
  8. (venv) $ python -m spacy download en_core_web_sm
  9. ```
  10. ## Usage
  11. ```text
  12. $ . venv/bin/activate
  13. (venv) $ python markov.py -h
  14. usage: markov.py [-h] [-c COUNT] [-s SEED] input [input ...]
  15. Generate a novel using Markov chains.
  16. positional arguments:
  17. input used to construct Markov transition matrix
  18. optional arguments:
  19. -h, --help show this help message and exit
  20. -c COUNT, --count COUNT
  21. generate at least COUNT words
  22. -s SEED, --seed SEED seed for random number generator
  23. ```