Abusive_Language_Detection_Chatbot_Project_Summary
Abusive_Language_Detection_Chatbot_Project_Summary
1. Project Overview:
The goal of this project is to build a chatbot that can detect abusive or offensive language using
machine learning.
The chatbot is hosted on a web platform and uses a trained machine learning model to classify user
2. Technologies Used:
- Libraries:
- Scikit-learn for text vectorization (TF-IDF) and machine learning model (SVM)
3. Steps Involved:
- The dataset used for training the model includes labeled data indicating offensive or non-offensive
language.
- Data is preprocessed by cleaning and vectorizing the text using TF-IDF vectorizer to convert text
into numeric format.
- A machine learning model (e.g., SVM) is trained using the preprocessed data to classify
messages.
- A Flask web server is created to handle incoming requests from the frontend.
offensive words, uses the model to classify the message, and returns a response indicating whether
- The frontend is built using HTML and CSS to display the chat interface.
- JavaScript is used to send user messages to the backend and display chatbot responses.
messages in green.
- Special cases like "how are you" (which should not be offensive) are manually handled by
Step 6: Deployment
- The application is tested locally using Flask and can be deployed to a cloud service (e.g., Heroku,
Vercel, or another hosting platform).
4. Code Walkthrough:
Backend (app.py):
- Handles incoming requests, processes user input, and returns the chatbot's response.
- Checks for offensive words before passing to the machine learning model for prediction.
Frontend (index.html):
- Provides a simple interface for users to input their messages and receive responses from the
chatbot.
5. Future Work:
- Model Improvement: Add more data and continue fine-tuning the machine learning model.
- More Advanced UI: Use Figma to redesign and improve the user interface for better aesthetics and
usability.
- Deployment: Host the application on platforms like Heroku, Vercel, or AWS for production-ready
deployment.