Skip to main content

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)

Source distribution for toxicityclassifier 1.0.1
File Size Uploaded
toxicityclassifier-1.0.1.tar.gz 3.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for toxicityclassifier 1.0.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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