A multi-label classification project to detect various forms of offensive content in user feedback using Machine Learning, Deep Learning, and Transformer-based models.
- Train: English feedback texts with 6 binary labels:
toxic,abusive,vulgar,menace,offense,bigotry - Validation and Test: Multilingual texts
Only thetoxiclabel is available for evaluation.
- Models: Logistic Regression (LR), Random Forest (RF)
- Features: TF-IDF, multilingual sentence embeddings
- Tuning: Grid Search & Random Search
- Models: LSTM, GRU
- Tokenized and padded sequences with Embedding layers
- Models: BERT, XLM-RoBERTa
- Fine-tuned with dropout + dense layers
| Model | Accuracy | F1-Score |
|---|---|---|
| LR | β High | |
| RF | β Low | β Low |
| LSTM | β High | β Better |
| GRU | β High | β Better |
| BERT | β High | π Best |
| XLM-R | β High | π Best |
- Clone the Repository:
git clone https://github.com/Sajid064/Offensive-Language-Classification.git cd Offensive-Language-Classification - Install dependencies:
pip install -r requirements.txt
- Run the notebooks:
- Execute cells in task/model1_implementation.ipynb
- Execute cells in task/model2_implementation.ipynb
- Class Imbalance: High accuracy but relatively lower F1-score
- Train-Test Mismatch: Language difference affected performance
- Label Availability: Only
toxiclabel provided for test set