I'm trying to run a script to create a chat-bot with AIML Python module, and I'm new to python, whenever I run the script to initialize the chat-bot, during the first phase of execution and compiling it shows an error importing Kernel module, as follows:
The Code Is As Below:
import aiml
# Create the kernel and learn AIML files
kernel = aiml.Kernel()
kernel.learn("std-startup.xml")
kernel.respond("load aiml b")
# Press CTRL-C to break this loop
while True:
kernel.respond(raw_input("Enter your message >> "))
The file Structure for the aiml directory is:
From the error it looks like - you are using python 3
the aiml
package works only with python 2
you should either use python 2 or use a different aiml package for python 3
I guess there are quite a few of them - below is the one I heard of