What is AIML (Artificial Intelligence Markup Language)
Increased development and spread of information technology and the internet had led to creation of distinct ways to communicate in virtual environments. The cognitive interfaces provide a new form of interaction between humans and systems. The graphical user interface is based on navigational systems which use hypertext and or option with selection using buttons and menus.
However, humans prefer to use natural language as a medium of communication hence research has been made regarding development of natural interfaces , usage of chatter bots or systems designed to simulate a conversation with humans require moderation hence AIML ( Artificial Intelligence Markup Language) was created.
In this article we will learn more about AIML language, how it works and where it is used etc.
About AIML
AIML was created by Wallace in collaboration with six software developers communities from 1995 to 2000 based on the concept of Pattern recognition, matching pattern technique. It is applied to natural language modelling for dialogue between humans and chatbots which follow a stimulus response approach. A set of possible user input is modelled and for each of stimuli , pre programmed answers were built to be displayed to the user.
The ALICE (Artificial linguistic internet computer entity) chatbot was first to use AIML language and interpreter. In ALICE , the AIML technology was responsible for pattern matching and to relate user input with a response chatbot knowledge base (KB).
The AIML language purpose is to make the task of dialogue modelling easier as per stimulus-based approach. It is an XML based markup language and tag based. Tags are identifiers which are responsible to make code snippets and insert commands in the chatterbot. AIML defines a data object class called AIML which is responsible for modelling patterns of conversation.
Syntax
The general form of an AIML object/command / tag has the following syntax.
<command> ListOfParameters </command>
An AIML command comprises a start tag <command> , a closing tag </command> and a text (ListOfParameters) which contain the command’s parameter list. AIML is interpreted language and as such each statement is read, interpreted and executed by a software known as interpreter. AIML is based on basic units of dialogue, formed by user input patterns and chatbot responses.
These basis units are known as categories, and a set of all categories make chatbot KB. The most noted tags in AIML are : category, pattern and template. The category tag defines the unit of knowledge of the KB, pattern tag defines possible user input and template tag sets the chatbot response for a specific user input.
The AIML vocabulary comprises of words , spaces and special characters “*” and “_” which are wildcard characters. Wildcards are used to replace a string (Word or sentences) . The AIML interpreter gives high priority to categories having patterns which use wildcard “_” and “*” and they are analysed first. Each object/tag has to follow XML standard hence an object name cannot start with a number and blanks are not allowed.
AIML Tags
Each AIML file begins with <aim1> tag and is closed by a </aim1> tag. This tag contains the version and encoding attributes. The version attribute identifies the AIML version used in KB. The encoding attribute identifies the type of character encoding which will be used in the document.
Example of AIML code
<aim1 version = “1.01” encoding=”UTF-8”
Basic units of AIML dialogue are called categories. Each category is a fundamental unit of knowledge contained in chatbot KB. A category consist of a user input in the form of a sentence and a response to user input presented by chatbot and an optional context
A KB written in AIML is formed using a set of categories. The categories are organized using subjects and stored in files with .aim1 extension. Category modelling is made using the <category> and </category> tag.
<category>
<pattern> hello Bot </pattern>
</template>
</category>
The pattern tag contains a possible user input. In each category there is a single pattern and it must be the first element to be set. Words are separated by single spaces and wildcards can replace parts of a sentence.
The template tag contains possible chatbot answers to the user. It must be within scope of a <category> tag and placed after the <pattern> tag. Most of the chatbot information is bound to this element. This tag can save data and activate other programs or responses.
AIML use cases
- Virtual agents in the form of chatbots as customer service agents to interact to humans and answer their queries
- Deriving meaningful information from digital images, videos and other visual inputs
- Self-driving cars powered by sensors which aides in mapping out immediate environment of the vehicle
- Enable emotions expressed by humans to be read and interpreted using advanced image processing or audio data processing
- Space exploration
- Robotics process automation
- Biometrics recognition and measurement to foster organic interactions between machines and humans
Continue Reading:
Artificial Intelligence vs Machine Learning
Data Science vs Artificial Intelligence
Tag:New technology