Archive for September, 2008

Jabber Chat Bot Dictionary Service

September 23, 2008

Ever since I wrote this, I wanted an chat bot which would respond to messages and provide some service. One of my most desired service was to fetch word definitions. An avid user of Google’s define keyword search, I wanted it on a chat window.

Got some free time today and whipped up a dictionary service. With free libraries like xmpppy, pywordnet etc, writing the service was very easy.

Steps:

  1. Created a GMail Id to use as a Jabber Id
  2. Install xmppy and python-jabberbot which is a wrapper over xmpppy which makes it very easy to plug into a Jabber service
  3. Install WordNet for dictionary database
  4. Install PyWordNet which is a python interface for WordNet database
  5. Implement a method starting with bot_ e.g.  ‘bot_define’ so that when the user runs enters ‘define <word>, this method would be invoked and the meanings returned. See python-jabberbot link for more info.

Planning to extend this to put in more services.