Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jieggii/mc.py
:chains: Python package which provides you a simple way to generate phrases using Markov chains.
https://github.com/jieggii/mc.py
markov-chains markov-process phrase-generator
Last synced: 8 days ago
JSON representation
:chains: Python package which provides you a simple way to generate phrases using Markov chains.
- Host: GitHub
- URL: https://github.com/jieggii/mc.py
- Owner: jieggii
- License: mit
- Created: 2019-08-07T20:42:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-29T10:18:16.000Z (5 months ago)
- Last Synced: 2024-12-13T16:52:33.348Z (21 days ago)
- Topics: markov-chains, markov-process, phrase-generator
- Language: Python
- Homepage: https://jieggii.github.io/mc.py/
- Size: 847 KB
- Stars: 27
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mc.py
**mc.py** is a tiny and trivial Python package which provides you
a simple way to generate phrases using Markov chains.Docs can be found [here](https://jieggii.github.io/mc.py).
## Installation
Just install it using **pip** or any other package manager you use:`pip install mc.py`
## Simple usage example
_More examples can be found [here](https://github.com/jieggii/mc.py/tree/master/examples)._```python
import mc
from mc.builtin import validatorsgenerator = mc.PhraseGenerator(
samples=["hello world", "world of cuties", "bruh"]
)
phrase = generator.generate_phrase(
validators=[validators.words_count(minimal=4)]
)print(phrase)
# >>> "hello world of cuties"
```## Links
* [Documentation](https://jieggii.github.io/mc.py)
* [Examples](https://github.com/jieggii/mc.py/tree/master/examples)
* [Package at PyPi](https://pypi.org/project/mc.py)