Expand description
This library contains the ELIZA processing logic as originally outlined by Weizenbaum[1] in 1996.
A simple explanation of ELIZA’s processing logic will be briefly outlined. For
information on ELIZA scripts, see the documentation on the Script
struct.
The Algorithm
- Attempt to transform each word in the user’s input, so the text is easier to process.
- Disassemble the input into phrases, and return the first phrase that contains a keyword(s).
- For each keyword found, attempt to match the phrase with an associated decomposition rule.
- If the decomposition rule is valid for that phrase, select one of the associated reassembly rules to form a response based on contextual information from the phrase.
- If none of the keyword/rule pairs are true for that phrase, attempt to retrieve a ‘memory’ (a response that was assembled earlier in conversation, but was stored instead) or, use a general ‘fallback’ statement.
References
[1] Weizenbaum, J. (1996), ELIZA - A computer program for the study of natural language communication between man and machine, Communications of the ACM, vol 9, issue 1
Modules
- The script defines a set of rules which enable ELIZA to engage in discourse with a user.
Structs
- An ELIZA instance.