Skip to main content

Python obscene words filter.


Python 2.7 pypi MIT License


This is ultra simple words filter, based on regular expressions. It is built on regular expressions, with Russian language support from the box.

It may work with your language too (if you will write your own regular expressions).

Before using in production, you should test it, because there are no swear words filter in the world that does well filtering, so the quality is not 100%.

But test coverage is :)

Quickstart

Sample code:

from obscene_word_filter.default import get_default_filter

f = get_default_filter()

Or:

from obscene_word_filter import conf
from obscene_word_filter.words_filter import ObsceneWordsFilter

f = ObsceneWordsFilter(conf.bad_words_re, conf.good_words_re)

Then you can mask use input:

f.mask_bad_words("Тут должны быть матерные слова.")
>>> Тут должны быть ******** *****.

Documentation

Just read the tests :)

Metadata

Release files for python-obscene-words-filter 0.1.6

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

Source distribution (sdist)

Source distribution for python-obscene-words-filter 0.1.6
File Size Uploaded Provenance
python-obscene-words-filter-0.1.6.tar.gz 8.3 kB Without provenance Details

Release files / python-obscene-words-filter-0.1.6.tar.gz

Download URL python-obscene-words-filter-0.1.6.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
88c2daaf1ad2bff86ccb740ded467b0442bfecbc95762173864e051ab2153cb9
BLAKE2b-256 checksum
How to use checksums
54c27ae2a9065b39555637bbabd67aa4d98bf85bd69a7e8fee4b7e0dc1b4b702
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for python-obscene-words-filter 0.1.6

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

0.1.6 This release

1 release file No provenance

0.1.3

0.1

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