#!/usr/bin/perl

use Chatbot::Eliza;

srand( time ^ ($$ + ($$ << 15)) );

$mybot = new Chatbot::Eliza;
#$mybot->command_interface;

my $you_say = 'hello';

while ( $you_say !~ /bye/ )
{
   $eliza_says = $mybot->transform( $you_say );
   print $mybot->name, ": $eliza_says \n";
   system ("espeak -ven+f3 \"$eliza_says\"");
   print 'You  : ';
   $you_say = <STDIN>;
}

exit;

use Chatbot::Eliza
my ($harry, $sally, $he_says, $she_says);
$sally = new Chatbot::Eliza "Sally", "histext.txt";
$harry = new Chatbot::Eliza "Harry", "hertext.txt";
$he_says  = "I am sad.";
# Seed the random number generator.
srand( time ^ ($$ + ($$ << 15)) );
while (1) {
$she_says = $sally->transform( $he_says );
print $sally->name, ": $she_says \n";
$he_says  = $harry->transform( $she_says );
print $harry->name, ": $he_says \n";
}
                                                                                                                                                                                                                    
                                                                                                                                                                                                                    