Saturday, October 8, 2011

C# .NET Web based chatterbot development with AIML - Part 2

Today I m going to describe about the basics of AIML language, I believe if you have done your home work by going through the links I provided in my last post C# .NET Web based chatterbot development with AIML - Part 1, you now have a good knowledge in AIML, but I think it would be helpful to provide a little introduction to AIML with simple examples which needs to implement our chatterbot.

AIML, the Artificial Intelligence Mark-up Language is a derived version from the Extensible Mark-up Language (XML). AIML files contain the AIML elements that comprise of data and these AIML data are written in an AIML file which starts with the tag<aiml> and end with the tag </aiml>. A full AIML file format can be represented as follows:-

Considering the above example, an AIML file consists of <category> elements which includes <pattern></pattern> and <template></template> tags.
The <pattern> tag content is matched with the user input and <template> contains the chatterbot answer. 

You can simply create an example aiml file by saving the above content to a notepad and saving it as filename.aiml. In this case we will save it as simpleExample.aiml

There you go, now you have your first aiml file with you.

There are a lot of AIML tags that can be used improve the chatterbot response. Some of those are <srai></srai> tag and  <that></that> tag. AIML use wildcard characters * and _.  We will learn some of those important tags and use of wildcard concepts in the next part.

I believe it is important to refer the AIML Reference Manual. You will learn lot of AIML tags and concepts in the reference manual.

See you next time. Bye for now. Cheers...:)

No comments:

Post a Comment