A package to generate text via Markov chain using sample text
Project description
MarkovText is a simple Python library for reandomly generating strings of text based on sample text. A Markov chain text generator uses the frequency of words following the current state to generate plausible sentences that hopefully are passable as human text. For example, given the input text “Hello, how are you today? You look well.” and a seed of “you”, there is a 50% chance that the next word is either “look” or “today”. The current state may consist of more than just a single word.
MarkovText is written in Python, and requires numpy (though this may be changed in the future).
Main Features
Simple API to generate single or multiple sentences.
Ability to add to the sample corpus at any time.
Future Needs
Remove dependency on numpy
Create sentences that are related to each other
Installation
At this time we only support installing via the python setup.py
$ pip install MarkovText
Alternatively you can download and instll it manually (not recommended)
$ git clone https://github.com/kwkelly/MarkovText.git
$ cd MarkovText
$ python setup.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for MarkovText-0.1.dev2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfc521afd7847aa9cbb7384bcc64490ebc3956fd8ac11c2b917bab58072d7e31 |
|
MD5 | 48d030cc9d092e47cdf063a785fbf928 |
|
BLAKE2b-256 | 163ee57e3116263dd1f2845c5cca3436ddc64b745a693eea58cdef2d47ea0271 |