Commit 3489437
Sync ELIZA implementation with original Weizenbaum rules
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>1 parent e1b96f1 commit 3489437
File tree
8 files changed
+722
-1136
lines changed- demos
- 01-eliza
- data
- scripts
- 15-chatbot-evolution/data
- notes
- scripts
- tests
8 files changed
+722
-1136
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | | - | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
| |||
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
69 | | - | |
70 | 67 | | |
71 | 68 | | |
72 | 69 | | |
| |||
92 | 89 | | |
93 | 90 | | |
94 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
95 | 116 | | |
96 | 117 | | |
97 | 118 | | |
| |||
379 | 400 | | |
380 | 401 | | |
381 | 402 | | |
382 | | - | |
| 403 | + | |
383 | 404 | | |
384 | 405 | | |
385 | 406 | | |
| |||
390 | 411 | | |
391 | 412 | | |
392 | 413 | | |
393 | | - | |
| 414 | + | |
394 | 415 | | |
395 | 416 | | |
396 | 417 | | |
| |||
399 | 420 | | |
400 | 421 | | |
401 | 422 | | |
402 | | - | |
| 423 | + | |
403 | 424 | | |
404 | 425 | | |
405 | 426 | | |
| |||
414 | 435 | | |
415 | 436 | | |
416 | 437 | | |
417 | | - | |
| 438 | + | |
418 | 439 | | |
419 | 440 | | |
420 | 441 | | |
421 | 442 | | |
422 | 443 | | |
423 | 444 | | |
424 | 445 | | |
425 | | - | |
| 446 | + | |
426 | 447 | | |
427 | 448 | | |
428 | 449 | | |
| |||
437 | 458 | | |
438 | 459 | | |
439 | 460 | | |
440 | | - | |
| 461 | + | |
441 | 462 | | |
442 | 463 | | |
443 | 464 | | |
| |||
481 | 502 | | |
482 | 503 | | |
483 | 504 | | |
484 | | - | |
485 | | - | |
| 505 | + | |
486 | 506 | | |
487 | 507 | | |
488 | 508 | | |
| |||
523 | 543 | | |
524 | 544 | | |
525 | 545 | | |
526 | | - | |
527 | | - | |
| 546 | + | |
528 | 547 | | |
529 | 548 | | |
530 | 549 | | |
| |||
558 | 577 | | |
559 | 578 | | |
560 | 579 | | |
561 | | - | |
| 580 | + | |
562 | 581 | | |
563 | 582 | | |
564 | 583 | | |
| |||
678 | 697 | | |
679 | 698 | | |
680 | 699 | | |
681 | | - | |
| 700 | + | |
682 | 701 | | |
683 | 702 | | |
684 | 703 | | |
| |||
768 | 787 | | |
769 | 788 | | |
770 | 789 | | |
771 | | - | |
| 790 | + | |
772 | 791 | | |
773 | 792 | | |
774 | 793 | | |
775 | 794 | | |
776 | 795 | | |
777 | 796 | | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | 797 | | |
803 | 798 | | |
804 | 799 | | |
| |||
0 commit comments