https://github.com/normyee/chatbot-pytorch_nlp
ChatBot utilizing neural networks, NLP techniques, and the Bag of Words model. Implements tokenization and stemming for efficient language processing.
https://github.com/normyee/chatbot-pytorch_nlp
bag-of-words chatbotai neural-network nlp-machine-learning nltk-python numpy python pytorch-nlp
Last synced: 3 months ago
JSON representation
ChatBot utilizing neural networks, NLP techniques, and the Bag of Words model. Implements tokenization and stemming for efficient language processing.
- Host: GitHub
- URL: https://github.com/normyee/chatbot-pytorch_nlp
- Owner: normyee
- Created: 2023-11-11T22:37:30.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-12T12:24:29.000Z (about 2 years ago)
- Last Synced: 2025-02-27T16:26:22.056Z (12 months ago)
- Topics: bag-of-words, chatbotai, neural-network, nlp-machine-learning, nltk-python, numpy, python, pytorch-nlp
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ChatBot with Natural Language Processing

## Overview
- This project implements a ChatBot using a neural network in Python, leveraging Natural Language Processing (NLP) techniques, Bag of Words model, and preprocessing methods like tokenization and stemming.
## Technologies Used
- NLTK: Natural Language Toolkit for various NLP tasks.
- PyTorch: Deep learning library for building and training neural networks.
- NumPy: Fundamental package for scientific computing with Python.
## Project Structure
- `train.py`: Python script for training the neural network with the provided data.
- `chat.py`: Python script to initialize and run the ChatBot.
- `model.py`: Contains the feedforward neural network model with two hidden layers.
- `nltk_utils.py`: Includes functions for preprocessing the data.
- `intents.json`: Document containing the training data.
# How to Use
## Training the Model
```
python train.py
```
## Initializing the ChatBot
To start the ChatBot, use the following command:
```
python chat.py
```
# Dependencies
Make sure to install the necessary dependencies by running:
```
pip install nltk torch numpy
```
# Notes
- Ensure that the NLTK data is downloaded before running the scripts: `uncomment # nltk.download('punkt')`