A Python-based chatbot that uses Natural Language Processing (NLP) and a neural network to understand and respond to user inputs. This project demonstrates how to design, train, and deploy a simple chatbot using custom intents.
- Interactive chatbot for text-based queries.
- Customizable intents in
intents.json. - Uses Bag of Words (BoW) and one-hot encoding for NLP.
- Neural network model built with TensorFlow/Keras.
- Lightweight and easy to extend or adapt.
intents.json: Predefined patterns, tags, and responses.ChatBot.ipynb: Jupyter Notebook with model training and chatbot interface.README.md: Project documentation (this file).
Install dependencies with:
pip install tensorflow numpy nltk- Open
ChatBot.ipynbin Jupyter Notebook or Google Colab. - Run all cells step-by-step:
- Load data from
intents.json - Preprocess text
- Train the neural network
- Start chatting with the bot
- Load data from
- Add or edit patterns/responses in
intents.json. - Retrain the model to reflect changes using the notebook.
- Text Preprocessing: User inputs and patterns are tokenized and transformed using Bag of Words.
- Model Training: A neural network learns to classify the intent of inputs.
- Response Generation: The predicted tag is used to fetch a matching response from
intents.json.
This is a basic chatbot designed for educational purposes. It can be enhanced further using advanced NLP techniques like word embeddings or transformers.