Color Key:
AIML | RiveScript | Description |
---|---|---|
<aiml version="X">
|
! version = X
|
Opening tag and version line. |
<topic name="X">
|
> topic X
|
Topic declarations. |
< topic X inherits Y < topic A inherits B C
|
Topics inheriting replies from other topics. | |
<category>
|
AIML's wrapper for a trigger/response (useless for RiveScript). | |
<pattern>
|
+ hello bot
|
Input pattern.
|
<template>
|
- Hello human!
|
A response to an input pattern.
|
<that>XXX</that>
|
% xxx
|
Match the user's input and also the bot's last message (to carry on short conversations, e.g. knock-knock jokes).
|
<star index="N"/>
|
<star>, <starN>
|
Binding of any wildcards in the pattern/trigger. |
<that index="N,M">
|
<replyN>
|
Insert the bot's previous replies. |
<input index="N">
|
<inputN>
|
Insert the user's previous messages. |
<thatstar index="N">
|
<botstar>, <botstarN>
|
Binding of any wildcards in a <that>/%Previous. |
<topicstar index="N">
|
Binding of wildcards in <topic> (useless so RiveScript didn't implement this). | |
<get name="XXX" />
|
<get XXX>
|
Retrieve a user variable. |
<set name="XXX">YYY</set>
|
<set XXX=YYY>
|
Set a user variable.
|
<bot name="XXX" />
|
<bot XXX>
|
Retrieve a bot variable. |
<env XXX>
|
Retrieve an environment/global variable. | |
<date />
|
Insert the current date/time. This isn't implemented in RiveScript because the exact formatting of a date/time stamp is subjective and should be left to the writer, and handled through the use of objects instead. | |
<id />
|
<id>
|
Insert the chatting user's ID. |
<size />
|
Insert the number of loaded AIML categories. This isn't implemented in RiveScript because it's difficult to count how many things RiveScript can reply to, since triggers are much more complex than AIML's patterns. | |
<version />
|
Inserts the AIML program version. This isn't implemented in RiveScript directly
because of its implementation-agnostic specification. Any interpreter can define
a <env version> if they'd like.
|
|
<uppercase>XXX</uppercase>
|
{uppercase}XXX{/uppercase} ,<uppercase>
|
Uppercasing a string of text. RiveScript has a shortcut tag for
uppercasing <star> ; AIML doesn't.
|
<lowercase>XXX</lowercase>
|
{lowercase}XXX{/lowercase} ,<lowercase>
|
Lowercase a string of text. RiveScript has a shortcut tag for
lowercasing <star> ; AIML doesn't.
|
<formal>XXX</formal>
|
{formal}XXX{/formal} ,<formal>
|
Formalize a string of text. RiveScript has a shortcut tag for
formalizing <star> ; AIML doesn't.
|
<sentence>XXX</sentence>
|
{sentence}XXX{/sentence} ,<sentence>
|
Sentence-case a string of text. RiveScript has a shortcut tag for
sentence-casing <star> ; AIML doesn't.
|
<condition name="X" value="Y">
|
* X eq Y
|
Conditionals.
|
<condition name="X">
|
Paired with <li value="Y"> , runs multiple
"equals" comparisons against "X". Useless. See above.
|
|
<conditon>
|
Paired with <li name="X" value="Y"> , runs multiple
conditionals involving multiple variables "equaling" multiple
values. Still useless. See 2 above.
|
|
<random>
|
{random}
|
Insert sub-bits of random data into a reply. This is AIML's only method of randomness; RiveScript supports randomness at the level of the reply itself. This is just for smaller bits of randomness in the middle of another reply. |
<li>
|
This is only for AIML's XML-based method of conditionals and random tags; RiveScript has no need for this. | |
<gossip>
|
Append to a text file. What file? This wasn't implemented in RiveScript
for the same reason as <date> . It's too ambiguous.
Use objects instead.
|
|
<srai>XXX</srai> ,<sr/>
|
@ xxx ,{@XXX} ,<@>
|
Redirect one reply to another one. |
<person>XXX</person>
|
{person}XXX{/person}, <person> |
Swap 1st and 2nd person pronouns. |
<person2>XXX</person2>
|
Swap 1st and 3rd person pronouns. Is this even useful? I could never imagine where this is useful. It wasn't ported to RiveScript. | |
<gender>XXX</gender>
|
Swap gender pronouns. Where is THIS ever useful? Not ported to RiveScript. | |
<think>
|
Hide the output of AIML operations (namely, <set> ). Due to the
difference in RiveScript's behavior, this tag is unnecessary.
|
|
<learn>
|
Load a new AIML file. This is entirely not useful at all. | |
<system>
|
<call>
|
Invoke some higher power for assistance (be it system commands or object macros). |
<javascript> ,<perl> ,etc. |
> object XXX javascript ,> object XXX perl ,etc. |
Invoking some higher power for assistance. |
<add>
<sub>
<mult>
<div>
<env>
{!}