AIML Files and Adding Your Own Data
The Bot does not directly read the AIMl files in the /bot/programe/aiml folder. These files are used during installation to populate the Bot database tables. So if you wish to add additional aiml files, you must upload them and then re-populate the tables. Currently there is no easy way to do this, so I created a script called Bot Updater that makes this part easy. It's available in the FlashChat Resources Area.
To add more AIMIL files, FTP them to your /bot/programe/aiml folder in binary mode and run the above mentioned script.
To add data or correct data in an existing AIMIl file, edit the file using a good text editor like Textpad. Every AIML file has Categories which contain Patterns, and Templates. Basically a pattern is used to compare the input text from a chat user, templates are the possible responses the Bot will send back. Below is an example:
<category>
<pattern>WHAT COLOR ARE LEMONS</pattern>
<template> Lemons are yellow. </template>
</category>
Notice that the pattern text must be uppercase. If a user says "What color are lemons?" the Bot will say "Lemons are yellow." Wild cards (*) can be used to make the Bot look for a more general statement from the user.
<category>
<pattern>* LEMONS</pattern>
<template> Lemons are yellow. </template>
</category>
Now the user can say anything that ends in the word "lemons" and the Bot will say "Lemons are yellow." . There are many other AIML tags that do many things... like random responses. There are too many to cover in this document, but you can read more about AIML tags at alicebot.org .
Now you can add categories to an AIML file? Let's say you want your bot to say "FlashChat is the best chat program" any time a user says "What is the best chat program?". Here's what the category might look like, and it can be added to any AIML file.
<category>
<pattern>WHAT IS THE BEST CHAT PROGRAM </pattern>
<template>FlashChat is the best chat program.</template>
</category>
You can also create your own AIML file and keep adding to it. An AIML file must have the xml header and aiml tags surrounding the categories. The file name must have the .aiml extension, like "myaiml.aiml" .
<?xml version="1.0" encoding="ISO-8859-1"?>
<aiml><category>
<pattern>WHAT DAY IS IT</pattern>
<template>Today</template>
</category></aiml>
If you're a serious BotMaster, you'll spend time looking at aiml files, reading about tags and how to use them, and experimenting on your own.