Skip to main content

Simple markov chain implementation

Project description

=============
PyMarkovChain
=============

PyMarkovChain supplies an easy-to-use implementation of a markov chain text generator.
To use it, you can simply do

#!/usr/bin/env python

from pymarkovchain import MarkovChain

# To generate the markov chain's language model, in case it's not present
MarkovChain().generateDatabase("This is some language to analyze")
# To let the markov chain generate some text, execute
MarkovChain().generateString()

To store its data, PyMarkovChain simply uses pickle to dump all of its data to disk.
This entails that you have to use the same version of python to store the data and to
restore the data, as pickle is one of those things that have changed from python2 to python3.

See also [code on github](https://github.com/MaxWagner/PyMarkovChain) and [PyPI page](http://pypi.python.org/pypi/PyMarkovChain/). To install, simply use pip like so:
pip install PyMarkovChain

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

PyMarkovChain-1.3.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file PyMarkovChain-1.3.tar.gz.

File metadata

  • Download URL: PyMarkovChain-1.3.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyMarkovChain-1.3.tar.gz
Algorithm Hash digest
SHA256 523aefe1018304f898c6621434f9c8351e1d345863d71e2733e6938493f5aa61
MD5 0d1837363c4f41392a6388e1df65affa
BLAKE2b-256 1e7dfacca099882009cb45d38b5ecb0f39d3f32410f1393de5ee5ac02c794913

See more details on using hashes here.

Supported by

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