Chatbot::Eliza

Chatbot::Eliza provides a clone of the classic Eliza program.
Download

Chatbot::Eliza Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • John Nolan
  • Publisher web site:
  • http://search.cpan.org/~jnolan/backup-reporter-1.03/backup-reporter

Chatbot::Eliza Tags


Chatbot::Eliza Description

Chatbot::Eliza provides a clone of the classic Eliza program. Chatbot::Eliza provides a clone of the classic Eliza program.This module implements the classic Eliza algorithm. The original Eliza program was written by Joseph Weizenbaum and described in the Communications of the ACM in 1966. Eliza is a mock Rogerian psychotherapist. It prompts for user input, and uses a simple transformation algorithm to change user input into a follow-up question. The program is designed to give the appearance of understanding.This program is a faithful implementation of the program described by Weizenbaum. It uses a simplified script language (devised by Charles Hayden). The content of the script is the same as Weizenbaum's.This module encapsulates the Eliza algorithm in the form of an object. This should make the functionality easy to incorporate in larger programs.How the script file is parsed Each line in the script file contains an "entrytype" (key, decomp, synon) and an "entry", separated by a colon. In turn, each "entry" can itself be composed of a "key" and a "value", separated by a space. The parse_script_data() function parses each line out, and splits the "entry" and "entrytype" portion of each line into two variables, $entry and $entrytype.Next, it uses the string $entrytype to determine what sort of stuff to expect in the $entry variable, if anything, and parses it accordingly. In some cases, there is no second level of key-value pair, so the function does not even bother to isolate or create $key and $value.$key is always a single word. $value can be null, or one single word, or a string composed of several words, or an array of words.Based on all these entries and keys and values, the function creates two giant hashes: complist, which holds the decomposition rules for each keyword, and %reasmblist, which holds the reassembly phrases for each decomposition rule. It also creates %keyranks, which holds the ranks for each key.Six other arrays are created: %reasm_for_memory, %pre, %post, %synon, @initial, and @final.What's New in This Release:· Added a Norwegian script, kindly contributed by Mats Stafseng Einarsen. Thanks Mats!


Chatbot::Eliza Related Software