Skip to main content

Very simple an easy to use Markov Chain utility for Python:

#!/usr/bin/env python

from pyMarkov import markov

text = "This is a random bunch of text"
markov_dict = markov.train([text], 2) # 2 is the ply
print markov.generate(markov_dict, 10, 2) # 2 is the ply, 10 is the length
>>> 'random bunch of text'

Metadata

Release files for PyMarkov 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyMarkov 0.1.0
File Size Uploaded
PyMarkov-0.1.0.tar.gz 3.1 kB Details

Release files / PyMarkov-0.1.0.tar.gz

Download URL PyMarkov-0.1.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
37316c4d305c4fee13d8e22354d0f7f817ee99b2b6f97568b1ab624673fae69f
BLAKE2b-256 checksum
How to use checksums
891e39e9d98be3bca1ba4aa6f6a33d50c4dead6808aefd1678ce5e891877e77f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page