Skip to main content

Dictionary Profanity Filter

Build Status PyPI version

Python module for profanity filtering using dictionaries. It supports English and Russian languages out-of-the-box.

Requirements

  • Python 3.5 or higher

How to install

Use the following command to install the package using pip:

pip install dictionary-profanity-filter

How to use

Here are several examples of the module usage:

  • Creating ProfanityFilter instance:
from dictionary_profanity_filter import ProfanityFilter
profanity_filter = ProfanityFilter()
  • Adding custom words to censor:
profanity_filter.add_words(['censorship', 'blocking'])
profanity_filter.censor('I hate censorship and blocking!')
# Output: 'I hate ********** and ********!'
  • Detect bad words in the text:
profanity_filter.is_clean('Porn is a restricted word')
# Output: False
  • Removing word from custom dictionary:
profanity_filter.remove_word('blocking')
profanity_filter.censor('I hate censorship and blocking!')
# Output: 'I hate ********** and blocking!'

TODO

  • Write documentation
  • Write tests

Metadata

Release files for dictionary-profanity-filter 1.0.4

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

Source distribution (sdist)

Source distribution for dictionary-profanity-filter 1.0.4
File Size Uploaded Provenance Actions
dictionary-profanity-filter-1.0.4.tar.gz 9.9 kB Without provenance Details for dictionary-profanity-filter-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dictionary-profanity-filter 1.0.4
File Interpreter ABI Platform Actions
dictionary_profanity_filter-1.0.4-py3-none-any.whl Python 3 none any Details for dictionary_profanity_filter-1.0.4-py3-none-any.whl

Total release size: 21.0 kB

Release files / dictionary-profanity-filter-1.0.4.tar.gz

Download URL dictionary-profanity-filter-1.0.4.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6d141c5fddec6f210a6ce0467207a9b8d89f5ee4b5c58eb64560636fa1c6fc63
BLAKE2b-256 checksum
How to use checksums
bf7a44418f1488b3ed32b79207866b055ca4fc25b5696475735cee9283453b90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Release files / dictionary_profanity_filter-1.0.4-py3-none-any.whl

Download URL dictionary_profanity_filter-1.0.4-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39a70111196ba43a52d64db352c332a8ebde78683d2ede4e9beabe7579811924
BLAKE2b-256 checksum
How to use checksums
29fd7fad034c5043fa747232bde5244a586d0053a6f84abd4bcdf8aaa13f198d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Security for dictionary-profanity-filter 1.0.4

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.

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files No provenance

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