Skip to main content

Markov chain based text generator library and chatbot

Project description

COBE stands for Code of Business Ethics. Cobe is a conversation simulator, originally a database backed port of MegaHAL but a bit more now.

There are a few relevant posts here: http://teichman.org/blog/2011/09/cobe-2.0.html http://teichman.org/blog/2011/05/singularity.html http://teichman.org/blog/2011/02/cobe.html

You can read its release history here: https://github.com/pteichman/cobe/wiki

Cobe has been inspired by the success of Hailo: http://blogs.perl.org/users/aevar_arnfjor_bjarmason/2010/01/hailo-a-perl-rewrite-of-megahal.html

Our goals are similar to Hailo: an on-disk data store for lower memory usage, better support for Unicode, and general stability.

You can read about the original MegaHAL here: http://megahal.alioth.debian.org/How.html

In short, it uses Markov modeling to generate text responses after learning from input text.

Cobe creates a directed graph of word n-grams (default n=3) from the text it learns. When generating a response, it performs random walks on this graph to create as many candidate replies as it can in half a second.

As the candidate responses are created, they’re run through a scoring algorithm that identifies which is the best of the group. After the half second is over, the best candidate is returned as the response.

Cobe installs a command line tool (called cobe) for interacting with a brain database, though it is also intended to be used as a Python api. See the documentation in the cobe.brain module for details.

To install from a tarball:

$ python setup.py install

Or from the Python Package Index:

$ easy_install pip # pip install cobe

Usage:

$ cobe init $ cobe learn <text file> $ cobe console

Project details


Release history Release notifications

This version
History Node

2.1.2

History Node

2.1.1

History Node

2.1.0

History Node

2.0.4

History Node

2.0.3

History Node

2.0.2

History Node

2.0.1

History Node

2.0.0

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.5

History Node

1.0.4

History Node

1.0.1

History Node

1.0

History Node

0.5

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
cobe-2.1.2.tar.gz (16.6 kB) Copy SHA256 hash SHA256 Source None Apr 17, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page