Skip to main content

Python package which provides you a simple way to generate phrases using Markov chains

Project description

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.

Installation

Just install it using pip or any other package manager you use... Should I seriously teach you this?

pip install mc.py

Simple usage example

More examples can be found here.

import mc
from mc.builtin import validators


generator = 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mc.py-4.0.0.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

mc.py-4.0.0-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page