dictionary-profanity-filter-1.0.4
توضیحات
Python profanity filter
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | dictionary-profanity-filter-1.0.4 |
| نام | dictionary-profanity-filter |
| نسخه کتابخانه | 1.0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Dmitry Shorokhov |
| ایمیل نویسنده | vip.shoroch@gmail.com |
| آدرس صفحه اصلی | https://github.com/ProgrammingLanguageLeader/dictionary-profanity-filter |
| آدرس اینترنتی | https://pypi.org/project/dictionary-profanity-filter/ |
| مجوز | MIT license |
# Dictionary Profanity Filter
[](https://travis-ci.com/ProgrammingLanguageLeader/dictionary-profanity-filter)
[](https://badge.fury.io/py/dictionary-profanity-filter)
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:
```bash
pip install dictionary-profanity-filter
```
## How to use
Here are several examples of the module usage:
- Creating ProfanityFilter instance:
```python
from dictionary_profanity_filter import ProfanityFilter
profanity_filter = ProfanityFilter()
```
- Adding custom words to censor:
```python
profanity_filter.add_words(['censorship', 'blocking'])
profanity_filter.censor('I hate censorship and blocking!')
# Output: 'I hate ********** and ********!'
```
- Detect bad words in the text:
```python
profanity_filter.is_clean('Porn is a restricted word')
# Output: False
```
- Removing word from custom dictionary:
```python
profanity_filter.remove_word('blocking')
profanity_filter.censor('I hate censorship and blocking!')
# Output: 'I hate ********** and blocking!'
```
## TODO
- [ ] Write documentation
- [x] Write tests
نیازمندی
| مقدار | نام |
|---|---|
| ==0.7.2 | DAWG-Python |
| ==0.0.7 | alphabet-detector |
| ==0.6.2 | docopt |
| ==0.3.1 | inflection |
| ==2.4.393442.3710985 | pymorphy2-dicts |
| ==0.8 | pymorphy2 |
نحوه نصب
نصب پکیج whl dictionary-profanity-filter-1.0.4:
pip install dictionary-profanity-filter-1.0.4.whl
نصب پکیج tar.gz dictionary-profanity-filter-1.0.4:
pip install dictionary-profanity-filter-1.0.4.tar.gz