Skip to main content

Provide information for related metadata

Project description

Ingest corpuses of text and output a sentence generated from markov chains

Installation

After installing and configuring helga, use:

pip install helga-markovify

Add ‘markovify’ to your settings and restart helga.

Usage

Note: Please use punctuation in your text. This is a tough sticking point in practice, but it is helpful.

Command syntax:

ingest <topic> <learning_type> <learning_type_source>
generate <topic>

Arguments:

topic: like tagging, so helga can respond in different ways
learning_type: how helga is going to ingest. Can be text, a url to raw data,
a relatively pathed (relative to plugin folder) file, or a twitter account.
learning_type_source: the corresponding data e.g. plaintext if learning_type
is "text", a url if "url", twitter id if "twitter"

Examples

Example commands (url):

!markovify ingest zen url https://hg.python.org/peps/raw-file/tip/pep-0020.txt
!markovify generate zen
helga> Sparse is better than ugly.

Alternate example (text):

!markovify ingest hitler text "Mein Kampf is the best Kampf."
!markovify ingest hitler text "Don't be stupid, be a smarty. Come and join the nazi party."
!markovify ingest hitler text "Make America hate again."
!markovify ingest hitler text "Kampf America is hate nazi smarty. Hate party again filler sentence. America is the best at being terrible."
!markovify generate hitler
helga> Mein Kampf is the best at being terrible.

Some example commands (dpaste):

!markovify ingest zen dpaste http://dpaste.com/1JF2P4S
!markovify generate zen
helga> If the implementation is hard to explain, it may be a good idea.

If you have somehow screwed up or broken a corpus, you may drop it completely:

!markovify drop zen

TODO

  • Tweets

  • Generate default data from channel

  • Add settings for max corpus count, max corpus length

  • Travis

  • Talk about specific topics

  • Keep history aka conversations

  • Weighted round-robin type conversation, e.g. trump vs jesus vs samuel l jackson vs kim jong un

License

Copyright (c) 2016 Jon Robison

See included LICENSE for licensing information

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

helga-markovify-1.0.6.tar.gz (48.2 kB view details)

Uploaded Source

File details

Details for the file helga-markovify-1.0.6.tar.gz.

File metadata

File hashes

Hashes for helga-markovify-1.0.6.tar.gz
Algorithm Hash digest
SHA256 db210b1f36559834c8f548d4602651a8b87aef2070c77a917a46e6d83db53fef
MD5 0f87416174fcc4e0680116afa7eada24
BLAKE2b-256 7a5f98f9d97c3eda95d865ef5a29bef68985d6cf33910c7e1e456d2992d9b33f

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