
X - toxicity detector for Indonesian Languange

Description
Chrome Extension and Machine Learning Backend
This project integrates a Chrome extension for scraping tweets and highlighting toxic content with a Python backend that uses a machine learning model to process the tweets.
Features
- Chrome Extension:
Scrapes tweets directly from Twitter.
Highlights toxic tweets.
Analyze toxicity of your tweet.
---
How to Use
1. Set Up the Chrome Extension
Download and unzip
extension.zip.Open Chrome and navigate to [chrome://extensions/](chrome://extensions/).
Enable
Developer Mode.Click
Load unpackedand select the extracted folder.Activate the extension.
---
2. Run the Python Backend
Ensure the (https://docs.astral.sh/uv/) package manager is installed.
Navigate to the backend folder
```bash
cd ml-backend/
```
Sync dependencies:
```bash
uv sync
```
3. Activate the virtual environment:
- Windows (Command Prompt):
```bash
.venvScriptsactivate
```
- Windows (Bash):
```bash
source .venv/Scripts/activate
```
- macOS/Linux:
```bash
source .venv/bin/activate
```
4. Run the server:
```bash
uv run main.py
```
---
## Credits
- (https://github.com/getvictor/create-chrome-extension) for the Chrome extension template.
- (https://huggingface.co/) for providing models and datasets.
- (https://huggingface.co/Exqrch/IndoBERTweet-HateSpeech)
- (https://huggingface.co/indolem/indobertweet-base-uncased)
- (https://huggingface.co/datasets/Exqrch/IndoToxic2024)
## Citations
1. IndoToxic2024 Dataset:
```bibtex
@article{susanto2024indotoxic2024,
title={IndoToxic2024: A Demographically-Enriched Dataset of Hate Speech and Toxicity Types for Indonesian Language},
author={Lucky Susanto and Musa Izzanardi Wijanarko and Prasetia Anugrah Pratama and Traci Hong and Ika Idris and Alham Fikri Aji and Derry Wijaya},
year={2024},
eprint={2406.19349},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2406.19349},
}
```
2. IndoBERTweet:
```bibtex
@inproceedings{koto2021indobertweet,
title={IndoBERTweet: A Pretrained Language Model for Indonesian Twitter with Effective Domain-Specific Vocabulary Initialization},
author={Fajri Koto and Jey Han Lau and Timothy Baldwin},
booktitle={Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing (EMNLP 2021)},
year={2021}
}
```