RiveScript::Tutorial

RiveScript::Tutorial is a beginner's guide to creating their first RiveScript brain.
Download

RiveScript::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

RiveScript::Tutorial Tags


RiveScript::Tutorial Description

RiveScript::Tutorial is a beginner's guide to creating their first RiveScript brain. RiveScript::Tutorial is a beginner's guide to creating their first RiveScript brain.This tutorial outlines the various capabilities of the RiveScript specification and offers some recommended pointers for creating a well-formed RiveScript brain. What you do with this knowledge is up to you; be creative!Be sure to skim over the RiveScript manpage first, because this tutorial jumps right in to using the various RiveScript commands without always explaining what each of them do.A Simple RiveScript InterpreterHere is a simple Perl script for running a RiveScript interpreter. This assumes that the brain's RS files will be stored in a directory called "tutorial", local to the Perl script. You'd want to edit certain parameters in this code if you see fit. #!/usr/bin/perl -w use strict; use warnings; use RiveScript; # Create the RiveScript interpreter. my $rive = new RiveScript(); # Load the RS tutorial brain. $rive->loadDirectory ("./tutorial"); # Sort them. $rive->sortReplies; # Go into a chatting loop. while (1) { print "User> "; my $msg = ; chomp $msg; # Grab a reply. my @reply = $rive->reply ('user',$msg); print " Bot> $_n" foreach(@reply); } Requirements: · Perl


RiveScript::Tutorial Related Software