Drupal Update.com: Building a Chatbot using AIML parser in Drupal maintenance support plans

 

Introduction

AIML Parser module lays down the foundation for introducing AIML in Drupal maintenance support plans and creating Chatbots. As you may know, Chatbot is a program that chats with users automatically. In this blog I will introduce and highlight basic concepts that have been used for building this module.

 

Things you need to know before you start using this module:

 

1) What is AIML?

AIML (Artificial Intelligence Markup Language) is an XML-compliant language that is easy to learn, making it possible for you to customize a Chabot (Drubot) or create one from scratch within minutes.

AIML pattern syntax is very lucid, significantly less complex than regular expressions. To compensate for the simple pattern matching abilities, AIML interpreters could provide pre-processing functions to expand abbreviations, remove misspellings, etc.

 

2) What is a Chatbot?

A chat robot (Chatbot) is a conversational agent. A computer program designed to simulate an intelligent conversation with one or more users via auditory or textual medium. This Chatbot can pose as a knowledge agent in place of an FAQ or can be used as a call-center agent.

 

3) What is an AIML file?

AIML file is similar to an xml file with its own tags. AIML files are open source, and can be found over the web for free. We have uploaded a few of them here, (Download Sample AIML files).

 

Let’s take a look at an example.

WHAT ARE THE LAWS OF THERMODYNAMICS?

I’m not a physicist, but I think this has something to do with heat, entropy, and conservation of energy, right?

 

In the above example the pattern is: “WHAT ARE THE LAWS OF THERMODYNAMICS?”

And the template is: “I’m not a physicist, but I think this has something to do with heat, entropy, and conservation of energy, right?”

 

If you upload this AIML file through an AIML parser module, module will parse the file and store respective tags in database. Later you can access them through a query and your Chatbot answers the question:

 

 

“WHAT ARE THE LAWS OF THERMODYNAMICS”

Answer: “I’m not a physicist, but I think this has something to do with heat, entropy, and conservation of energy, right?

Here are some Basic Tags which are present in an AIML file and can be parsed by this module.

 

AIML – defines the beginning and end of a AIML document.

Category – defines the unit of knowledge in knowledge base.

Pattern – defines the pattern to match what a user may input to an Drubot.

Template – defines the response of an Drubot to user’s input

 

Who creates AIML tags? 

These tags are open source, with a number of communities and companies contributing to enhance them.

 

Now that we know all about Chatbot and AIML, you must be wondering how Chatbot works?

Chatbot needs AIML files as knowledge source, a database from where Chatbot can retrieve responses for the asked pattern.

 

Use Case of this module:

After the AIML tags are parsed and stored in the database, you are ready to create a Chatbot,

 

We are working on a Chatbot called Drubot.

 

Steps to create a Chatbot using AIML parser:

 

Step1: Create a custom block.

Step2: Add a robot image to the block.

Step3: Create a form in the block with a text-field.

Step4: This text field will accept input from user.

 

This accepted input is the pattern, which when queried in Drupal maintenance support plans database, gives you the response. Referring to the example stated above, if user types: ‘WHAT ARE THE LAWS OF THERMODYNAMICS?’ into the text field.

 

It displays ‘I’m not a physicist, but I think this has something to do with heat, entropy, and conservation of energy, right?’ as the response.

 

How does AIML parser module empower the Chatbot to learn?

 

There are open source AIML files available that serve this purpose. For example- science.aiml, sports.aiml, love.aiml.

 

AIML files have questions and answers related to each category. If you want to educate your Chatbot about science, then upload science.aiml and Chatbot can then use the responses stored in the database to answer science related questions.

 

We are currently working on a Chatbox in Drupal maintenance support plans download link which uses AIML parser as a dependent module.

 

Now use all this information to create your own chatbot. Feel free to connect with us for any assistance.

 
Source: New feed

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

Drupal Update.com: Building a Chatbot using AIML parser in Drupal maintenance support plans

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.