AI Zone Admin Forum Add your forum

NEWS: survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Tags used in Program AB

There are several tags in the AIML for the alice2 bot provided with the Program AB download which do not seem to be documented anywhere.  Examples are <uniq> <subj> <pre> <obj>.  These do not seem to be standard AIML 2.0 tags.  Does anyone know what their purpose is?


  [ # 1 ]

One correction needed here.  The tag in question is pred not pre.


  [ # 2 ]

The mystery was solved when I looked at the triples.txt file in the config subdirectory in the alice2 bot included with the Program AB download.  In it are a series of lines containing three sets of words, each set separated by a colon.  Among others, there are a series of lines about various animals.  For example, there are lines like “bear:sound:grrrrr” and “bear:legs:4” and so on.  There are similar lines for other animals.  Note that there is also a set file containing the names of animals, each of which has its lines in the triples.txt file.

The tags in question are ways of referencing the lines for a particular animal and there are categories in animal.aiml which use these tags extensively.  You could have several categories asking what sound a bear makes, all of which would be referenced by <srai> to a category having the pattern <pattern><set>animal</set></pattern>  is

<template>bear says <uniq><subj></star></subj><pred>sound</pred><obj>?sound</obj></uniq></template>

The text editor will probably insert errors which can’t be removed in preview and if so I’ll add another reply for error correction.

The <subj> tag will reference the first word in the bear line and the <pred> tag will reference “sound”.  The <obj> tag will ask for what is in the third line, which is “grrrrr”.  The reply will be “bear says grrrrr”.


  [ # 3 ]

The closing </uniq> tag is missing and the text editor won’t allow me enclose “sound” in <pre> tags.  Also, it won’t let me add the ‘d’, cutting it off as <pre>.  There must be a way to turn this error insertion off.


  [ # 4 ]

Hi, Hal. Your posts aren’t displaying properly because the forum software (ExpressionEngine) is actively altering some of the tags in your posted “code” for security reasons. There are a number of ways to get around this, the main one is the use of [ code ] tags (no spaces) to enclose any AIML that you wish to post. Another is to not use the < character to open AIML tags. Instead, you can type in &lt; as a replacement. It’s a pain in the butt, but it works. I’ve taken the liberty of at least partially correcting your post above with all of the AIML code in it, but to properly fix it the post would have to be not just edited, but rearranged, and I won’t do that without permission.


  [ # 5 ]

Thank you for your reply and for your corrections as well, Dave.  Before I attempt to post again I will attempt to learn more about what you have said on how deal with posting AIML.  You made the most important correction quite correctly when you rewrote the template with all the Program AB specific tags.  Any further corrections you feel are appropriate to make will be fine with me.  Perhaps you could remove all the grousing I added about the text editor as well.  Again, my thanks.


  login or register to react