Megahal(3) Perl extension for the Megahal conversation simulator library.

SYNOPSIS


use Megahal;
Megahal::megahal_initialize();
Megahal::megahal_do_reply(texte, log);
Megahal::megahal_learn_no_reply(texte, log);
Megahal::megahal_cleanup();

ABSTRACT

  Megahal is a conversation simulator that learns as you talk to it.
  It uses a Markov Model to learn how to hold a conversation. It is
  possible to teach Meagahal to talk about new topics, and in
  different languages.

DESCRIPTION

megahal_initialize()
Initialize megahal brain. Required before other functions are called.
megahal_do_reply(text, log)
Update the brain by feeding him the input text. Logging is controlled via the log boolean. Returns the answer of the bot.
megahal_learn_no_reply()
Same as above but without making a reply. Much faster and typically used in scripts for quick learning.
megahal_cleanup()
You need to call this function to save the brain, and finish Megahal.

FILES

Megahal looks for the following files in the current directory:
megahal.brn
Megahal brain.
megahal.ban
List of words which cannot be used as keywords.
megahal.log
Log file for errors.
megahal.txt
Log file for the conversation.
megahal.swp
Keyword translation for Megahal. If Megahal choose ``why'' as keyword and find a line containing ``why because'' in a line of this file then ``why'' gets translated in ``because'' in the reply.

AUTHOR

This page was written by Laurent Fousse, <[email protected]>.

COPYRIGHT AND LICENSE

Copyright 2003 by Jason Hutchens, David N. Welton and others.

This library is free software; you can redistribute it and/or modify it under the GNU General Public Licence.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:
Around line 138:
You forgot a '=back' before '=head1'