Skip to main content

Detoxifier

" For a Safe, Secure and Positivity enriched Digital World "

1) detoxify_text()

Given a input query with toxic comments, this library will exactly spot the toxic words and replace the letters of that particular word with asterisk (*). (eg: moron --> *****)

from detoxifier import detoxify_text

# Dialogue from American Series Silicon Valley (Season 1)
input_text = "Hello, Richard Hendricks. I'm a total fucking retard."

detoxify_text(input_text)

Output

Hello, Richard Hendricks. I'm a total ******* ******."

2) check_textual_toxicity()

Given a input query with toxic comments, this library will check for the presence of toxic words in the query.

from detoxifier import check_textual_toxicity

# Dialogue from American Series Silicon Valley (Season 1)
input_text = "Hello, Richard Hendricks. I'm a total fucking retard."

check_textual_toxicity(input_text)

Output

1
## returns 1 if toxic word is present else it returns 0. ##

Metadata

Release files for detoxifier 0.2

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

Built distribution (wheel)

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

Release files / detoxifier-0.2-py3-none-any.whl

Download URL detoxifier-0.2-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c0f1081ce440ff5601aef109ae2abe50472132949b7ff1a900143eea1bfb14c
BLAKE2b-256 checksum
How to use checksums
8a5c5f16270293776f299d4bdf28bc9e9069f8379e2cb7852cc10074424e5230
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file

0.1

1 release file

0.0.2

1 release file

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