Skip to main content

Module for determining the level of toxicity of the text

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toxicityclassifier-1.0.1.tar.gz (3.6 MB view details)

Uploaded Source

Built Distribution

toxicityclassifier-1.0.1-py3-none-any.whl (3.6 MB view details)

Uploaded Python 3

File details

Details for the file toxicityclassifier-1.0.1.tar.gz.

File metadata

  • Download URL: toxicityclassifier-1.0.1.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.6 Darwin/23.4.0

File hashes

Hashes for toxicityclassifier-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ce365020515e3d9efafcb4150f0edb9c75285c7625bccacdc156202d62abd4d8
MD5 3282f57473125ff8d8cc8edffa391ac1
BLAKE2b-256 5396de32a8ff283a263898370cd8658d47e8b49b8c98693ee8d109ee62433ce9

See more details on using hashes here.

File details

Details for the file toxicityclassifier-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for toxicityclassifier-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8bf5a2ba26447cbd96875bb00112cf5b6bb84d2a4bbf1c52225cfb9031dc3f89
MD5 dc3ed9369985affb3eeb20c7a0e69b13
BLAKE2b-256 27a1863dc2e2c1be13abc6dfec7bd3fb7873b9c253ca1d3e10fd6d509d9824ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page