filter-profanity

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!
Thanks to @itsmewulf and @Sh-wayz for contributing to the development of this project!
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 three functions - censor_profanity, has_profanity and get_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
get_profanity(text, duplicates=False) takes two arguments - the text to return profanity from, and a boolean specifying if it should return duplicate words or not (defaults to False). If the text has any profane content, it returns a list with detected words, otherwise it returns an empty list. Here's an example -
from profanity import get_profanity
print(get_profanity("This code is definitely not sh!t sh!t"))
# Prints -
# ['sh!t']
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
Metadata
Release files for filter-profanity 1.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| filter-profanity-1.0.9.tar.gz | 4.8 kB | Without provenance | Details for filter-profanity-1.0.9.tar.gz |
Release files / filter-profanity-1.0.9.tar.gz
| Download URL | filter-profanity-1.0.9.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c1ed24b4921ac7847379887c80241495e6e9e76e75d64695f1f6a41f07ddeaf
|
|
BLAKE2b-256 checksum How to use checksums |
b7fbb7231e7d795e15186799576a2df6fcb62b353e7bf7fbac67ee070f8af77a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for filter-profanity 1.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.