Skip to main content

License PyPI version Downloads

MUDES - {Mu}ltilingual {De}tection of Offensive {S}pans

We 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 regarding the specific install command for your platform.

When PyTorch has been installed, you can install MUDES from pip.

From pip

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.

from mudes.app.mudes_app import MUDESApp

app = 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 and can be checked out in here.

Citing & Authors

If you are using this repo, please consider citing these papers.

@inproceedings{ranasinghemudes,
 title={{MUDES: Multilingual Detection of Offensive Spans}}, 
 author={Tharindu Ranasinghe and Marcos Zampieri},  
 booktitle={Proceedings of NAACL},
 year={2021}
}
@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}
}

Metadata

Release files for mudes 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mudes 0.4.0
File Size Uploaded Provenance Actions
mudes-0.4.0.tar.gz 43.1 kB Without provenance Details for mudes-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mudes 0.4.0
File Interpreter ABI Platform Actions
mudes-0.4.0-py3-none-any.whl Python 3 none any Details for mudes-0.4.0-py3-none-any.whl

Total release size: 93.0 kB

Release files / mudes-0.4.0.tar.gz

Download URL mudes-0.4.0.tar.gz
Size 43.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6ec3dab5cead782aad64df888d1d84fb662e67d903ddebd69403f262d525ff84
BLAKE2b-256 checksum
How to use checksums
f5c2a446da587631e6170aafd1d8f01d5601daafc569e5a7f7c6355252879f23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / mudes-0.4.0-py3-none-any.whl

Download URL mudes-0.4.0-py3-none-any.whl
Size 49.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc031435cf9ec4aa1a5385bc9858cde83fda87ed1b72fd5317a045ce036e511b
BLAKE2b-256 checksum
How to use checksums
59444f269b4e3a7536dc335eb3721f7ffb1d7b2293fa23f0d238f3dda22e4265
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Security for mudes 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page