Skip to main content

Spew words using bigram frequencies

Project description

claptrap

I'll stop talking when I'm dead!

Generate random phrases using bigram frequencies. Counts some punctuation as objects when creating bigrams so it includes realistic punctuation.

Useful if you want something maybe humorous to put into text fields other than totally random strings.

CLI

$ claptrap drac -l40 -n5
Sighted. Here; if trying to pull them ov
The horrible doubt himself shone with mo
Concealment of despair seized some islan
Of them on the room with a storey lowers
Whom? He made pets of my very happy look

Free-style wub wub

$ claptrap wub -l10-50 -n5
WUB; Wub wuB wUB wUB Wub
wUb. wUB Wub; WuB?
WUB: wub WuB WUb Wub WUb wuB WUB: wUB WUB WuB
wUB WuB wUB, wUb WUB.
WUb WUB wUB wuB WUB WuB

Library

import claptrap

phrasegen = claptrap.GraphPhraseGenerator.from_resource('dracula')

for _ in range(10):
    print(phrasegen.phrase([60, 80])
Should tear or to the world! Jack, a little bargaining he remembered
Me what steps, as poor Harker's hand. Shall, and fed the left
Out two, and thicker and go to notice any particular part of
His wife dead! And feed! Oh, as much. I knew that churchyard
He said solemnly as we should have, but flew to cheer each of
His where to the snow, but we destroyed them both hands all my
Eyes closed behind us so thankful to two atmospheres, with the
Driver with dust had better not. The hand; instantly formed round
Her. He ask me. I told me not move forward hesitatingly; and
A few people are well, we have to home with the tide, for you

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

claptrap-0.2.0.tar.gz (193.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claptrap-0.2.0-py2.py3-none-any.whl (188.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file claptrap-0.2.0.tar.gz.

File metadata

  • Download URL: claptrap-0.2.0.tar.gz
  • Upload date:
  • Size: 193.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for claptrap-0.2.0.tar.gz
Algorithm Hash digest
SHA256 365d5e767d0306f75fc215b7630889f470c00c26c9ca1103a867ee7bc2172a54
MD5 89554cdd908d6df44c0900584e9ccb90
BLAKE2b-256 4c32a0635784123c0edd9a53a6391e9a20fef56ffa22ba8152e98df0ee4ef071

See more details on using hashes here.

File details

Details for the file claptrap-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for claptrap-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 531bde4856277e98371b24a2d872606382bed2a0e145e7adb2ce799470965e5f
MD5 152828ba484e3e66ddf29193e4306d3a
BLAKE2b-256 1a97e809444f2b61d4b6175b6c91438d891893bd0761a8b89fbf6785345df4c9

See more details on using hashes here.

Supported by

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