Obscene words filter for python, built on regexp for Russian language.
Project description
Python obscene words filter.
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 :)
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
Close
Hashes for python-obscene-words-filter-0.1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88c2daaf1ad2bff86ccb740ded467b0442bfecbc95762173864e051ab2153cb9 |
|
MD5 | 105c11e962c3350f02381b13d9f65a3a |
|
BLAKE2b-256 | 54c27ae2a9065b39555637bbabd67aa4d98bf85bd69a7e8fee4b7e0dc1b4b702 |