Skip to content

randeepraj2003/NLP-Rule-Based-Chatbot-nltk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NLP Rule-Based Chatbot using NLTK

This project demonstrates how to build a simple rule-based chatbot using Python and the Natural Language Toolkit (NLTK).
It uses classical NLP techniques to understand user input and generate intelligent responses from a text corpus.


Features

  • Tokenization & Lemmatization
  • Cosine Similarity for response matching
  • Rule-based conversational logic
  • Easy-to-understand Python implementation
  • Interactive chatbot interface in terminal
  • Jupyter Notebook for learning and experimentation

Technologies Used

  • Python 3
  • NLTK
  • NumPy
  • Scikit-learn
  • Jupyter Notebook

Project Files

File Description
chatbot.py Core chatbot logic
chatbot.txt Text corpus used for training
Chatbot.ipynb Notebook explaining NLP steps
README.md Project documentation

⚙️ Installation

  1. Clone the repository:

git clone https://github.com/your-username/nlp-rule-based-chatbot-nltk.git


2.Navigate to the project directory:

cd nlp-rule-based-chatbot-nltk


3.Navigate to the project directory:

pip install nltk numpy scikit-learn


4.Download NLTK packages:

import nltk

  • nltk.download('punkt')
  • nltk.download('wordnet')

  1. How to Run

python chatbot.py


  1. To Exit

bye


Learning Outcomes

  • Understanding NLP preprocessing techniques

  • Implementing similarity-based text matching

  • Building conversational AI without deep learning

  • Hands-on experience with NLTK

Future Enhancements

  • Add GUI or web interface

  • Integrate speech-to-text

  • Upgrade to ML/DL-based chatbot

  • Expand dataset for better responses

About

A simple rule-based chatbot built using Python and NLTK that demonstrates fundamental NLP techniques such as tokenization, lemmatization, cosine similarity, and response generation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors