73

As a engineering student, I would like to make a chat bot using python. So, I searched a lot but couldn't really find stuff that would teach me or give me some concrete information to build a intelligent chat bot.

I would like to make a chatbot that gives human-like responses (Simply like a friend chatting with you). I am currently expecting it to be as just a software on my laptop (would like to implement in IM, IRC or websites later).

So, I am looking for a tutorial/ any other information which would certainly help me to get my project done.

David Chouinard
  • 6,466
  • 8
  • 43
  • 61
Surya
  • 4,824
  • 6
  • 38
  • 63
  • 5
    First, when you say "chatbot", how do you want to be able to interact with this bot? On a website, on IRC, on MSN, Jabber, AIM? Second, what do you want the bot to be able to do? Will it just recognise certain words in text and respond with automatic responses (e.g. if you said "Bot, wiki potato" it would respond with a link to the Wikipedia page for "potato"), or do you want some sort of human-like response? I'd suggest figuring out the answers to these before going further. – bouteillebleu Mar 14 '12 at 17:21
  • 1
    Sorry for not being specific. Here is what I am looking to make. I am first looking to make a chatbot that give human like responses..(Just a simple chat). I just want it to be as a software on my PC (Right now, i don't want to get into IRC's or websites or any IM) – Surya Mar 14 '12 at 17:28
  • You can have a look at: http://rodic.fr/blog/python-chatbot-1/ – Mathieu Rodic Jul 07 '15 at 03:25
  • I use this for fast chatbot prototypes: https://www.youtube.com/watch?v=h53SjVGMwos – Eric Marcos May 29 '17 at 16:20
  • I've written a very basic tutorial on using Rasa NLU with Node-RED for chatbot development. It's very friendly to developers and non-developers. https://blog.spg.ai/build-a-chatbot-with-rasa-nlu-dc2bfb55edb2 – Caleb Keller Nov 20 '17 at 04:37

2 Answers2

125

You can read a nice introduction to various techniques used to design chatbots here: http://www.gamasutra.com/view/feature/6305/beyond_fa%C3%A7ade_pattern_matching_.php

Also, here are a few useful links:

The Natural Language Toolkit (python) implements a few chatbots: http://nltk.github.com/api/nltk.chat.html

Simple pipeline architecture for a spoken dialogue system from the book Natural Language Processing with Python - Analyzing Text with the Natural Language Toolkit By Steven Bird, Ewan Klein, Edward Loper:

enter image description here

Mukesh Chapagain
  • 25,063
  • 15
  • 119
  • 120
Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501
16

The two places I would start with are how cleverbot works [part of a podcast] and then go through the Natural Language Toolkit Book to learn about the algorithms to use. (NLTK uses python, but the book is also a python tutorial)

forivall
  • 9,504
  • 2
  • 33
  • 58