Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bahmanm/zebel
Zebel: The Intelligent IRC Bot - HAL's Cousin
https://github.com/bahmanm/zebel
Last synced: about 1 month ago
JSON representation
Zebel: The Intelligent IRC Bot - HAL's Cousin
- Host: GitHub
- URL: https://github.com/bahmanm/zebel
- Owner: bahmanm
- Created: 2015-01-24T22:23:26.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T21:07:20.000Z (over 2 years ago)
- Last Synced: 2024-05-02T06:09:15.536Z (6 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction #
"ZEBEL" (pronounced like "rebel") is an intelligent IRC bot._Its primary goal is gathering intelligence and secrets through contextual
analysis of the conversations on IRC._ I almost got you! :-)Jokes aside, Zebel is a simple IRC bot that whenever you talk to him, tries
to reply with a relatively relevant message.
If you're curious, drop by in _#zebel_ on _irc.freenode.org_ and have a chat
with him.# Design #
When someone in an IRC channel, talks to Zebel, e.g. sends out a public message
like `zebel: greetings`, Zebel tries to make sense of your message as below:1. It first sanitises the message; removing stop words, punctuations and
unimportant words.
2. The sanitised text is fed into natural language processing to determine
each word's role in the sentence.
3. For each word and its given role, the list of synonyms are extracted from
NLP database.
4. The words along with their synonyms are forged into a query.
5. A full-text search on the DB is performed.
6. If anything relevant enough is found, it is returned.
7. If there's no relevant enough answer in the database, a fuzzy
search for the original message is performed.
8. If fuzzy search finds a good enough answer, it is returned.
9. Even if fuzzy search can't help, Zebel simply gives up on finding a
reasonable answer and instead just picks up a message from the "confused"
category.# Implementation #
Zebel, developed with Python 3.4+, is composed of 3 main parts:1. The IRC client ([irc library](https://bitbucket.org/jaraco/irc/))
2. The database ([ElasticSearch](http://elasticsearch.org/))
3. The text and natural language processing unit ([nltk library](http://nltk.org/))# How To Run #
If you plan to run your own Zebel instance:
1. Install Python 3.4
2. Create a virtual environment for Zebel, e.g. `pyvenv-3.4 .venv`
3. Activate the venv, e.g. `source .venv/bin/activate`
4. Clone Zebel.
5. Install required packages, e.g. `cd zebel && pip install -r requirements.txt`
6. Install nltk data, e.g. `python -m nltk.downloader all`. Warning: this
downloads quite a bit of data.
7. Edit `zebel.ini` to your needs.
8. Install and run [ElasticSearch](http://elasticsearch.org/).
9. Import Zebel's quotes and messages into ElasticSearch,
e.g. `data/drop-import-all.sh`
10. Run Zebel, e.g. `cd zebel && python main.py`# Notes #
* The bot named "vandusen" in #chicken on FreeNode was a great inspiration to me.