Skip to main content

The fastest python module to filter and censor obscene language from strings!

Project description

filter-profanity Badge Badge2

filter-profanity is one of the most efficient python packages that provides functionality to censor profanity in text! The package cross-verifies text with a list of opensource profane vocabulary that you can find here.

This package can be used in many areas including chat applications, bots and anything that handles user input!

Installation

Installing filter-profanity is as easy as running pip install filter-profanity!

Usage

We've developed filter-profanity to make it as easy as possible to utilize.

Currently, filter-profanity provides two functions - censor_profanity and has_profanity

censor_profanity(text, optional_censor) takes in two arguments, the text that it scans for profanity and an optional censor to replace profane language with. If you do not provide a censor, we default to *. Here's an example -

from profanity import censor_profanity

print(censor_profanity("This code is definitely not sh!t"))
# Prints -
# This code is definitely not ****

has_profanity(text) takes in one argument- the text that it must check for profanity. If the provided text has any profane content, it returns True otherwise it conditionally returns False. Here's an example -

from profanity import has_profanity

print(has_profanity("This code is definitely not sh!t"))
# Prints -
# True

Contributing

This package is opensource so anyone with adequate python experience can contribute to this project!

Report Issues

If you find any error/bug/mistake with the package or in the code feel free to create an issue and report it here

Fix/Edit Content

If you want to contribute to this package, fork the repository, clone it, make your changes and then proceed to create a pull request here

Contact

If you want to contact me -
Mail - trustedmercury@gmail.com
Discord - TrustedMercury#1953

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

filter-profanity-1.0.6.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file filter-profanity-1.0.6.tar.gz.

File metadata

  • Download URL: filter-profanity-1.0.6.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for filter-profanity-1.0.6.tar.gz
Algorithm Hash digest
SHA256 d9e8abb729a684f39de3f47c7acc0805e1101c7a298256c97f83038f558d39da
MD5 229796bcf98d1052d0347f1d4362f32a
BLAKE2b-256 2659195be0f56db5a1fc18f2267267e8ad3066e9ac48f4116dc2f5a86acf3b9e

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