Chatbot::Alpha::Tutorial

Chatbot::Alpha::Tutorial is a beginners' guide to Chatbot::Alpha 2.x.
Download

Chatbot::Alpha::Tutorial Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Cerone J. Kirsle
  • Publisher web site:
  • http://search.cpan.org/~kirsle/Chatbot-Alpha-2.04/lib/Chatbot/Alpha/Tutorial.pm

Chatbot::Alpha::Tutorial Tags


Chatbot::Alpha::Tutorial Description

Chatbot::Alpha::Tutorial is a beginners' guide to Chatbot::Alpha 2.x. Chatbot::Alpha::Tutorial is a beginners' guide to Chatbot::Alpha 2.x.INTRODUCTIONWhat is Chatbot::Alpha?Chatbot::Alpha is a Perl module for reading and processing Alpha code. Alpha code is a command-driven response language, primarily used for chatterbots.The language format is quite simple: it's a line-by-line language. The first character is the command, followed by the command's data. The simplest of all Alpha replies is the standard one-way question and answer: + hello bot - Hello human.Alpha Commands OverviewHere are all the commands supported by Chatbot::Alpha:+ (Plus)The + symbol is the basis of all your replies. It's the trigger--that is, what the user says to activate that reply. In most cases this command comes first in a reply, followed by supporting commands that tell the bot what to do next.- (Minus)The - command has many purposes. In the example above, a single +TRIGGER and a single -REPLY will give you a one-way question-answer case. If you use multiple -REPLY's under one +TRIGGER, then they will become random responses. On *CONDITION'S, the -REPLY's will be called when no condition returns true. On &HOLDERS, the -REPLY is the first thing the bot sends. And the list goes on... we'll get into the many uses for -REPLY later.% (Percent)The % command is for "that" emulation. If you've worked with AIML you'll know what that refers to. It's there to help take the A.D.D. syndrome out of your bots. You can make specific replies based on what the bot last said. Like if the bot asks "Do you have any pets?" and the user says "yes", the bot can ask "What kind of pets?" instead of a generic reply to "yes". You'll learn all about this in the tutorial later.^ (Carat)The ^ command is to continue from your last -REPLY. For example, if your reply is very long and you want to break it down a few lines in the reply file (as not to have a horizontal scrollbar and be hard to read), this is the command to use. The ^CONTINUE command will adds its data to the last -REPLY you used under the +TRIGGER.@ (At)The @ command is for a redirection. Alpha triggers are "dead-on", meaning "hello|hey" is literally "hello|hey", not "hello OR hey". So when you want one to point to the other, use the @REDIRECT command.* (Star)The * is for conditionals. You'll learn about these later as well.& (Amperstand)This is for simple conversation holders. Emphasis is on the word "simple." They don't always work, so you'd use %THAT if it was really important. The &HOLDER command is slowly becoming deprecated.# (Pound)The # command is for executing Perl codes within your reply set. Sometimes Alpha just can't handle the complex tasks you have in mind, and this can fill in all the blanks (assuming you're fluent with Perl anyway)./ (Slash)This is comment data, not processed within Chatbot::Alpha.LessThan and GreaterThanThe > and < are labels. Right now they're used only for topics.Requirements:· Perl Requirements: · Perl


Chatbot::Alpha::Tutorial Related Software