######  ######            ##

                         # ## #   ##  ##           ##

                           ##     ##  ##  ####   ######

                           ##     #####  ##  ##    ##

                           ##     ##  ## ##  ##    ##

                           ##     ##  ## ##  ##    ## ##

                          ####   ######   ####      ###

 

                         AIML Implementation Reference

                                 Version 1.00

                     By P.E.Colla (LU7DID) (c) 2000,2001

DISCLAIMER

 

AIML is (c) the AI Foundation 2000, this document uses the AIML 1.0 standard,

for a full description of the tagset refer to the original AIML specification.

 

All experimental tags implemented by TBot doesn't have support from the

AI Foundation nor there is any guarantee it would ever be supported, use

them at your own risk.

 

 

Table of Contents

 

DISCLAIMER.. 1

Table of Contents. 1

AIML Reference. 2

Standard AIML Tags and Predicates. 2

<aiml> AIML Header Tag. 2

<alice> AIML Header Tag. 3

<bot> Retrieve Bot Property. 3

<category> Category entry. 3

<condition> Conditional Execution. 3

<date/> Current Date. 3

<formal> Formalize a Sentence. 4

<get> Retrieve the value of a Variable. 4

<gossip> Store a Gossip. 4

<id> Address of Connected client 4

<if> Conditional Execution. 4

<input> Retrieve the last user Input 5

<javascript> Execute Script Statements. 5

<learn> Load an AIML file. 5

<li> Ordered List Item.. 5

<lowercase> Lowercase a String. 6

<pattern> Define a Pattern. 6

<person> Person Shift 6

<person2> Person Shift 6

<random> Pick a Random Answer 6

<sentence> Formalize a Sentence. 7

<set> Set a Variable. 7

<size/> Current Bot Memory (Categories) 7

<srai> Recurse Pattern. 7

<sr> Recurse Star Part of the Pattern. 7

<star> Retrieve Star Contents. 8

<system> Execute System Command Shell 8

<template> Define a Template for the response. 8

<that> Establish a Context 8

<thatstar/>. 9

<think> Nullify Output 9

<topic> Topic Definition. 9

<topicstar/>. 9

<uppercase> Uppercase a String. 9

<version/> Current Bot Version. 9

Non-Standard AIML Tags and Predicates. 10

CUSTOM TAGS. 10

<define> Define a Custom Tag Structure. 10

<tag> Define a new Custom Predicate. 10

<mapped> Define the resolution of a new Predicate. 11

PATTERN MANIPULATION TAGS. 11

<replace> String Replacement Structure. 11

<subst> String Replacement Predicate. 11

<iterate> Iterate Statements. 12

<pp> External Pattern Processor 12

<spc> Space. 13

<trimleft> Trim left side of the string. 13

<trimright> Trim right side of the string. 13

<flush> Flush current answer 13

CONFIGURATION TAGS. 14

<property> Bot Property. 14

SPECIAL PROCESSING TAGS. 14

<botsaid> Stack of previous responses from the bot 14

<bye> Terminate a Session. 14

<now> Currently Evaluated Pattern String. 14

<clientsaid> Stack of previous inputs from the user 14

EVENTS TAGS. 14

<event> Fire Event 15

<onevent> Match an Event 15

<timer> Timer 15

CACHE MANIPULATION TAGS. 15

<save> Save Categories. 15

<forget> Removes a Topic. 16

MACRO DEFINITION TAGS. 16

<macro> Macro Definition. 16

<new> Define a new Macro Predicate. 16

<definition> Define the resolution of a new macro. 16

Secondary Brain AIML non-standard extensions. 17

<train> Train the Inference Engine. 17

<srai> Recurse the Pattern to the Secondary Brain. 17

XML/SOAP Extensions. 17

<learn> Load an AIML file. 17

<srai> Recurse a Pattern to a Remote Bot 17

<learn> Dynamic Creation of AIML. 18

Standard Non-Primitive AIML Tags and Predicates. 18

<bot_xxxx> Bot Properties. 18

Irregular Tags (Bot Properties) 18

<beforethat>,<justthat>,<justbeforethat>. 18

<get_name>. 18

<set_animagent>. 19

<set_female>. 19

<set_it>. 19

<set_male>. 19

Ignored Tags and Predicates. 19

 

 

AIML Reference

 

TBot implements AIML thru the combination of

 

      * AIML 0.9 Tagset.

      * AIML 1.0 Tagset.

      * non-Standard AIML experimental tags.

 

 

Standard AIML Tags and Predicates

 

 

The following supported tags are part of the standard AIML set.

 

<aiml> AIML Header Tag

 

Format: <aiml></aiml>

Use: AIML File Header Only

 

Begin and termination of an AIML file.

 

<alice> AIML Header Tag

 

Deprecated version of <aiml>, currently ignored.

 

 

<bot> Retrieve Bot Property

 

Format: <bot name="botpropertyname"/>

Use: Pattern and Template Side

 

Returns the configured property "botpropertyname", this property is read-only

from the AIML point of view and it's defined only thru bot configuration

facilities.

 

 

 

<category> Category entry

 

Format: <category></category>

 

Definition of an group of structures to manage a unique stimuli-response

combination.

 

The following AIML tags are the only valid to be used at the next level:

 

?       <pattern>

?       <template>

?       <that>

 

 

<condition> Conditional Execution

 

Format: <condition></condition>

Use: Template Side

 

Evaluates part of a template based on a condition.

 

Several forms are supported.

 

Form A - Multiple Values

 

<condition name="varname">

  <li value="value1">...</li>

  <li value="value2">...</li>

  <li value="value3">...</li>

</condition>

 

Form B - Single Value

 

<condition name="varname" value="value1"> ... </condition>

 

 

<date/> Current Date

 

Format: <date/>

Use: Template Side

 

This tag is functionally equivalent to <get name="date"/> and it's not

natively supported by TBot.

 

It's implemented as a custom tag in the file sys-aiml10.aiml.

 

 

<formal> Formalize a Sentence

 

Format: <formal></formal>

Use: Template Side

 

This predicate returns the content with each first word of the sentence

capitalized.

 

 

<get> Retrieve the value of a Variable

 

Format: <get NAME="varname"/>

Use: Template Side

 

This predicate returns the current content of the variable named "varname",

if the variable has not been defined it returns the empty string.

 

The following aliased forms are also supported:

 

*  <get_xxxxx/> Return the value of the variable xxxxx.

 

 

<gossip> Store a Gossip.

 

Format: <gossip></gossip>

Use: Template Side

 

The resolved template wrapped by this command will be stored under the

label "Gossip" on the chat.log file.

 

 

<id> Address of Connected client

 

Format: <id/>

Use: Template Side

 

This tag is functionally equivalent to <get name="ip"/> and it's not

natively supported by TBot.

 

It's implemented as a custom tag in the file sys-aiml10.aiml.

 

 

<if> Conditional Execution

 

Format: <if name="varname" value="value">

         <then></then>

         <else></else>

        </if>

Use: Template Side

 

The content of the variable varname will be compared with the value, if

a match occurs the child tags of <then> will be executed otherwise the

child tags of <else> will be executed.

 

Note: This is an AIML 1.0 standard tag but the actual child structure

(<then>/<else>) hasn't been clearly defined as part of the standard, the

current implementation of TBot might well be non-standard once the

final definition is made.

 

 

<input> Retrieve the last user Input

 

Format: <input index="N"/>

Use: Template Side

 

This predicate returns the Nth input given by the user and being evaluated,

if recursions are made thru the usage of <srai> the value is preserved from

the original input.

 

If no index is indicated it defaults to "1", if an attempt to recover a

previous non-existing user input it returns the empty string.

 

 

 

 

 

<javascript> Execute Script Statements

 

Format: <javascript></javascript>

Use: Template Side

 

Enclosed a JavaScript scriptlet, currently TBot uses MS JScript.EXE to process

the script, so any JavaScript file able to run under it should be fine to use.

 

TBot wraps the supplied scriptlet with a simple document model that exposes

all bot properties and variables at the execution moment.

 

The JavaScript segment should be represented as CDATA to avoid conflicts

with reserved XML characters used on it.

 

 

<learn> Load an AIML file

 

Format: <learn>filename.aiml</learn>

 

 

Load an AIML file named "filename.aiml from the configured aiml directory.

 

 

<li> Ordered List Item

 

Format: <li></li>

Use: Template Side

 

List of mutually exclusive template side AIML structures to be associated with an answer, usually

employed together with <random>, <iterate> or <typeof> definition structures.

 

This tag is usually a child of either a <condition>,<if> or <random> tags.

 

 

<lowercase> Lowercase a String

 

Format:

 <lowercase/> or <lowercase></lowercase>

Use: Template Side

 

Returns the current pattern string with cases turned into lower.

 

 

<pattern> Define a Pattern

 

Format: <pattern></pattern>

Use: category level component.

 

Groups a pattern for resolution, patterns could be structured as:

 

*  A fully defined set of words (i.e. "GOOD MORNING").

*  A partially defined set of words and one or more wildcards (i.e. "_ GOOD MORNING *").

 

Some non-standard AIML features are supported by TBot.

 

*  A combination of text and get/bot tags (i.e. HELLO <get name="name"/>).

*  One external processor definition (i.e. <pp NAME="re">(hello|hi)</pp>).

 

Also, TBot supports more than one pattern on each category.

 

 

<person> Person Shift

 

Format: <person></person>

Use: Template Side

 

This tag is not natively supported by TBot and needs to be implemented thru

custom tag facilities.

 

The distribution implements it thru TBot non-AIML standard macros in the

file sys-macros.aiml.

 

 

<person2> Person Shift

 

Format: <person2></person2>

Use: Template Side

 

Idem as <person>

 

The doesn't currently implements it but in case of need might be implemented

in a similar way than <person>.

 

 

<random> Pick a Random Answer

 

Format: <random></random>

Use: Template Side

 

 

Groups a set of template side statements (usually in a list form) that will

be picked at random when the template is evaluated.

 

 

Example:

 

<template>

<random>

<li>One answer</li>

<li>Another Answer</li>

</random>

</template>

 

 

<sentence> Formalize a Sentence

 

Format: <sentence></sentence>

Use: Template Side

 

This predicate returns the content with the first word of the sentence

capitalized.

 

 

<set> Set a Variable

 

Format: <set NAME="varname"></setvar>

Use: Template Side

 

Set the value of the variable named "varname" with the result of the

evaluation of the enclosed AIML tags, returns the value stored.

 

The following aliased forms are also supported:

 

*       <set_xxxx></set_xxxx> Set the value of the variable xxxx.

 

 

<size/> Current Bot Memory (Categories)

 

Format: <size/>

Use: Template Side

 

This tag is functionally equivalent to <get name="size"/> and it's not

natively supported by TBot.

 

It's implemented as a custom tag in the file sys-aiml10.aiml.

 

 

<srai> Recurse Pattern

 

Format: <srai></srai>

Use: Template Side

 

Recurses the pattern evaluation of the current value of the enclosed

combination of AIML tags and text.

 

 

<sr> Recurse Star Part of the Pattern

 

Format: <sr/>

Use: Template Side

 

This tag is functionally equivalent to <srai><star/></srai> and it's not

natively supported by TBot.

 

It's implemented as a custom tag in the file sys-aiml10.aiml.

 

<star> Retrieve Star Contents

 

Format: <star {INDEX="index")/>

Use: Template Side

 

This predicate returns the content associated with a "star" on the pattern

side, by default the index is assumed as "1" (first star from left to right),

non existing indexes are returned as ''.

 

 

<system> Execute System Command Shell

 

Format: <system></system>

Use: Template Side

 

Encloses a platform dependent system commands to be executed (non-aiml). Requires implementation of

the system shell access mechanism at the listener object.

 

It's highly advisable that the shell commands are represented as CDATA, this

is not currently a standard AIML requirement.

 

i.e.

   <system>

     <![CDATA[dir *.* > filename]]>

   </system>

 

 

 

<template> Define a Template for the response.

 

Format: <template></template>

Use: category level component.

 

 

Groups a set of AIML directives to be executed when the associated <pattern> or <onevent/> of the current

category matchs the input under a valid <that> context.

 

 

<that> Establish a Context

 

 

Format: <that></that>

Use: category level component.

 

 

Establish a context for the current category evaluation, the template will

be executed if the current input matches the <pattern> of the category and

the last bot response matches the content of <that>.

 

Example:

 

<category>

<pattern>yes</pattern>

<that>do you feel good?</that>

<template>

I'm glad to hear that.

</template>

</category>

 

The template side will be evaluated only if the current input form the user

is "yes" and the last response from the bot was "do you feel good?".

 

<thatstar/>

 

Format:

 <thatstar index="N"/>

 

Use: Template Side

 

Recovers the content of "*" in a <that> structure, the index allows to

retrieve if more than one. "1" refers to the leftmost *.

 

If the index is omitted it defaults to "1".

 

<think> Nullify Output

 

Format: <think></think>

Use: Template Side

 

Encloses a set of AIML directives to be executed but the result of the evaluation is "nullified" from the

perspective of the response to the user.

 

<topic> Topic Definition

 

Format: <topic name="topicname" {LANGUAGE="language",USE="{RESERVED|PRIVATE|PUBLIC")

 

Start of a conversation topic, groups a set of categories with a common conversation topic and controls the

flow of the conversation.

 

<topicstar/>

 

Not supported by TBot.

 

<uppercase> Uppercase a String

 

Format:

 <uppercase/> or <uppercase></uppercase>

Use: Template Side

 

Returns the current pattern string with cases turned into upper.

 

 

<version/> Current Bot Version

 

Format: <version/>

Use: Template Side

 

This tag is functionally equivalent to <get name="version"/> and it's not

natively supported by TBot.

 

It's implemented as a custom tag in the file sys-aiml10.aiml.

 

 

Non-Standard AIML Tags and Predicates

 

The following tags and predicates aren't part of the standard AIML set,

inspiration for some of them comes from online discussions about the AIML

functionality or research needs.

 

However, none of them has been accepted as part of the AIML set and nothing

ensure they would ever be.

 

Use them with care and refrain to include them on files being part of the

AIML standard set.

 

CUSTOM TAGS

 

<define> Define a Custom Tag Structure

 

Format: <define></define>

Use: Define a New Tag Structure, could be defined only under <aiml> or <topic>,

similar hierarchy than <category>

 

Higher level to start the definition of a new tag; new tags could be defined

as any valid combination of primitive tags and previously defined custom tags.

 

New tags must be defined prior to any usage of them on AIML files.

 

New tags are evaluated and expanded into the primitives at load time.

 

The basic structure to define a new tag would then be:

 

<define>

<tag>customtag</tag>

<mapped>...(definition of custom tag using AIML predicates)...</mapped>

</define>

 

It's worth note the functionality of this structure could be avoided with

the usage of the XSL support provided by the bot.

 

 

<tag> Define a new Custom Predicate

 

Format: <tag></tag>

Use: Define a New Tag Structure, could be defined only under <define>

 

Defines a new tag structure, the enclosed AIML structure will be the

newly defined tag structure.

 

Example:

 

<define>

<tag>

<bot_name/>

</tag>

<mapped>

<getvar NAME="botname"/>

</mapped>

 

Here the new empty tag "<bot_name/>" is defined as an alias to

"<get NAME="botname"/>"

 

<define>

<tag>

<set_bot_name></set_bot_name>

</tag>

<mapped>

<set NAME="botname"></set>

</mapped>

</define>

 

Here the new tag "<set_bot_name>" is defined as an alias to

"<set NAME="botname"></set>".

 

Please note that formal XML formatting rules must be followed on the definition

of the new tag.

 

<define>

<tag>

<set_newname/>

</tag>

<mapped>

<set NAME="newname><input/></set>

</mapped>

</define>

 

Here the new empty tag "<set_newname>" is defined in terms of the

evaluation of the "<set>" tag with the current content of the pattern

side as given by the predicate <input/>.

 

 

<mapped> Define the resolution of a new Predicate.

 

Format: <mapped></mapped>

Use: Define a New Tag Structure, could be defined only under <define>

 

Defines the predicates that would resolve the tag being defined.

 

PATTERN MANIPULATION TAGS

 

<replace> String Replacement Structure

 

Format:

 <replace>

   <from></from>

   <with></with>

</replace>

 

Use: Template Side.

 

Replaces the string chain evaluated under <from> with the string chain

evaluated under <with> for the current evaluation.

 

This is a tag intended to perform replacements when either the <from> or

<with> arguments requires the usage of AIML predicates to evaluate an

expression, otherwise use the <subst/> predicate.

 

<subst> String Replacement Predicate

 

Format:

 <subst FROM="sourcestring" TO="targetString"/>

Use: Template Side.

 

Replaces the SourceString by the TargetString whenever it appears on the

current pattern (<now/>).

 

Use with <iterate> to produce multiple replacements on a single category.

 

<iterate> Iterate Statements

 

Format:

 <iterate></iterate>

Use: Template Side

 

Iterate through all the AIML statements below the level and feed each

predicated with the result of the previous as if it were the current input.

 

Example:

 

<template>

<iterate>

<subst FROM="I'm" TO="I am"/>

<subst FROM="He's" TO="He is"/>

</iterate>

</template>

 

Then a given pattern of the category will be used as the input of the first

<subst> and the resulting (transformed) string will be feed as input to the

second <subst>.

 

<pp> External Pattern Processor

 

Format:

 <pp NAME="pattern processor"></pp>

 Use: Pattern Side

 

Used to evaluate the enclosed expression with an external pattern matching

processor.

 

Currently TBot supports only Regular Expressions as an external pattern

processor (<pp name="re">pattern</pp>).

 

When used it must be the only content of the pattern since a mix usage of

native and external pattern processors is not supported.

 

i.e.

 

<pattern>THIS IS A <pp name="re">(NAME|THING)</pp></pattern>

 

is NOT supported.

 

When evaluated either the enclosed expression matches or doesn't matches

the current pattern being evaluated; when match the context (that) is used

to further validate the context.

 

Evaluation of external processors is performed PRIOR to normal pattern

evaluation, so an improperly coded regular expression might override

other valid categories loaded in the bot.

 

<pattern>

<pp NAME="re">

(see|look at|watch) my (bike|bicycle)

</pp>

</pattern>

 

The input "see my bike", "see my bicycle", "look at my bike" and

"look at my bicycle" among others would produce this pattern to be considered

as a hit.

 

Even if this structure could be successfully replaced with "reductionism"

(combination of all the possible patterns reduced into a single category

to produce a single response) this feature introduces a very compact notation

when expressions could be in a wide variety of syntactical forms with the

same semantic meaning on a given language.

 

 

<spc> Space

 

Format:

 <spc/>

Use: Template Side

 

Returns a blank space.

 

It's intended to be used when in the template side the following structure

is used:

 

       <tag/> <othertag/>

 

The XML parsing process will remove the space between both tags, so in

order to make it explicit this tag could be used:

 

       <tag/><spc/><othertag/>

 

 

<trimleft> Trim left side of the string

 

Format:

 <trimleft/>

Use: Template Side

 

Returns the current pattern string with spaces and CR removed at the left.

 

 

<trimright> Trim right side of the string

 

Format:

 <trimleft/>

Use: Template Side

 

Returns the current pattern string with spaces and CR removed at the right.

 

 

<flush> Flush current answer

 

Format:

 <flush/>

Use: Template Side

 

Flushes the currently stored answer.

 

This predicate is used to remove any accumulated response produced during

the pattern matching process.

 

It's scope is mostly to be used together with events, when an event occur

it might be at any moment of the pattern evaluation process so a partially

evaluated response might exist, still the result of the event execution

might need to override whatever that response might be, in that situation

this predicate would allow to clean any previously evaluated response.

 

 

CONFIGURATION TAGS

 

<property> Bot Property

 

Format: <property name="propertyname" value="value"/>

Use: Configuration

 

This tag set the value of a property (to be retrieved by <bot/>), it's

usage is mostly for configuration purposes.

 

TBot uses it in the sys-botproperties.aiml configuration file.

 

SPECIAL PROCESSING TAGS

 

<botsaid> Stack of previous responses from the bot

 

Format: <botsaid index="index"/>

Use: Template Side

 

This predicate has been internally aliased to <that index="N"/>.

 

<bye> Terminate a Session

 

Format:

 <bye/>

Use: Template Side

 

Produces the current session to be terminated inmediately.

 

<now> Currently Evaluated Pattern String

 

Format:

 <now/>

Use: Template Side

 

This predicate returns the content of the current string evaluated against the pattern. it's similar to <input/>

but instead of preserving the original input this tag reflects the currently evaluated string which might have

changed because of a <srai> statement.

 

<clientsaid> Stack of previous inputs from the user

 

Format: <clientsaid index="index"/>

Use: Template Side

 

This predicate has been internally aliased to <input index="N"/>.

 

 

 

EVENTS TAGS

 

 

<event> Fire Event

 

Format:

 <event NAME="eventname" {VALUE="eventvalue"}/>

Use: Template Side

 

Trigger an event named eventname with optional value eventvalue, the result

of the predicate will be the combined evaluation of all the templates found

on categories with a matching <onevent/> tag present.

 

<onevent> Match an Event

 

Format:

 <onevent NAME="eventname" {VALUE="eventvalue"}/>

Use: Category Level only (equivalent to <pattern>).

 

Produces the template associated to the category to be evaluated (executed)

when an event of name eventname is fired.

 

If the optional VALUE attribute is indicated the template is only executed

if the event value matches the one indicated, if no value is indicated any

event with name eventname will produce a match.

 

 

<timer> Timer

 

Format: <timer name="timername" interval="N">Pattern</timer>

Use: Template Side

 

This tag creates a timer named timername that will expire in interval

milliseconds.

 

When expired it will perform the equivalent of <srai>Pattern</srai>.

 

Timers could be perceived as a "delayed" <srai>.

 

The timer is not armed upon expiration unless done so explicitly.

 

The timer could be disarmed at any time setting an interval of "0" to it.

 

 

 

CACHE MANIPULATION TAGS

 

<save> Save Categories

 

Format:

 <save {NAME="topicname"} FILE="filename"></save>

Use: Template Side

 

Saves all categories originally loaded from file FILE into the filename

indicated by the evaluation of the tag.

 

This predicate retuns a variable "SAVE" with the values "success" or "fail"

according with the result of the execution of the predicate.

 

Any change dynamically introduced into the bot AIML structures is reflected

in the resulting file.

 

 

<forget> Removes a Topic

 

Format:

 <forget FILE="filename.aiml"></forget>

Use: Template Side

 

When executed this predicate remove all the categories included on a given

file from the current set of categories held in memory.

 

MACRO DEFINITION TAGS

 

<macro> Macro Definition

 

Format: <macro></macro>

Use: Define a New Macro Structure, could be defined only under <aiml> or <topic>, similar hierarchy than <category>

 

Higher level to start the definition of a new macro; new tags could be

defined as any valid combination of primitive predicates, customs tags or

previously defined macros.

 

Macros must be defined prior to any usage on AIML files.

 

Macros are evaluated during execution (as opposed to custom tags which are

evaluated during load).

 

The basic structure to define a macro would then be:

 

<macro>

<new>macrotag.</new>

<definition>...AIML definition...</definition>

</macro>

 

Use macros when the behaviour of a newly defined structure is dependent on

the actual status of execution,otherwise use the custom tag feature since

it's far more efficient.

 

This functionality could be replaced using the XSL capabilities of the bot.

 

<new> Define a new Macro Predicate

 

Format: <new></new>

Use: Define a New Macro structure, could be defined only under <macro>

 

Defines a macro structure, the enclosed AIML structure will be the newly defined macro structure.

 

 

 

<definition> Define the resolution of a new macro.

 

Format: <definition></definition>

Use: Define a Macro Structure, could be defined only under <macro>

 

Defines the predicates that would resolve the macro is defined.

 

 

Secondary Brain AIML non-standard extensions

 

When enabled by the configuration patterns could be solved by a

secondary brain as a template side pattern processor.

 

TBot incorporates the MegaHAL engine (Markov Model based) which is the

inference engine behind the winner of the 1996 Loebner Prize.

 

Some predicates has been included to allow the access to this facility.

 

<train> Train the Inference Engine

 

Format: <train></train>

Use: Template Side

 

Pass the contained string to the Inference Engine for trainning.

 

<srai> Recurse the Pattern to the Secondary Brain

 

Format: <srai engine="{megahal|mkdict}"></srai>

Use: Template Side

 

This tag operates exactly like the standard <srai> but the pattern is

matched by the secondary brain instead of the main Graphmaster.

 

 

XML/SOAP Extensions

 

TBot incorporates the capability to exchange information with other bots

thru standard XML/SOAP messages.

 

Some predicates has been included to allow the access to this facility.

 

<learn> Load an AIML file

 

Format: <learn url="http://host:port" method="{post|get}">filename.aiml</learn>

Use: Same as <learn>

 

Load the indicated file from the remote bot at url.

 

If the method is "get" the request will be a simple HTTP GET request

(no XML/SOAP) which could be answered by either an enabled bot or a

Web Server.

 

If the method is "post" the request will be made thru a XML/SOAP envelope

that requires an enabled bot to service it.

 

The received AIML structure will be loaded internally and referenced as

if comming from the local filename.aiml file (see Save/Forget).

 

<srai> Recurse a Pattern to a Remote Bot

 

Format: <srai url="http://host:port" alt="altresponse"></srai>

Use: Template Side

 

Same as the standard <srai> but the pattern is recursed into the remote

bot pointed by url instead of locally; if no connection is possible the

response will be the one provided by the alt attribute (if indicated,

otherwise it will be empty).

 

 

<learn> Dynamic Creation of AIML

 

Format: <learn that="that" pattern="pattern" template="template"></learn>

Use: Template Side

 

Same as the standard <learn> but the that-pattern-template will be the

one contained in the respective attributes. A new category will be

dynamically built and placed in the Graphmaster as if comming from the

file indicated by the child nodes of the tag.

 

In order to avoid XML conflicts the content of the that/pattern/template

attributes could be made indirect by prefixing them with the "$" sign;

in that case the string following the $ will be assumed to be a variable

name from where to extract the actual information from.

 

This tag is mostly intended to cache responses acquired from a remote

bot.

 

 

 

Standard Non-Primitive AIML Tags and Predicates

 

The following AIML 0.9 deprecated tags has been implemented as either

custom tags or macro tags on the configuration files

 

          sys-aiml09.aiml

          sys-aiml09-deprecated.aiml

 

<bot_xxxx> Bot Properties

 

Supported by definition of aliases thru the <define> tag with a map to

<bot name="botproperty"/> structures.

 

Irregular Tags (Bot Properties)

 

Irregular tags referring to bot properties which are part of the standard

AIML tagset (i.e.<favorite_movie/>) are supported thru the <define> tag and

the usage of the appropriate <bot name="property"/> tag.

 

 

<beforethat>,<justthat>,<justbeforethat>

 

Supported by definition of aliases thru the <define> tag with a map to

<that index="N"/> and <input index="N"/>.

 

<get_name>

 

Supported by definition of aliases thru the <define> tag with a map to

<get name="name"/>.

 

 

<set_animagent>

 

Supported by definition of aliases thru the <define> tag with a map to

<get name="animagent"/>.

 

The TBot makes no use of this variable which is initialized as empty.

 

<set_female>

 

Supported by definition of aliases thru the <define> tag with a map to

<get name="female"/>.

 

<set_it>

 

Supported by definition of aliases thru the <define> tag with a map to

<get name="it"/>.

 

<set_male>

 

Supported by definition of aliases thru the <define> tag with a map to

<get name="male"/>.

 

 

Ignored Tags and Predicates

 

The following tags and predicates are evaluated as correct but actually ignored during execution:

 

* <A>

* <UL>

* <OM>

* <EM>

* <IMG>

* <BR>

* <P>

 

In general, in order to avoid conflicts all XML-like tags not part of AIML

(i.e. HTML) should be used as CDATA.

 

i.e.

       <![CDATA[<html>

                 <body>

                   Hello

                 </body>

                </html>]]>