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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

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