Python implementation of a Hidden Markov Machine that generates text.
Project description
Hidden Markov Machine (HMM)
This module provides the function write(prompt, length, bias, training) which adds length words to the end of the prompt. If the bias is set to 0 (the minimum), there will be no bias, and the closer it gets to 1 (the maximum) nouns in the prompt are more likely to be chosen. If a bias is not provided, the default is 0. The training variable is optional, it defaults to a file of writing I've done in the past, but can be set to a different file. If you choose to change the training, change it to a txt file hosted online, e.g. "https://raw.githubusercontent.com/TobyCK/markov-chain/master/Training/dataset2.txt". Below is an example of how to use the module:
from hmm_write import hmm
hmm.write("The quick brown fox jumps over the", 50, 0.3)
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
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 hmm_write-0.3.3.tar.gz.
File metadata
- Download URL: hmm_write-0.3.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9149d5643d492de12db96cdf910c331c3f7781b89dff7cb74d55ac0bb1037e2a
|
|
| MD5 |
40e0acf939d08abe5f08ec867e55d512
|
|
| BLAKE2b-256 |
eac4049a095c1bab8cf089fd24591ccae77a5c592c4fbc6729f140c6031b240d
|
File details
Details for the file hmm_write-0.3.3-py3-none-any.whl.
File metadata
- Download URL: hmm_write-0.3.3-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b17af57f9601f49e8f937c95ef773be89b6f6fa5f5d8deb0e52e141e55d28d17
|
|
| MD5 |
677fb149db323c9945813e0f3d85b112
|
|
| BLAKE2b-256 |
d2574ceda0cb594b6fa74a53c6236b28fec6e904d7490672e979314281bb1bf9
|