PROFANITY WORDS FILTERING
USING MACHINE LEARNING
GUIDED BY BY
DHARUN MARSHALL S
[Link] 111921CS01301
ASSISTANT
KANNAN T
PROFESSOR 111921CS01303
ABSTRACT
This project introduces a solution for detecting and filtering profanity in
textual data using Logistic Regression, an advanced machine learning
algorithm. Unlike simple binary classifiers, Logistic Regression
handles high-dimensional data efficiently, identifying relationships
between input features and the target variable to predict whether a given
passage contains profane language. By training on a labeled dataset, this
model offers simplicity and interpretability, making it ideal for
integration into platforms like social media, online forums, and chat
systems to promote healthier communication.
EXISTING SYSTEM
• Current profanity filtering systems often rely on hardcoded lists of
offensive words, which can be bypassed easily by users through
variations in spelling or punctuation.
• These systems lack adaptability and struggle to handle new forms of
offensive language.
• They also fail to consider context, leading to both false positives and
false negatives.
• Advanced machine learning algorithms like Logistic Regression offer
a more intelligent approach by learning from data to improve filtering
over time.
PROPOSED SYSTEM
• The proposed system aims to filter profanity from textual data using
Logistic Regression.
• By leveraging the model's ability to identify relationships between
features (word frequencies) and the target variable (profane or non-
profane), it classifies words or phrases based on prior training data.
• This system will automate the detection process in real-time, helping
platforms monitor and restrict offensive content.
• It is designed to be scalable, allowing integration into various online
services like chat applications and social media platforms.
LITERATURE SURVEY
• Several studies have explored the application of machine learning
algorithms for text classification tasks, including spam detection and
sentiment analysis.
• Logistic Regression, although traditionally used for predicting
continuous variables, can be adapted for classification tasks through
modifications in its application.
• Recent work demonstrates that Logistic Regression models can be
effective for filtering offensive language when combined with feature
engineering techniques.
• Research also indicates that integrating context-awareness into text
classification improves accuracy.
HARDWARE & SOFTWARE
•Hardware: A standard system with a minimum of 16 GB RAM,
i5 intel processor or higher, and sufficient storage for datasets.
•Software: Python (with libraries such as Scikit-learn and NLTK),
IDE (VS Code), and a training dataset for profanity filtering.
MODULES AND EXPLANATION
•Data Collection Module: Gathers a large corpus of textual data,
including profane and non-profane words, to build the training dataset.
•Preprocessing Module: Cleans the data by removing punctuation, converting text to lowercase,
and tokenizing sentences for better classification accuracy.
•Training Module: Uses Logistic Regression to train the model on the preprocessed data.
It calculates word frequencies and relationships for classification.
•Prediction Module: Classifies new text input in real-time,
identifying whether it contains profane words and providing filtering suggestions.
•Evaluation Module: Assesses the model’s accuracy and refines it by adjusting
parameters or retraining with additional data.
USE CASE DIAGRAM
SYSTEM ARCHITECTURE