This repository contains a didactic reconstruction of the ELIZA chatbot program in Python, based on Joseph Weizenbaum's original 1966 description (https://dl.acm.org/doi/10.1145/365153.365168).
weizenbaum_1966_appendix.txt- Transcribed appendix from the 1966 paperto_json.py- Script that processes the appendix and produceseliza.jsoneliza.json- Modern JSON representation of ELIZA's rules and responsestest_eliza.py- Pytest tests based on a sample dialog between a user and ELIZA from the papereliza.py- Main ELIZA program using Python'scmdmodule
This project uses pipenv for dependency management:
pipenv installTo start an interactive chat session:
python eliza.pyTo convert the appendix file to JSON format:
python to_json.py > eliza.jsonTo run the test suite:
pipenv run pytest test_eliza.py -v