Skip to content

RaghavRamteke/Implementation-of-Chatbot-using-NLP-P4-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatbot using NLP

Overview

This project develops a chatbot leveraging Natural Language Processing (NLP) techniques. It interprets user intents and delivers relevant responses based on predefined patterns and datasets. The implementation integrates the nltk library for NLP tasks, scikit-learn for machine learning functionalities, and streamlit for building an interactive web interface.


Features

  • Intent Recognition: Identifies various user intents, including greetings, farewells, gratitude, and more.
  • Contextual Responses: Generates appropriate responses based on user input and predefined patterns.
  • Conversation History: Maintains a log of the conversation, accessible to the user.
  • Technology Stack: Built with Python, utilizing popular libraries like nltk and scikit-learn for NLP and machine learning tasks.

Technologies Used

  • Python
  • NLTK
  • Scikit-learn
  • Streamlit
  • JSON for intents data

Installation

1. Clone the Repository

git clone <repository-url>
cd <repository-directory>

2. Create a Virtual Environment (Optional but Recommended)

python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`

3. Install Required Packages

pip install -r requirements.txt

4. Download NLTK Data

import nltk
nltk.download('punkt')

Usage

To run the chatbot application, execute the following command:

streamlit run app.py

Once the application is running, you can interact with the chatbot through the web interface. Type your message in the input box and press Enter to see the chatbot's response.


Intents Data

The chatbot's behavior is defined by the intents.json file, which contains various tags, patterns, and responses. You can modify this file to add new intents or change existing ones.


Conversation History

The chatbot saves the conversation history in a CSV file (chat_log.csv). You can view past interactions by selecting the "Conversation History" option in the sidebar.


Contributing

Contributions to this project are welcome! If you have suggestions for improvements or features, feel free to open an issue or submit a pull request.


License

This project is licensed under the MIT License. See the LICENSE file for details.


Acknowledgments

  • NLTK for natural language processing.
  • Scikit-learn for machine learning algorithms.
  • Streamlit for building the web interface.

Replace <repository-url> and <repository-directory> with the actual URL of your repository and the name of the directory where the project is located. Adjust any sections as necessary to better fit your project's specifics.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published