Created
November 13, 2011 14:09
-
-
Save Kazuma/1362145 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use RiveScript; | |
my $bot = RiveScript->new; | |
$bot->loadFile("./test.rs") | |
or die "スクリプトの読み込みに失敗しました。"; | |
$bot->sortReplies; | |
while (1) { | |
print "zuma> "; | |
chomp( my $msg = <STDIN> ); | |
my $reply = $bot->reply( 'localuser', $msg ); | |
say "さとみ> $reply"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ * | |
- うっそ~ | |
- マジで!? | |
- わかる~ | |
- ヤバくない? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zuma> やっほー | |
さとみ> わかる~ | |
zuma> おなかすいた | |
さとみ> うっそ~ | |
zuma> ほんとー | |
さとみ> うっそ~ | |
zuma> ほんとだよー | |
さとみ> わかる~ | |
zuma> でしょー | |
さとみ> わかる~ | |
zuma> 何か食べ行こうよ | |
さとみ> マジで!? | |
zuma> マジマジ | |
さとみ> マジで!? | |
zuma> おなかすいてない? | |
さとみ> うっそ~ | |
zuma> なーんだ | |
さとみ> マジで!? | |
zuma> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment