https://github.com/tharindudr/mudes
Multilingual Detection of Offensive Spans
https://github.com/tharindudr/mudes
Last synced: about 1 month ago
JSON representation
Multilingual Detection of Offensive Spans
- Host: GitHub
- URL: https://github.com/tharindudr/mudes
- Owner: TharinduDR
- License: apache-2.0
- Created: 2021-01-07T19:22:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-17T11:14:50.000Z (about 2 years ago)
- Last Synced: 2025-03-23T00:24:15.665Z (about 2 months ago)
- Language: Python
- Size: 1.67 MB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://opensource.org/licenses/Apache-2.0)
[](https://pypi.org/project/mudes/)
[](https://pepy.tech/project/mudes)
# MUDES - {Mu}ltilingual {De}tection of Offensive {S}pansWe provide state-of-the-art models to detect toxic spans in text. We have evaluated our models on Toxic Spans task at SemEval 2021 (Task 5).
## Installation
You first need to install PyTorch. The recommended PyTorch version is 1.6.
Please refer to [PyTorch installation page](https://pytorch.org/get-started/locally/#start-locally) regarding the specific install command for your platform.When PyTorch has been installed, you can install MUDES from pip.
#### From pip
```bash
pip install mudes
```## Pretrained MUDES Models
We will be keep releasing new models. Please keep in touch. We have evaluated the models on the trial set released for Toxic Spanstask at SemEval 2021.
| Models | Average F1 |
|----------------------|:-------------:|
| en-base | 0.6734 |
| en-large | 0.6886 |
| multilingual-base | 0.5953 |
| multilingual-large | 0.6013 |## Prediction
Following code can be used to predict toxic spans in text. Upon executing, it will download the relevant model and return the toxic spans.```python
from mudes.app.mudes_app import MUDESAppapp = MUDESApp("en-large", use_cuda=False)
print(app.predict_toxic_spans("You motherfucking cunt", spans=True))```
## System Demonstration
An experimental demonstration interface called MUDES-UI has been released on [GitHub](https://github.com/TharinduDR/MUDES-UI) and can be checked out in [here](http://rgcl.wlv.ac.uk/mudes/).## Citing & Authors
If you are using this repo, please consider citing these papers.```bash
@inproceedings{ranasinghemudes,
title={{MUDES: Multilingual Detection of Offensive Spans}},
author={Tharindu Ranasinghe and Marcos Zampieri},
booktitle={Proceedings of NAACL},
year={2021}
}
``````bash
@inproceedings{ranasinghe2021semeval,
title={{WLV-RIT at SemEval-2021 Task 5: A Neural Transformer Framework for Detecting Toxic Spans}},
author = "Ranasinghe, Tharindu and Sarkar, Diptanu and Zampieri, Marcos and Ororbia, Alex",
booktitle={Proceedings of SemEval},
year={2021}
}
```