Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

AI::MegaHAL
Perl interface to the MegaHAL natural language conversation simulator.

AI::MegaHAL - Perl interface to the MegaHAL natural language conversation simulator.


NAME

AI::MegaHAL - Perl interface to the MegaHAL natural language conversation simulator.


SYNOPSIS

use AI::MegaHAL;

$megahal = AI::new MegaHAL('Path' => './', 'Banner' => 0, 'Prompt' => 0, 'Wrap' => 0, 'AutoSave' => 0);

$text = $megahal->initial_greeting();

$text = $megahal->do_reply($message);


DESCRIPTION

Conversation simulators are computer programs which give the appearance of conversing with a user in natural language. Such programs are effective because they exploit the fact that human beings tend to read much more meaning into what is said than is actually there; we are fooled into reading structure into chaos, and we interpret non-sequitur as valid conversation.

This package provides a Perl interface to the MegaHAL conversation simulator written by Jason Hutchens.


CONSTRUCTOR

$megahal = new AI::MegaHAL('Path' => './', 'Banner' => 0, 'Prompt' => 0, 'Wrap' => 0, 'AutoSave' => 0);

Creates a new AI::MegaHAL object. The object constructor can optionaly receive the following named parameters:

Path - The path to MegaHALs brain or training file (megahal.brn and megahal.trn respectively). If 'Path' is not specified the current working directory is assumed.
Banner - A flag which enables/disables the banner which is displayed when MegaHAL starts up. The default is to disable the banner.
Prompt - A flag which enables/disables the prompt. This flag is only useful when MegaHAL is run interactively and is disabled by default.
Wrap - A flag which enables/disables word wrapping of MegaHALs responses when the lines exceed 80 characters in length. The default is to disable word wrapping.


METHODS

initial_greeting

$text = $megahal->initial_greeting();

Returns a string containing the initial greeting which is created by MegaHAL at startup.

do_reply

$text = $megahal->do_reply($message);

Generates reply $text to a given message $message.


BUGS

None known at this time.


AUTHOR

The Perl AI::MegaHAL interface was written by Cory Spencer <cspencer[at]sprocket.org>.

Now maintained by Alexandr Ciornii <alexchorny[at]gmail.com>.

MegaHAL was originally written by and is copyright Jason Hutchens <hutch[at]ciips.ee.uwa.edu.au>

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy