Skip to main content

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'], 80) # (bad word list) (threshold)

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'], 80)

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'], 80) # (threshold won't do anything in this case)

print(pb.percentscan('werd'))

Output:

75

Extras: If you would like a preset list of profanities, just do:

from cleanlang.extras import profanitylist

print(profanitylist)

Output:

hidden for obvious reasons

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

cleanlang-2.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cleanlang-2.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file cleanlang-2.0.tar.gz.

File metadata

  • Download URL: cleanlang-2.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for cleanlang-2.0.tar.gz
Algorithm Hash digest
SHA256 142a50d32d4bb436bcf4d5fbc3b0d7a720e5db6b933cb0474efe68a8d309e7d4
MD5 f055889bcf791334c48e6b5398a2ccf1
BLAKE2b-256 a80a129138063689be40dfde04ee55c6b91733ea41ff6b1d7d51b7a6cfd767e8

See more details on using hashes here.

File details

Details for the file cleanlang-2.0-py3-none-any.whl.

File metadata

  • Download URL: cleanlang-2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for cleanlang-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 312e2870149126f6e9a3cb45acec8a839ab08f06c01d545df57f03112df54762
MD5 a159f45bdf412612b9c13a315766e21b
BLAKE2b-256 3b0b5849944c5825383383de7e147578b25280bb303868882ae6f706818e05e5

See more details on using hashes here.

Supported by

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