Make python based chat robot.

We are building AIML based Robot using python technology. First install python, pip and setuptools. I have made this script running in python version 2.7.11+. python 3.x may not work properly.

Prerequisites

  1. Python
  2. Pip installer
  3. Setuptools
  4. Aimlbotkernel (Python Package)

Install “aimlbotkernel”

Type command "pip install aimlbotkernel"

One’s Successful installation make directory in Desktop having 3 files

  1. Basic_Chat.aiml:

    This File contain Question and Answering.

  2. Bot1.py:

    This File contain python code for Loading and Running our Robot

  3. Std-startup.xml:

    This file contain list of AIML File to be loaded. Like “basic_Chat.AIML”. This is our Startup file.

Open “basic_chat.aiml” and Type AIML Script given in Example Below.

This File Contain Question and Related Answer.

Now Open “std-startup.xml”

At Last File bot1.py

This is our python script, which load Kernel. As well as provides answer from *.aiml file.

Final step open terminal and type command

Python bot1.py
 

Bingo !!! your robot is working. To make robot more smart update AIML files.

Share Post