Eliza Chat

I was wondering how the O.G chatbot Eliza (https://en.wikipedia.org/wiki/ELIZA) from 1964 worked. From the Wikipedia article;

Created to explore communication between humans and machines, ELIZA simulated conversation by using a pattern matching and substitution methodology that gave users an illusion of understanding on the part of the program, but gave no response that could be considered really understanding what was being said by either party.

Looking around, I discovered the python Natural Language Processing library (NLTK) has Eliza chat as a module, which you can import and use as follows:

>>> from nltk.chat.eliza import eliza_chatbot
>>> eliza_chatbot.respond("hello")
'Hello, how are you feeling today?'

So I vibe coded a web interface for this that looks like the old teletype CRT terminal boot style.

Here is a demo of that https://king-prawn-app-itayb.ondigitalocean.app. You can find the source code here https://github.com/bmwasaru/eliza_chat

Yes, I tried to sound sad and desperate.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.