profanityfilter 2.1.0
pip install profanityfilter
Released:
A universal Python library for detecting and/or filtering profane words.
Navigation
Verified details
These details have been verified by PyPIProject links
GitHub Statistics
Maintainers
Unverified details
These details have not been verified by PyPIMeta
- License: BSD License (BSD)
- Author: Areeb Beigh
- Tags profanity, filter, clean, content
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Project description
profanityfilter
A universal Python library for detecting and/or filtering profane words.
PyPI: https://pypi.python.org/pypi/profanityfilter
Doc: https://areebbeigh.github.io/profanityfilter/
Installation
> pip install profanityfilter
Usage
from profanityfilter import ProfanityFilter
pf = ProfanityFilter()
pf.censor("That's bullshit!")
> "That's ********!"
pf.set_censor("@")
pf.censor("That's bullshit!")
> "That's @@@@@@@@!"
pf.define_words(["icecream", "choco"])
pf.censor("I love icecream and choco!")
> "I love ******** and *****"
pf.is_clean("That's awesome!")
> True
pf.is_clean("That's bullshit!")
> False
pf.is_profane("Profane shit is not good")
> True
pf_custom = ProfanityFilter(custom_censor_list=["chocolate", "orange"])
pf_custom.censor("Fuck orange chocolates")
> "Fuck ****** **********"
pf_extended = ProfanityFilter(extra_censor_list=["chocolate", "orange"])
pf_extended.censor("Fuck orange chocolates")
> "**** ****** **********"
Console Executable
profanityfilter -h
> usage: profanityfilter-script.py [-h] [-t TEXT | -f PATH] [-o OUTPUT_FILE]
> [--show]
>
> Profanity filter console utility
>
> optional arguments:
> -h, --help show this help message and exit
> -t TEXT, --text TEXT Test the given text for profanity
> -f PATH, --file PATH Test the given file for profanity
> -o OUTPUT_FILE, --output OUTPUT_FILE
> Write the censored output to a file
> --show Print the censored text
Contributing
- Fork
- Add changes
- Add unit tests
- Make a pull request :)
I encourage you to fork this repo and expand it in anyway you like. Pull requests are welcomed!
Additional Info
Developer: Areeb Beigh areebbeigh@gmail.com
GitHub Repo: https://github.com/areebbeigh/profanityfilter/
Project details
Verified details
These details have been verified by PyPIProject links
GitHub Statistics
Maintainers
Unverified details
These details have not been verified by PyPIMeta
- License: BSD License (BSD)
- Author: Areeb Beigh
- Tags profanity, filter, clean, content
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file profanityfilter-2.1.0.tar.gz
.
File metadata
- Download URL: profanityfilter-2.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ede04e92a9d7255faa52b53776518edc6586dda828aca677c74b5994dfdd9d8 |
|
MD5 | 0bf9e6dc1d1d403d2304696feead57b4 |
|
BLAKE2b-256 | 8d0308740b5e0800f9eb9f675c149a497a3f3735e7b04e414bcce64136e7e487 |
Provenance
The following attestation bundles were made for profanityfilter-2.1.0.tar.gz
:
Publisher:
publish.yml
on areebbeigh/profanityfilter
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
profanityfilter-2.1.0.tar.gz
- Subject digest:
0ede04e92a9d7255faa52b53776518edc6586dda828aca677c74b5994dfdd9d8
- Sigstore transparency entry: 151480325
- Sigstore integration time:
- Permalink:
areebbeigh/profanityfilter@2ba760c43470cdd36cb32c6a99a0d9ddcac03fbb
- Branch / Tag:
refs/tags/2.1.0
- Owner: https://github.com/areebbeigh
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish.yml@2ba760c43470cdd36cb32c6a99a0d9ddcac03fbb
- Trigger Event:
push
- Statement type:
File details
Details for the file profanityfilter-2.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: profanityfilter-2.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1bc07012760fd74512a335abb93a36877831ed26abab78bfe31bebb68f8c844 |
|
MD5 | 3f97f95f5ff0a6fe056f4387c89ff089 |
|
BLAKE2b-256 | 8803eb18f72dc6e6398e75e3762677f18ab3a773a384b18efd3ed9119844e892 |
Provenance
The following attestation bundles were made for profanityfilter-2.1.0-py2.py3-none-any.whl
:
Publisher:
publish.yml
on areebbeigh/profanityfilter
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
profanityfilter-2.1.0-py2.py3-none-any.whl
- Subject digest:
e1bc07012760fd74512a335abb93a36877831ed26abab78bfe31bebb68f8c844
- Sigstore transparency entry: 151480330
- Sigstore integration time:
- Permalink:
areebbeigh/profanityfilter@2ba760c43470cdd36cb32c6a99a0d9ddcac03fbb
- Branch / Tag:
refs/tags/2.1.0
- Owner: https://github.com/areebbeigh
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish.yml@2ba760c43470cdd36cb32c6a99a0d9ddcac03fbb
- Trigger Event:
push
- Statement type: