ToxicityClassificator
Module for predicting toxicity messages in Russian and English
Usage example
from toxicityclassifier import *
classifier = ToxicityClassificatorV1()
print(classifier.predict(text)) # (0 or 1, probability)
print(classifier.get_probability(text)) # probability
print(classifier.classify(text)) # 0 or 1
Weights
Weight for classification (if probability >= weight => 1 else 0)
classifier.weight = 0.5
Weight for language detection (English or Russian)
if the percentage of the Russian language >= language_weight, then the Russian model is used, otherwise the English one
classifier.language_weight = 0.5
Metadata
Release files for toxicityclassifier 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| toxicityclassifier-1.0.1.tar.gz | 3.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| toxicityclassifier-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 MB
Release files / toxicityclassifier-1.0.1.tar.gz
| Download URL | toxicityclassifier-1.0.1.tar.gz |
|---|---|
| Size | 3.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce365020515e3d9efafcb4150f0edb9c75285c7625bccacdc156202d62abd4d8
|
|
BLAKE2b-256 checksum How to use checksums |
5396de32a8ff283a263898370cd8658d47e8b49b8c98693ee8d109ee62433ce9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.11.6 Darwin/23.4.0
|
Release files / toxicityclassifier-1.0.1-py3-none-any.whl
| Download URL | toxicityclassifier-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bf5a2ba26447cbd96875bb00112cf5b6bb84d2a4bbf1c52225cfb9031dc3f89
|
|
BLAKE2b-256 checksum How to use checksums |
27a1863dc2e2c1be13abc6dfec7bd3fb7873b9c253ca1d3e10fd6d509d9824ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.11.6 Darwin/23.4.0
|