AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Rivescript Questions
 
 

Does Rivescript have a FAQ?

I’ve got some questions on limitations. Max size of brain?

I’m interesting in knowing whether it can support forein language characters?

I’m interested in chatting with the largest Bot based on Rivescript and knowing how many patterns and substitutions it has.

Has a Loebner shell to simulate human typing speed, typos etc been written for it yet.

Can it be set to talk to another instance of an agent running Rivescript bot.  How is this accomplished?

 

 
  [ # 1 ]

> Does Rivescript have a FAQ?

Not yet!

> I’ve got some questions on limitations. Max size of brain?

However large your computer can handle. With the Perl version of RiveScript, which is the most efficient on speed, it’s able to load the entire Alice brain in 5-8 seconds (Alice was converted from AIML to RiveScript using a converter I wrote). And then the Alice RS bot can give responses in under a second most of the time, unless you get caught on one of the patterns that redirects back and forth for a long time.

> I’m interesting in knowing whether it can support forein language characters?

Not at the moment. Well, sort of. Currently, the triggers themselves have to use Latin characters, but you could use any characters you want in substitutions (so, you could substitute a word with accents in it to be a Latin-based word without accents, and then write triggers to match the Latin-alphabet words). However, I don’t see a reason why UTF-8 shouldn’t be allowed, which would permit triggers to include foreign language characters. I’ll look into adding that feature soon. smile

> I’m interested in chatting with the largest Bot based on Rivescript and knowing how many patterns and substitutions it has.

There’s an Alice RiveScript bot here: http://www.rivescript.com/chatterbots/chat/X2JQfUlh

This bot is running purely off an Alice AIML-to-RiveScript conversion, so it has a couple little glitches in some of its responses (you may see random stray < and > characters in some replies, from places where the XML was too hairy for the converter to handle properly). There are 93,165 patterns in this bot’s brain.

> Has a Loebner shell to simulate human typing speed, typos etc been written for it yet.

Not yet, but one could be written.

> Can it be set to talk to another instance of an agent running Rivescript bot.  How is this accomplished?

Pretty easily. The programming interfaces for RiveScript are all object oriented, so you could just create two objects that load different (or the same) brains and have them talk to each other. You could also have a bot talk to itself (directing its own responses back into itself to get more responses, etc.)

Example in Perl:

use RiveScript;

my $bot1 RiveScript->new();
$bot1->loadDirectory("./replies/bot1");
$bot1->sortReplies();

my $bot2 RiveScript->new();
$bot2->loadDirectory("./replies/bot2");
$bot2->sortReplies();

# start the conversation
my $msg1 $bot1->reply("bot2""hello robot");
my $msg2;
while (
1{
   
print "Bot1> $msg1\n";
   
$msg2 $bot2->reply("bot1"$msg1);
   print 
"Bot2> $msg2\n";
   
$msg1 $bot1->reply("bot2"$msg2);
 

 
  [ # 2 ]

Thank you very much for your reply Noah.

I was specially impressed with how easy it was for you to get two RiveScript bots to talk with each other.

Got another question though.

Say a Turing judge in the Loebner competion types 3 inputs on the same input line for which all inputs match a pattern.

Like “What time is it? It’s dark out already I’m getting sleepy”

Note that we can’t count on punctuation to necessarily tell the interpreter where one input ends.

Will RiveScript automatically consume (try to match) the next input searching the pattern list again or is there a special syntax required at the end of the pattern to pass the remaining input characters back to the matcher for the next match to begin.

I tried to test this on the Alice Rivescript Bot translation you included the link for but it seemed to get confused.

 

 
  [ # 3 ]

The RiveScript modules don’t have built-in sentence splitting. You’d have to handle that outside the module.

(The rationale is, most Alicebots I’ve seen are full bots as a standalone application, so they include features like setting the bot’s variables, substitutions, sentence-splitters, connection info for instant messengers where applicable, etc. all in one giant application. RiveScript, instead, is a program library that does one task. Bot variables and substitutions are built into the RiveScript language itself, but anything extra like getting your bot onto GTalk to chat or saving user info to disk is left up to the application using the library).

So, Perl example again, sentence splitting can be trivially implemented like this:

$message "What time is it? It's dark out already I'm getting sleepy";

my @sentences split(/[.?!;]/, $message);
my @replies;
foreach 
my $sentence (@sentences{
   push 
(@replies$bot->reply("username"$sentence));
}
my $reply 
join(" ", @replies); 

As for how to handle sentences that run on without any punctuation (“It’s dark out already I’m getting sleepy”), that message would be given to the RiveScript bot as-is, and it would have to figure out what to do with it from your triggers (iirc, AIML doesn’t have a very good way of handling this either). Something like,

+ * i am *
{@<star1>} What is it like to be <star2>?

it is *
Is it really

Then you might get a response like, “Is it really? What is it like to be getting sleepy?”

 

 
  [ # 4 ]

+ Are you responding faster now?
- Oh. I don’t know whether or not I am responding faster. I am a robot. Suggesting ... Faster ... One who abstains from food ....

http://8pla.net/rivescript-python

I was updating something else, and unexpectedly it seems to speed up overall…

Is it faster now?

 

 
  [ # 5 ]

I didn’t change anything recently (last several months) to make it faster :o maybe Python itself got faster?

 

 
  login or register to react