Skip to main content

A text-generating Markov chain library

Project description

This library is nothing more and nothing less than a simple Markov chain text generator.

>>> from markmywords import Markov
>>> with open('declaration.txt', 'r') as f:
...     text = f.read()
>>> m = Markov(text, degree=2)
>>> m.generate(max_words=13)
"petitioned for redress in the meantime exposed to all the dangers of invasion"

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

markmywords-0.2.tar.gz (2.0 kB view hashes)

Uploaded Source

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