Megahal(3pm)

Megahal3pm

Perl extension for the megahal conversation simulator library.

Usage

  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.

Overview

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.

Pod errors

Hey! The above document had some coding errors, which are explained below:

Around line 138:

You forgot a '=back' before '=head1'

Releases

4 releases since Debian 3.1 (Sarge); the text changed 3 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0

Author

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

From megahal 9.1.1a-9 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.