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.5.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

witter-0.0.5-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: witter-0.0.5.tar.gz
  • Upload date:
  • Size: 4.7 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.5.tar.gz
Algorithm Hash digest
SHA256 85edae1028e21939211a62d1fdbb72475d61f2f74a275316380cfebc7f343297
MD5 0bdec2dbb3b01182cc80221d9d1c390c
BLAKE2b-256 22ad4d5737eb4105d101dc66846006548b6fdcaa58eebf542e69c16337b44d47

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: witter-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1ccd07a4cc65596c628f8739f757aac6951d413dad6130d3dfaee68583412846
MD5 53f230aaad2fdb7c81c43fadc3b8424c
BLAKE2b-256 ef6a9722302a217d98cd0a88562c0ff3fbe417a0d0eda891fd802a5ed1bffac1

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