Skip to content

hegdepavankumar/chatbot-using-python-NLTK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building a Simple Chatbot from Scratch in Python (using NLTK)

GitHub GitHub top language GitHub last commit ViewCount

Alt text

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.

On similar lines let's create a very basic chatbot utilizing Python's NLTK library. It's a very simple bot with hardly any cognitive skills, but still a good way to get into NLP and get to know about chatbots.

Outline

Motivation

The idea of this project was not to create some SOTA chatbot with exceptional cognitive skills but just to utilize 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.

BlogPost

Pre-requisites(Kindely Follow 👇 Instructions)

NLTK(Natural Language Toolkit)

Natural Language Processing with Python provides a practical introduction to programming for language processing.

For platform-specific instructions, read here

Installation of NLTK

pip install nltk

Installing required packages

After NLTK has been downloaded, install the required packages

import nltk
from nltk.stem import WordNetLemmatizer
nltk.download('popular', quiet=True) # for downloading popular packages
nltk.download('punkt') 
nltk.download('wordnet') 

How to run

  • Jupyter Notebook Binder

You can run the chatbot.ipynb which also includes step-by-step instructions.

  • Through Terminal

Note

If you wanna change something or improve feel free to change and Pull the Request (Only Required Changes are accepted).


Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request
  6. Community Rules

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Creator 🔝

(https://github.com/hegdepavankumar). This Project is Created by:-

|
@hegdepavankumar
|

           Hey Everyone Please give me a star .. and Follow me for more amazing project ideas and Updates⭐ and don't forget to fork the repo...
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thank you~~~🙏😍~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~