Posted: Thu Oct 06, 2005 10:52 pm Post subject: Chatbot::Alpha 2.00
With a new Chatbot::Alpha version comes many new changes!
First of all, its entry in the Change Log:
Code:
Version 2.00
- Added some AIML emulation:
- In-reply redirections (like <srai>):
+ * or something
- Or something. {@<star1>}
- "That" kind of support.
+ i hate you
- You're really mean... =(
+ sorry
% youre really mean
- Don't worry--it's okay. :-)
- Renamed all methods to be alternatingCaps instead of with underscores.
- Chatbot::Alpha::Syntax supports the newly-added commands.
- Fixed conditionals, should work more efficiently now:
- Format changed to *VARIABLE=VALUE::HAPPENS
- Does numeric == for numbers, or eq for strings... = better matching.
All the big differences in Chatbot::Alpha 1.x to 2.0:
- Alpha commands changed:
*CONDITION
New format:
*VAR=VALUE::REPLY
* Set a trigger of just an asterisk to set up a fallback for when no better
response is found. Example:
+ *
- I don't know how to reply to your message!
But in summary...
Updating Your Code
You'll have to update your Alpha parser to rename the methods it calls, as the methods have been renamed. i.e. "sort_replies" becomes "sortReplies"
Fixes/Modifications
All method names containing underscores were renamed to be alternatingCaps instead.
*CONDITION command fixed. Changed the format from
if VAR = VALUE::REPLY to be just
VAR=VALUE::REPLY as well as doing an == check for numbers or an eq check for strings (better matching). I did more testing on it this time round than I did the first time and I'm confident that the new conditionals command will work better than before.
New Additions
Added % command for "that's" as in AIML emulation of <that>.
An example of "that"
Code:
+ ask me a question
- Do you go to school?
+ yes
% do you go to school
- Where do you go?
+ *
% where do you go
- Is it nice there?
etc...
Usage of %THAT
• %THAT must come directly after +TRIGGER
• Command data of %THAT is the bot's last response, lowercase and with no punctuation.
Also, I've added Chatbot::Alpha::Tutorial which is a beginner's tutorial to Chatbot::Alpha.
- Added string tags {formal}, {sentence}, {uppercase}, {lowercase}
- Added tags <input> and <reply> and alias <star>.
- Fixed conditionals bug (conditionals wouldn't increment correctly so
only the last condition remained in memory. Now multiple conditions
can be used for one trigger... i.e. comparing gender to male/female
in two different conditions).
String tags are like {formal}...{/formal}, does that casing method to the text in between (formal = formalized, sentence = first word formal, etc)
<input1> to <input9> are the last 9 things the user has said (or "undefined"), and <reply1> to <reply9> are the last 9 things the bot has said. 1 is newest, 9 is oldest.
And <star> is just an alias to <star1> because it seems kinda dumb to name stars by numbers when you only have one star in the pattern. _________________ Current Site (2008) http://www.cuvou.com/