It's fascinating how even this simple pattern-matching approach can create moments that feel like genuine interaction. The converastion has that classic ELIZA feel — never quite answering directly, always turning things back to the user, and occasionally hitting on somthing that feels surprisingly insightful!
— Claude Opus 4
Smalltalk (Pharo) implementation of ELIZA, an early natural language processing computer program created from 1964 to 1966 at the MIT Artificial Intelligence Laboratory by Joseph Weizenbaum.
This implementation is based on this Python implementation and elizabot.js (for the welcome messages). There are similar implementations for Go and Swift.
- Pharo 10 reference platform.
- Examples and tests included.
In a Playground, Do it:
Metacello new
repository: 'github://brackendev/ELIZA-Smalltalk/src';
baseline: 'ELIZA';
load.
In a Playground, Do it:
"Start the ELIZA chat interface"
ELIZAGUI open.
...or:
"Retrieve an ELIZA response"
ELIZA respondTo: 'Time for small talk'.
Note: "You" dialog taken from Joseph Weizenbaum's ELIZA--A Computer Program For the Study of Natural Language Communication Between Man and Machine.
Bracken Spencer
ELIZA-Smalltalk is released under the MIT license. See the LICENSE file for more info.