Simple chat bot projects [closed]
Asked Answered
P

7

11

What I want to do is build a simple bot which sends me a set of information stored in database to my messanger chat window [Chatting services are gTalk, Yahoo and other commonly used chating products] Also, it should be capable of accepting few predefined commands and replying them.

Is there any opensource code available for this?

Peptone answered 9/11, 2010 at 1:33 Comment(3)
what's you server side programming languagePoach
I'm still in requirement gathering and fesibility study stage. But, most probably it will be ruby. Any sugesions on that?Peptone
I used Java with the incesoft ibot sdk platform (see my answer). You can also use .NET if you prefer, doesnt really make a difference what you're doing.Polyphemus
P
5

Look up AIML (Artificial Intelligence Markup Language), it's been around a number of years and it's pretty well defined and flexible for simple stuff. You can also do pretty sophisticated stuff with all sorts of recursive templates and the results are pretty decent (as far as dumb bots go).

There's a bunch of open sdk projects that use this markup language, that will take care of matching your input patterns to a given reply stored in the xml files you'll have to configure with templates.

I worked on a messenger bot a few years back in Java using AIML for storing patterns (there are plenty APIs if you follow those links above) and used the incesoft msn bot platform. Worked out just fine.

Hope it helps.

Polyphemus answered 9/11, 2010 at 17:1 Comment(0)
A
1

For something that tries to be a bit more sophisticated, you can look at the NLTK Natural Language Toolkit:

http://www.nltk.org/

Based on Python and intended for education, but there's quite a bit of documentation and at least a couple of books (one is open source).

Alysa answered 13/11, 2010 at 3:14 Comment(0)
V
0

As far as the different chat networks go, you may want to check out Pidgin ( http://www.pidgin.im/download/source/ ) , which is a cross-platform GPLed chat client written in C & GTK+ which works with all the major chat networks.

Vicariate answered 18/11, 2010 at 16:29 Comment(0)
W
0

you may consider to find some resource of AI there is a very good example of chatbot available try to google verbot which is built with .NET library

Waites answered 19/11, 2010 at 5:17 Comment(0)
D
0

We made one pretty easy to extend in python, it works with XMPP / gtalk : http://gbin.github.com/err/

To give you an idea the minimum hello world is as follow:

from errbot.botplugin import BotPlugin
from errbot.jabberbot import botcmd

class HelloWorld(BotPlugin):
    @botcmd
    def hello(self, mess, args):         # the chatbot will then respond to the command !hello
        """ this command says hello """  # this will be the result of !help hello
        return 'Hello World !'           # this will be the answer
Duodenary answered 22/6, 2012 at 19:36 Comment(0)
W
0

I have been using Github's hubot for this purpose. My bot, when asked to tell a joke, tells a joke. (Of course I also have one that I can ask what I am supposed to be working on, and it looks up my worklist.)

GoGoBot> tell a joke about me
GoGoBot> a joke about Shell...  Let me think about it...
GoGoBot>
I heard a funny one the other day:
Chuck Norris doesn't look both ways before he crosses the street...
he just roundhouses any cars that get too close.

The bot runs on NodeJS. The api takes a regex and a callback like

robot.hear /tell a joke/i, (msg) -> msg.send 'I heard a funny joke...'

module.exports = (robot) ->
  robot.hear /tell (?:a|something) (?:joke|funny)(?: about ([a-z.]+))?/i, (msg) ->
    subject = getSubject msg.match[1], msg.message.user.name
    msg.send 'a joke about ' + subject + '...  Let me think about it...' if subject.length
    tellJoke = ->
      getJoke subject, (err, text) ->
        msg.send "Cannot compute.  #{robot.name} is about to die.\r\n#{err}".replace(/e/ig, '3') if err?
        msg.send "I heard a funny one the other day:\r\n#{text}" unless err?
    setTimeout tellJoke, 5000 * Math.random()

It was pretty easy to learn since I am already familiar with NodeJS and coffee-script. I wrote the two bots I mentioned in a few hours today.

Waspish answered 2/3, 2013 at 23:23 Comment(0)
E
-1

IMified might be an easy way to get started, it lets you build IM chat bots with server-side web development tools to receive messages, and just by making HTTP requests to send messages or request statuses.

http://www.imified.com/hosting/

IMified's API-based solution for creating and hosting instant messaging applications removes the complexity and provides a simple solution for building and deploying IM applications on multiple public IM networks using one API.

API docs here: http://www.imified.com/developers/api

An application connected to the IMified platform is in its simplest form a dynamic web page that resides on any HTTP server and listens for incoming messages then outputs a response. You specify an endpoint URL in your bots' settings. Developers may also "push" messages to users, as well as request a users presence via a REST api call to IMified's server.

Euridice answered 18/11, 2010 at 23:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.