Skip to content
/ mc.py Public

⛓️ Python package which provides you a simple way to generate phrases using Markov chains.

License

Notifications You must be signed in to change notification settings

jieggii/mc.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mc.py

mc.py is a tiny and trivial Python package which provides you a simple way to generate phrases using Markov chains.

Docs can be found here.

Installation

Just install it using pip or any other package manager you use:

pip install mc.py

Simple usage example

More examples can be found here.

import mc
from mc.builtin import validators


generator = mc.PhraseGenerator(
    samples=["hello world", "world of cuties", "bruh"]
)
phrase = generator.generate_phrase(
    validators=[validators.words_count(minimal=4)]
)

print(phrase)
# >>> "hello world of cuties"

Links

About

⛓️ Python package which provides you a simple way to generate phrases using Markov chains.

Topics

Resources

License

Stars

Watchers

Forks