In this post, we are going to create an AI-powered chatbot in python using AIML. AIML is Artificial intelligence markup language. A chatbot is that software/ script to which you can talk. It’s just like talking to a normal human over the internet. Through ages, chatbot has been evolved in terms of their accuracy. In this, we will use the brain of ALICE, developed by Dr. Wallace.[mks_toggle title=”What we will do ?” state=”open”]
- Install AIML
- Download Alice Brain
- Group into a single directory
- Create a pythonic code to run
Create a chatbot in python[mks_tabs nav=”horizontal”] [mks_tab_item title=”Step 1″] Prior to this step, I’m assuming that you have already worked on python and you know what pip is. Now Installing AIML
sudo pip install aiml
[/mks_tab_item] [mks_tab_item title=”Step 3″] Use the bellow Code snippet to do the rest
# Create the kernel and learn AIML files
kernel = aiml.Kernel()
# Press CTRL-C to break this loop
if "bye" in y:
print "Alice: Tata.."
Very well, now you have created your own chatbot in python using AIML. This is basically an offline chatbot. Liked this post then why dont you share this with your friends.