This is a markov-chain module/package/library/idk and it is dumb
Project description
error_markov
This is just your normal markov-chain module/package/library/what do you call this. If your life is on the line, don't use this, it's unreliable. This will not work I can guarantee you. Its here if you want something dumb that you can easily frame as AI.
Installation
pip install error_markov
Usage
from error_markov import DumbMarkov
bot = DumbMarkov(order=1) # If order is not specified, it will default to 2
Training
text = "your text here"
bot.train(text)
You can also use multiple sentences:
- 1 train command
text = "An apple is existing. Yes an apple is not existing."
bot.train(text)
- many train commands
bot.train("An apple is existing.")
bot.train("Yes an apple is not existing.")
Generating
bot.generate()
The code above will generate 1 sentence with a max of 50 words. It will start with a random word.
- If you want to start with something specific
inputt = "Yes an"
output = bot.generate(start=inputt)
# To start with something, do:
# start=
- If you want to change the max words
max_w = 75
inputt = "Yes an"
output = bot.generate(max_words=max_w, start=inputt)
- And then print the output:
print(output)
License
This thing is licensed under the WTFPL.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file error_markov-0.1.0.tar.gz.
File metadata
- Download URL: error_markov-0.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39b8b872001b93dc52c9b0dbaab4594711a60323b5caf911f810efe66cb3f044
|
|
| MD5 |
9a738d704e8ad7cb2d233893a8d45e48
|
|
| BLAKE2b-256 |
b56277eb3e7c221e83c19cd6a9d765aac8ff7fabc06fdd74a548de5a313810f4
|
File details
Details for the file error_markov-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: error_markov-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6748befe16c3aa43d6ede305b9759949d8aa3755e495b6545b54ca3e1a26b42
|
|
| MD5 |
9365bb131b582a4f3842a19a67430581
|
|
| BLAKE2b-256 |
d04c6c683e5dee0c84c8f691349786d7970da7bb6c61d850639188aa1bf47119
|