This is the first version of ngramtg, a simple n-gram-based random text generator that I whipped up while sitting on the couch waiting for a cold to pass.
Install it with pip:
pip install ngramtg
Features:
- Simple one-class design.
- A few custom exceptions.
- n-gram generator.
- Word frequency mapper.
- Convenience methods to add structural tokens, tokenize a corpus, and preprocess a corpus (removing and adding whitespace, etc).
- Generate random sentences from a corpus.
This release also includes:
- A simple README that serves as documentation.
- A LICENSE file (it's licensed under the MIT license).
- Pipfiles, and config files for pytest, flake8, and coverage.
- Config file for CI (gitlab specific).
- \> 90 % test coverage.
Issues "and such"
Please report issues on the issue tracker (github), or even better, fix it and create a pull request.