SpeechGuard is a browser extension powered by advanced machine learning techniques to detect and classify hate speech on social media platforms. This tool aims to create a safer digital environment by blurring potentially harmful content and empowering users to moderate their online experiences.
- Real-Time Hate Speech Detection: Automatically scans social media posts for hate speech.
- Content Moderation: Blurs flagged posts and allows users to unblur them if desired.
- Machine Learning Integration: Utilizes logistic regression for accurate classification.
- User-Friendly Interface: Intuitive design for seamless interaction.
- Customizable Settings: Adaptable to user preferences for moderation.
- Frontend: Chrome Extension (HTML, CSS, JavaScript).
- Backend: Flask server for text processing and model integration.
- Machine Learning: Logistic Regression for text classification.
- Data Preprocessing: Tokenization, stop word removal, and lemmatization.
- Multi-core processor (i7 or equivalent recommended).
- At least 16GB RAM.
- Minimum 256GB SSD.
- Python 3.9 or higher.
- Browser (Google Chrome).
- Required Python libraries:
Flask,Flask-CORS,scikit-learn, etc.
git clone git@github.com:BPandaa/SpeechGuard.git
cd SpeechGuard- Navigate to the project directory:
cd ml_model - Install dependencies:
pip install -r requirements.txt
- Train or load the model by running the notebook:
jupyter notebook ai.ipynb
- Navigate to the backend folder:
cd backend - Install backend dependencies:
pip install flask flask-cors
- Start the Flask server:
python app.py
- Open Google Chrome and navigate to
chrome://extensions/. - Enable Developer Mode.
- Click Load Unpacked and select the extension folder in the repository.
- Launch the Flask server.
- Activate the SpeechGuard extension in Chrome.
- Browse Twitter or other supported social media platforms.
- Posts containing hate speech will be automatically blurred with an option to unblur.
- Button functionalities (Blur and Unblur).
- Integration between the browser extension and the backend server.
- Model accuracy for detecting hate speech.
- Expand support to additional social media platforms.
- Integrate advanced NLP techniques like BERT for improved accuracy.
- Implement a feedback loop for real-time learning and adaptive improvement.
Badr Adnani
- University of Sunderland
- BSc (Hons) Computer Science
For any queries or contributions, feel free to contact via GitHub.

