Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

codeanticode/eliza

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a Processing library based on the Java implementation of the Eliza program by Charles Hayden. Hayden's code is a complete and faithful implementation of the original program described by Joseph Weizenbaum in the Communications of the ACM in January 1966.

ACKNOWLEDGMENTS

  1. Charles Hayden's Java implementation of Eliza: http://chayden.net/eliza/Eliza.html

  2. Processing Library Template: https://github.com/processing/processing-library-template

INSTRUCTIONS

The library is easy to use. Just import it, and then create an Eliza object:

import codeanticode.eliza.*;

Eliza eliza;
eliza = new Eliza(this);

String response = eliza.processInput("Hello");
println(response);

You can use the readScript() function to change the script that Eliza uses to construct its answers:

eliza.readScript("script");
eliza.readScript("http://chayden.net/eliza/script");

To go back to the default script that is loaded when Eliza is initialized, call the readDefaultScript() function.

For detailed instructions on how to modify the script file that determines Eliza's "behavior", read the following notes by Charles Hayden:
http://chayden.net/eliza/instructions.txt

FURTHER REFERENCES

  1. Wikipedia article about Eliza: http://en.wikipedia.org/wiki/ELIZA

  2. Article from the Jul-Aug 1977 issue of the Creative Computing magazine, with a complete listing in Altair BASIC of a version of Eliza by Jeff Schrager: http://vintagecomputer.net/cisc367/Creative%20Computing%20Jul-Aug%201977%20Eliza%20BASIC%20listing.pdf