Sync ELIZA with original Weizenbaum rules#16
Merged
jeremymanning merged 1 commit intomainfrom Dec 27, 2025
Merged
Conversation
Fixes #15 - Add import_eliza_rules.py script to fetch and convert original rules - Add compare_rules.py to compare rule files - Regenerate eliza-rules.json from cs-for-psych instructions.txt - Remove duplicate eliza-rules.json from Demo 15 (uses Demo 01) - Remove orphaned test_eliza.py (imports non-existent module) - Update test expectations to match original ELIZA behavior Key changes to match original Weizenbaum implementation: - Synonym groups no longer include their own name - Keywords 'i' and 'you' have no explicit rank (original behavior) - Pattern spacing matches original ('* @synonym *') - 'sorry' and 'apologise' match before 'i' in apology statements All 156 ELIZA tests pass (144 Demo 01 + 12 Demo 15). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
New Scripts
scripts/import_eliza_rules.py- Fetches and converts original Weizenbaum rules to JSONscripts/compare_rules.py- Compares rule files and shows differencesRule Changes
demos/01-eliza/data/eliza-rules.jsonfrom original source@sad=unhappy, depressed, sick)iandyouhave no explicit rank (matches original)* @synonym *instead of*@synonym*)Cleanup
demos/15-chatbot-evolution/data/eliza-rules.json(duplicate - Demo 15 imports from Demo 01)demos/01-eliza/scripts/test_eliza.py(orphaned - imports non-existent module)Test Updates
"I'm sorry."now matchessorrykeyword (noti)"Am I happy"now matchesamkeyword (noti)Test Results
Test plan
npm run test:elizalocally - all 156 tests passpython scripts/import_eliza_rules.py --dry-runFixes #15
🤖 Generated with Claude Code