DeepOffense : Multilingual Offensive Language Identification with Transformers
DeepOffense provides state-of-the-art transformer models for multilingual offensive language identification.
Installation
You first need to install PyTorch. THe recommended PyTorch version is 1.5. Please refer to PyTorch installation page regarding the specific install command for your platform.
When PyTorch has been installed, you can install from source by cloning the repository and running:
git clone https://github.com/TharinduDR/DeepOffense.git
cd DeepOffense
pip install -r requirements.txt
Run the examples
Examples are included in the repository but are not shipped with the library. Please refer the examples directory for the examples. Each directory in the examples folder contains different languages.
Pretrained Models
English offensive language detection pre-trained model trained with XLM-R large model on OffensEval data can be downloaded using this link.
Once downloading it and unzipping it, they can be loaded easily. To see how to begin the training process please refer the examples directory
model = ClassificationModel("xlmroberta", "path", use_cuda=torch.cuda.is_available())
Citation
Please consider citing us if you use the library.
@inproceedings{ranasinghe-etal-2020-multilingual,
title = "Multilingual Offensive Language Identification with Cross-lingual Embeddings",
author = "Ranasinghe, Tharindu and
Zampieri, Marcos,
booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing",
month = nov
year = "2020",
}
Citation for the Malayalam specific paper,
@inproceedings{ranasinghe-etal-2020-wlv,
title={WLV-RIT at HASOC 2020: Offensive Language Identification in Code-switched Texts},
author={Ranasinghe, Tharindu and Zampieri, Marcos},
year={2020},
booktitle={Proceedings of FIRE}
}
Metadata
Release files for deepoffense 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deepoffense-0.0.2.tar.gz | 59.8 kB | Without provenance | Details for deepoffense-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deepoffense-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for deepoffense-0.0.2-py3-none-any.whl |
Total release size: 163.9 kB
Release files / deepoffense-0.0.2.tar.gz
| Download URL | deepoffense-0.0.2.tar.gz |
|---|---|
| Size | 59.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96f194cac1ce84690d7220c6bcd16a4949758a727800987f68c9585b4c24f31d
|
|
BLAKE2b-256 checksum How to use checksums |
753fe1e2a2b878dd636586de6565a4e9c2a934ca0891292ed0e449a5e8cd034d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Release files / deepoffense-0.0.2-py3-none-any.whl
| Download URL | deepoffense-0.0.2-py3-none-any.whl |
|---|---|
| Size | 104.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
454b85dee73e50e91a2cf9a1dd3291f150d2dcd6d24e2eead9198a7b67b8e1c6
|
|
BLAKE2b-256 checksum How to use checksums |
02450c8c0a7711d7a4b7db44dd8323b66b63542c9afbf5163788a7e2b75cce5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Security for deepoffense 0.0.2
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.