History of chatbots dates back to 1966 when a computer program called ELIZA was invented by Weizenbaum. It imitated the language of a psychotherapist from only 200 lines of code. You can still converse with it here: Eliza.
The idea of this project was not to create some SOTA chatbot with exceptional cognitive skills but just to utilise and test my Python skills.This was one of my very first projects, created when I just stepped into the world of NLP and I thought of creating a simple chatbot just to make use of my newly acquired knowledge.
NLTK(Natural Language Toolkit)
Natural Language Processing with Python provides a practical introduction to programming for language processing.
For platform-specific instructions, read here
pip install nltk
After NLTK has been downloaded, install required packages
import nltk
from nltk.stem import WordNetLemmatizer
nltk.download('popular', quiet=True) # for downloading popular packages
nltk.download('punkt')
nltk.download('wordnet')
You can run the chatbot.ipynb which also includes step by step instructions.
- Through Terminal
python chatbot.py