bdw


Namebdw JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/FlacSy/bdw
SummaryThis library is needed to check text for bad words in different languages.
upload_time2023-10-24 21:15:56
maintainer
docs_urlNone
authorFlacSy
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # bdw (Bad Word Filter)

`bdw` (Bad Word Filter) is a Python library designed to filter text and detect obscene words in several languages (en, pl, de, ru, ua). It allows you to determine whether the text contains obscene words depending on the selected language or in several languages at the same time.

## Installation

You can install `bdw` using `pip`:

```shell
pip install git+https://github.com/FlacSy/bdw.git
```
## Examples
Example of using bdw (Like `check` example):

```python
from bdw.check import Check

# Use only Russian language
filter_ru = Check(languages=['ru'])

# Use all available languages
filter_all = Check(all=True)

# Use multiple languages
filter_multiple_languages = Check(languages=['ru', 'en', 'de'])

# Checking the text for obscene words in a specific language
text = input('Word check: ')
if filter_ru.filter_profanity(text, language='ru'):
     print("The text contains obscene words in Russian")

# Checking text for obscene words in all languages
if filter_all.filter_profanity(text):
     print("The text contains obscene words in one of the available languages")

```
Example of using bdw - delete:
```python
from bdw.delete import Delete

filter = Delete(languages=['ru']) # Specify supported languages
text = input('Word check: ')
filtered_text = filter.filter_profanity(text, language='ru')
print(filtered_text)

```
Example of using bdw - replace:
```python
from bdw.replace import Replace

filter = Replace()
text = input('Word check: ')
filtered_text = filter.filter_profanity(text, language='ru', replacement_text='***')
print(filtered_text)

```
Example of using bdw - loader:
```python
from bdw.loader import WordsLoader

loader = WordsLoader()
loader.load_file('you_dir/file_name.txt')

```
## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Author

- [FlacSy](https://github.com/FlacSy)

## Links

- [GitHub repository](https://github.com/FlacSy/bdw)
- [Discord server](https://discord.gg/c4yNwz3uqZ)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/FlacSy/bdw",
    "name": "bdw",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "FlacSy",
    "author_email": "flacsy.x@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "# bdw (Bad Word Filter)\r\n\r\n`bdw` (Bad Word Filter) is a Python library designed to filter text and detect obscene words in several languages (en, pl, de, ru, ua). It allows you to determine whether the text contains obscene words depending on the selected language or in several languages at the same time.\r\n\r\n## Installation\r\n\r\nYou can install `bdw` using `pip`:\r\n\r\n```shell\r\npip install git+https://github.com/FlacSy/bdw.git\r\n```\r\n## Examples\r\nExample of using bdw (Like `check` example):\r\n\r\n```python\r\nfrom bdw.check import Check\r\n\r\n# Use only Russian language\r\nfilter_ru = Check(languages=['ru'])\r\n\r\n# Use all available languages\r\nfilter_all = Check(all=True)\r\n\r\n# Use multiple languages\r\nfilter_multiple_languages = Check(languages=['ru', 'en', 'de'])\r\n\r\n# Checking the text for obscene words in a specific language\r\ntext = input('Word check: ')\r\nif filter_ru.filter_profanity(text, language='ru'):\r\n     print(\"The text contains obscene words in Russian\")\r\n\r\n# Checking text for obscene words in all languages\r\nif filter_all.filter_profanity(text):\r\n     print(\"The text contains obscene words in one of the available languages\")\r\n\r\n```\r\nExample of using bdw - delete:\r\n```python\r\nfrom bdw.delete import Delete\r\n\r\nfilter = Delete(languages=['ru']) # Specify supported languages\r\ntext = input('Word check: ')\r\nfiltered_text = filter.filter_profanity(text, language='ru')\r\nprint(filtered_text)\r\n\r\n```\r\nExample of using bdw - replace:\r\n```python\r\nfrom bdw.replace import Replace\r\n\r\nfilter = Replace()\r\ntext = input('Word check: ')\r\nfiltered_text = filter.filter_profanity(text, language='ru', replacement_text='***')\r\nprint(filtered_text)\r\n\r\n```\r\nExample of using bdw - loader:\r\n```python\r\nfrom bdw.loader import WordsLoader\r\n\r\nloader = WordsLoader()\r\nloader.load_file('you_dir/file_name.txt')\r\n\r\n```\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Author\r\n\r\n- [FlacSy](https://github.com/FlacSy)\r\n\r\n## Links\r\n\r\n- [GitHub repository](https://github.com/FlacSy/bdw)\r\n- [Discord server](https://discord.gg/c4yNwz3uqZ)\r\n\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This library is needed to check text for bad words in different languages.",
    "version": "1.1.1",
    "project_urls": {
        "Homepage": "https://github.com/FlacSy/bdw"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "294ddef3da732f01c3ae51698449b993e0bf6c8222ae7c8a75bf9d1223d697a0",
                "md5": "58f8344288c84debc317a08511ea9959",
                "sha256": "56a6611d0877618ce535cb42f0aa2f25e32f0cce10783712c07d29e8d5047495"
            },
            "downloads": -1,
            "filename": "bdw-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "58f8344288c84debc317a08511ea9959",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12913,
            "upload_time": "2023-10-24T21:15:56",
            "upload_time_iso_8601": "2023-10-24T21:15:56.285140Z",
            "url": "https://files.pythonhosted.org/packages/29/4d/def3da732f01c3ae51698449b993e0bf6c8222ae7c8a75bf9d1223d697a0/bdw-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-24 21:15:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "FlacSy",
    "github_project": "bdw",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "bdw"
}
        
Elapsed time: 0.16384s