Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cfstras/talkateev

markov chains for twitter and libpurple, in go
https://github.com/cfstras/talkateev

Last synced: about 1 month ago
JSON representation

markov chains for twitter and libpurple, in go

Awesome Lists containing this project

README

        

# talkateev

Is a small markov chain implementation which supports twitter and libpurple chatlogs.
This means you can have endless hours of fun creating conversations from your pidgin or adium logs or random twitter accounts. Also it doubles as a twitter scraper.

Have fun with it!

Also, props to ChimeraCoder for building anaconda!

## Setup

go get github.com/cfstras/talkateev

## Usage

talkateev -help # helps sometimes.

### With libpurple/pidgin/adium logs

talkateev -purple ~/.purple/logs

This will load logs from your libpurple (or pidgin, adium, gajim, etc), to train a markov chain and generate some output.
The log data is stripped from the most useless stuff (such as logon/logoff messages, partychat ramble etc) while loading. Your logs will not be edited or written in any way.

### With twitter user

For twitter access, create an app on [apps.twitter.com](https://apps.twitter.com/), create an authentication token and then create a file called `auth.json` in your current directory with these contents:

{
"ConsumerKey": "",
"ConsumerSecret": "",
"AccessToken": "",
"AccessSecret": ""
}

Then, run

talkateev -twitter

This will load up _all_ tweets from that twitter user, save them in `twitter_.json` and then train a markov chain and some output.
You can later use this downloaded data with the `-json` flag, see below.

### With already downloaded twitter data

talkateev -json twitter_.json

This will load tweets from a json file, train a markov chain and generate some output.

### some more flags

`-maxLen x`: maximum sentence length in words
`-prefixLen x`: length of prefix to search (low means less sense, but more randomness, too high (>3 for 1k tweets) will result in just the tweets)

## Development

If you want to hack on talkateev, go ahead!
I have provided a Makefile, so you can jump right in:

make deps
make start

Pull requests and comments welcome!

## License

Beerware!