You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
alistair f331fc28e9 readme 4 years ago
SQLiteCpp@01cf6f2d2a reorgansie 4 years ago
libtelegram@a0c52ba4aa works 4 years ago
.gitmodules reorgansie 4 years ago
CMakeLists.txt reorgansie 4 years ago
Readme.md readme 4 years ago
bot.cpp transaction import 4 years ago
bot.h transaction import 4 years ago
sqlite_markov.h transaction import 4 years ago

Readme.md

Overview

Relevant Blog Post

This is a markov-chain text generation bot for telegram. Add it to a group and it will listen to the conversation to build its markov chain databse. It will reply periodically to a random message using its last word as the seed. It looks like a reallly basic form of keyboard autocomplete.

It can also import plain-text files. This is useful if you want it to loosely imitate the prose of a specific author.

Theoretically it should support an arbitrary-order markov chain using the same sqlite3 database file.

# import to a 2nd order markov chain stored in `table_name` on `markov.db3`
$ ./bot -i importfile.txt -n "table_name" -o 2 -d "markov.db3"
# run bot using markov chain stored in `other_table_name` on `markov.db3`
$ ./bot -n "other_table_name" -o 3 -d "markov.db3"

Building on Fedora

Boost is static linked so it can be deplyed to a server without installing boost.


sudo dnf install boost-devel sqlitecpp-devel openssl-devel boost-static
cmake .
make