Skip to main content

cleanse-speech 🚀

PyPI version Downloads Downloads

Python🐍 3.9+ support.

A library for cleansing sensitive words in speech.

[!NOTE] This library is designed with the intent to promote a harmonious online environment by identifying and addressing offensive language. It is not intended to enforce strict censorship or infringe upon free speech. Our goal is to foster respectful communication and ensure that all users feel safe and included in online communities. By using this library, developers can help create spaces where open dialogue is encouraged while maintaining a level of decency and mutual respect.

Installation

pip install cleanse-speech

Usage

import io

from cleanse_speech import DLFA
from cleanse_speech import SpamShelf

if __name__ == '__main__':
    dfa = DLFA(words_resource=[
        ['你好'],
        io.BytesIO(b'sensitive'),
        SpamShelf.CN.ADVERTISEMENT,
    ])
    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.extract_illegal_words('This is a new sensitive word.'))

Metadata

Release files for cleanse-speech 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cleanse-speech 0.1.3
File Size Uploaded Provenance Actions
cleanse_speech-0.1.3.tar.gz 41.5 kB Without provenance Details for cleanse_speech-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cleanse-speech 0.1.3
File Interpreter ABI Platform Actions
cleanse_speech-0.1.3-py3-none-any.whl Python 3 none any Details for cleanse_speech-0.1.3-py3-none-any.whl

Total release size: 85.1 kB

Release files / cleanse_speech-0.1.3.tar.gz

Download URL cleanse_speech-0.1.3.tar.gz
Size 41.5 kB
Tags Source
SHA-256 checksum
How to use checksums
de3df771500eb426fecf7c700991932e48dc5d24c11b4bada27be17554525985
BLAKE2b-256 checksum
How to use checksums
855e2fe5b9876fa2a183667009bdc44ed2840ab565c64558ef19ca2e122ffe35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.15.2 CPython/3.10.12 Linux/6.5.0-1018-azure

Release files / cleanse_speech-0.1.3-py3-none-any.whl

Download URL cleanse_speech-0.1.3-py3-none-any.whl
Size 43.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d7d6ae8a0f2c4a70825b345e16dcde63e1eb0461464f7efea528130778d5d86
BLAKE2b-256 checksum
How to use checksums
154dd03bfd00df03bd5799f3ec33b63e2d9c7dda733a336db516ae871ef01e1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.15.2 CPython/3.10.12 Linux/6.5.0-1018-azure

Security for cleanse-speech 0.1.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page