| 1 |
NAME |
| 2 |
|
| 3 |
Bot::Training - Plain text training material for bots like Hailo and |
| 4 |
AI::MegaHAL |
| 5 |
|
| 6 |
SYNOPSIS |
| 7 |
|
| 8 |
use Bot::Training; |
| 9 |
use File::Slurp qw< slurp >; |
| 10 |
|
| 11 |
my $bt = Bot::Training->new; |
| 12 |
|
| 13 |
# Plugins I know about. Install Task::Bot::Training for more: |
| 14 |
my @plugins = $bt->plugins |
| 15 |
|
| 16 |
# Get the plugin object of a .trn file (which is just a plain text |
| 17 |
# file). These all work just as well: |
| 18 |
my $hal = $bt->file('megahal'); |
| 19 |
my $hal = $bt->file('MegaHAL'); |
| 20 |
my $hal = $bt->file('Bot::Training::MegaHAL'); |
| 21 |
|
| 22 |
# Get all lines in the file with File::Slurp: |
| 23 |
my @test = split /\n/, slurp($hal->file); |
| 24 |
|
| 25 |
DESCRIPTION |
| 26 |
|
| 27 |
Markov bots like Hailo and AI::MegaHAL are fun. But to get them working |
| 28 |
you either need to train them on existing training material or make |
| 29 |
your own. |
| 30 |
|
| 31 |
This module provides a pluggable way to install already existing |
| 32 |
training files via the CPAN. It also comes with a command-line |
| 33 |
interface called bot-training. |
| 34 |
|
| 35 |
AUTHOR |
| 36 |
|
| 37 |
Ævar Arnfjörð Bjarmason <[email protected]> |
| 38 |
|
| 39 |
LICENSE AND COPYRIGHT |
| 40 |
|
| 41 |
Copyright 2010 Ævar Arnfjörð Bjarmason <[email protected]> |
| 42 |
|
| 43 |
This program is free software, you can redistribute it and/or modify it |
| 44 |
under the same terms as Perl itself. |
| 45 |
|