NAME

Bot::Backbone::Service::OFun::Hailo - Talk to your bot and it talks back

VERSION

version 0.142230

SYNOPSIS

# in your bot config
service hailo => (
    service    => 'OFun::Hailo',
    brain_file => 'hailo.db',
);

dispatcher chatroom => as {
    redispatch_to 'hailo';
};

# in chat
alice> bot, how are you today?
bot> That depends on how they are today.

DESRIPTION

This uses the Hailo library to grant your bot the ability to talk back when spoken to. Used by itself, the bot won't be a very interesting conversationalist at first. Mostly, it will just repeat back to you what you say to it. Over time, however, it will slowly build up a statistical model that will allow it to respond with text that makes very little sense, but sounds like the sorts of things you talk about in your chat room.

If you want to, you can also pre-train it using Hailo library directly and then start of with conversations built on whatever corpus of text you want to start from. I recommend corporate marketing materials or development documentation for maximum entertainment value.

DISPATCHER

Any conversation

All conversations that are held in the chat room that are not directed to the bot and do not contain commands for the bot will be used to teach the bot's markov chain data structure.

Any conversation directed to the bot

Any conversation that is directed at the bot itself in ways common to chat rooms (or any non-command in a direct chat), will result it he bot learning from that conversation and responding to it.

ATTRIBUTES

brain_file

This is a path to a file to use as the brain for the bot. See Hailo for information on what goes into this file.

hailo

This is the Hailo object used to learn and reply to conversation. This is automatically built.

METHODS

learn_and_reply

Handles all conversation directed to the bot.

learn

Handles all other conversation the bot hears.

initialize

No op.

AUTHOR

Andrew Sterling Hanenkamp <hanenkamp@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Qubling Software LLC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.