Skip to main content

Witter - generate random text in the style of the document you provide.

Project description

Witter

What's Witter?

Witter accepts text input, splits it into sections, or "chains", and then works out which character is most likely to follow that "chain" whenever it appears in the source text.

Once it has analyzed the source text, it generates a number of random sample pieces of text based on it.

Because of the way it uses the source text, the text that it produces will be "in the style" of the original text. It may, or may not, make sense.

It's worth noting that this isn't Machine Learning (ML), or any kind of Artificial Intelligence (AI). It's statistics, with some Monte Carlo methods thrown in.

How Do I Use Witter?

Run witter from within a virtual environment using the syntax:

witter --help

or from the command line using:

python -m witter --help

Both of these examples will display the command line options.

A simple example to get you started is:

In Windows or Linux, in a Python virtual environment, the following command will produce samples:

witter filepath.txt

or, if you want to use piping in Linux:

cat filepath.txt | witter

So, if you want to generate text from The Complete Works of William Shakespeare, and why wouldn't you?

wget https://www.gutenberg.org/cache/epub/100/pg100.txt
cat pg100.txt | witter

or if A Christmas Carol by Charles Dickens is more your thing:

wget https://www.gutenberg.org/ebooks/24022.txt.utf-8
cat 24022.txt.utf-8 | witter

You've probably noticed the utf-8 extension on one of the text files. This is a way that Project Gutenberg uses to denote UTF-8-encoded text files. witter can handle UTF-8 with no problems.

Download Statistics

Downloads Downloads Downloads

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

witter-0.0.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

witter-0.0.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file witter-0.0.3.tar.gz.

File metadata

  • Download URL: witter-0.0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-40-generic

File hashes

Hashes for witter-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c62fac7d2f53da47b39aac0c4f2ce7441ef38e3ba1a3175e6508c4611fd18717
MD5 8e51f2dbb398b32011adcdf1f4ffe9e7
BLAKE2b-256 3e937c101543ed54cb749514c8f3e2fbfb42c468b30dcfa57f91260b6576a263

See more details on using hashes here.

Provenance

File details

Details for the file witter-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: witter-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-40-generic

File hashes

Hashes for witter-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d98b227805c4ad44d43dc98c3b05c0c617fce1e8fee755f3128f39caa6339b3e
MD5 c59d36cb494bdbcdd3f3fbbf01ad1a0b
BLAKE2b-256 77f28dea4fa90874525fb7a6296c9539772ea5261a95afa63ab6cff5834f7594

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page