A module used to filter out profane and/or offensive language of your choosing!
Project description
cleanlang let's you filter out profane and/or offensive language with customizable options! This includes things like threshold, a line between whether something is close to profane or not profane!
DISCLAIMER
Our module's results vary depending on your settings. This module is also in beta as of 6/10/25. We are also not responsible for any harm according to the MIT license.
profanityfilter: (Creates a profanity filter class)
import cleanlang
profanebot = cleanlang.profanityfilter(['bad', 'word'], threshold=80) # (bad word list) (threshold at default set to 70)
Output:
No output
boolscan: (Determines whether or not a string contains profane language or not based on a boolean [True/False])
import cleanlang
pb = cleanlang.profanityfilter(['bad', 'word'], threshold=70)
print(pb.scan('this Woard is b@d'))
Output:
True
percentscan: (Determines whether or not a string contains profane language or not based on an integer percentage from 0-100)
import cleanlang
pb = cleanlang.profanityfilter(['word']) # (threshold won't do anything in this case)
print(pb.percentscan('werd'))
Output:
75
fillerscan: (Replaces any profane words with a filler of your choosing)
import cleanlang
pb = cleanlang.profanityfilter(['word'])
print(pb.fillerscan("Hello! Isn't this a cool word?", '[_]')) # _ (Filler)
Output:
Hello! Isn't this a cool [_]
Extras: If you would like a preset list of profanities, just do:
from cleanlang.extras import profanitylist
print(profanitylist)
Output:
view output at your own discretion
dependencies:
- fuzzywuzzy[speedup]
Thanks for reading, and enjoy cleanlang! :)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cleanlang-3.3.tar.gz.
File metadata
- Download URL: cleanlang-3.3.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9df01c93a03b90bc1dc6b85210ac948456533479103f7358f3e234444637fa3a
|
|
| MD5 |
2171e39172d87e31c63005ea6541b833
|
|
| BLAKE2b-256 |
8a732bef1480b94b818c479e49d65a4aa3441cd70a8db3ed56ef0c7864ffc197
|
File details
Details for the file cleanlang-3.3-py3-none-any.whl.
File metadata
- Download URL: cleanlang-3.3-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a77a8e31fa1d0760e4dffbee2f277b255b0f04afdcf1e895e4bee19e1866e03
|
|
| MD5 |
33c32aa07719b955a392764bd9d92e14
|
|
| BLAKE2b-256 |
f7375ce00173a334745af4064329dc45a2531e89788d51414b3f9ccb8d83dd5c
|