0% found this document useful (0 votes)
18 views3 pages

Abusive_Language_Detection_Chatbot_Project_Summary

summary

Uploaded by

MD FARHAN 3070
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views3 pages

Abusive_Language_Detection_Chatbot_Project_Summary

summary

Uploaded by

MD FARHAN 3070
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

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

messages as either offensive or non-offensive.

2. Technologies Used:

- Backend: Python (Flask for API and logic)

- Machine Learning: Scikit-learn (for training models)

- Frontend: HTML, CSS, and JavaScript (for the user interface)

- Dataset: Kaggle datasets and custom lists of offensive words

- Libraries:

- Flask for creating the web application

- Scikit-learn for text vectorization (TF-IDF) and machine learning model (SVM)

- Pickle for saving and loading the model

- Fetch API for frontend-backend communication

3. Steps Involved:

Step 1: Dataset Preparation

- 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.

Step 2: Model Training

- A machine learning model (e.g., SVM) is trained using the preprocessed data to classify

messages.

- The model is saved using pickle for future use.

Step 3: Building the Backend

- A Flask web server is created to handle incoming requests from the frontend.

- The server loads the trained model and vectorizer.

- An endpoint `/get-response` is created, which receives a message, checks it for predefined

offensive words, uses the model to classify the message, and returns a response indicating whether

the message is offensive.

Step 4: Building the Frontend (UI)

- 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.

- A color-coding feature is implemented to show offensive messages in red and non-offensive

messages in green.

Step 5: Handling Edge Cases

- Special cases like "how are you" (which should not be offensive) are manually handled by

checking the message content before applying the model.

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.

- Displays offensive messages in red and non-offensive ones in green.

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.

You might also like