Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Word generator using a Markov chain

Project description

Jound is a Python program which can invent new words from the analysis of a list of words.

It can analyze a text and assemble all words it contains to a file. This list of words can then be analyzed in order to generate a statistical file which records the number of occurrences of each letter after a particular combination of two letters. Finally, the statistical file can be used in order to generate words using a Markov chain.

>>> jound assemble Moby_Dick.txt
[jound] INFO: Assemble words from target: Moby_Dick.txt
[jound] INFO: Writing 7756 words to ./words.txt

>>> jound analyze words.txt
[jound] INFO: Generate statistics from target: words.txt
[jound] INFO: Writing statistics to ./stats.bin

>>> jound generate 10 -s stats.bin
gook
shancity
ruts
woure
duchic
appermoven
speriatrawk
gantinge
faltch
jound

This project was inspired by this excellent article: La machine à inventer des mots (in French)

Project details


Release history Release notifications

This version
History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
jound-0.1.0.tar.gz (8.8 kB) Copy SHA256 hash SHA256 Source None Nov 13, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page