Skip to main content

An intelligent Python library designed to detect and filter offensive language, ensuring respectful and constructive communication in any digital space.

Project description

cleanse-speech 🚀

PyPI version Downloads Downloads

Python🐍 3.9+ support.

pip install cleanse-speech

Usage

from cleanse_speech import DLFA

if __name__ == '__main__':
    dfa = DLFA(words_resource=[
        ['你好'],
        io.BytesIO(b'sensitive'),
    ])
    print(dfa.contains_illegal('This is a 你好 word.'))
    print(dfa.censor_all('This is a 你好 word.'))
    print(dfa.extract_illegal_words('This is a 你好 word.'))
    dfa.update_words(['sensitive', 'word', 'new'])
    print(dfa.contains_illegal('This is a new sensitive word.'))
    print(dfa.censor_all('This is a new sensitive word.'))
    print(dfa.extract_illegal_words('This is a new sensitive word.'))

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

cleanse_speech-0.1.0.tar.gz (40.5 kB view details)

Uploaded Source

Built Distribution

cleanse_speech-0.1.0-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

Details for the file cleanse_speech-0.1.0.tar.gz.

File metadata

  • Download URL: cleanse_speech-0.1.0.tar.gz
  • Upload date:
  • Size: 40.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.15.2 CPython/3.10.12 Linux/6.5.0-1018-azure

File hashes

Hashes for cleanse_speech-0.1.0.tar.gz
Algorithm Hash digest
SHA256 61b0fc048e6f521408820d1471e0e06b0d336f78b81ac76e4f5ce2c527621840
MD5 8a85b6ba45b56b118937d7427ac2a6dc
BLAKE2b-256 1b40f6650b386837bee5617fa6a8a8898cdebdb35a4da9475bd61781eceff021

See more details on using hashes here.

File details

Details for the file cleanse_speech-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cleanse_speech-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.15.2 CPython/3.10.12 Linux/6.5.0-1018-azure

File hashes

Hashes for cleanse_speech-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b318d104df71e37695964c373c7eb9ab0ab08024acce03a18385c1f4417194f
MD5 95fbf124fa5d52ce2c8e37e89c4e7bee
BLAKE2b-256 c7cd30e8161c5b651999e53cab812449342d0882318a6be1facc3736ea387ce9

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