Skip to main content

Detoxifier library identifies toxic words in a query and detoxified it by replacing toxic words.

Project description

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. ##

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

detoxifier-0.0.2-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file detoxifier-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: detoxifier-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for detoxifier-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 783413b2d6e5be508285dea15e0b46543af4ca2f577a027d70eca45d20029f13
MD5 2a511a4d89f8389fff9e830a4600c6bf
BLAKE2b-256 d0c2d8c7aa0f47dc65a875d5f159e434fa5917f9e44315c556d34220fc48eec1

See more details on using hashes here.

Supported by

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