profanex


Nameprofanex JSON
Version 0.0.2 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2025-07-12 19:54:01
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords censorship content-moderation filtering fuzzy-matching normalization profanity text-processing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Profanex

Profanex is a Python library for detecting and masking profanity in text using a combination of exact and fuzzy matching. It supports customizable banned and excluded word lists, configurable masking styles, and fast performance suitable for processing large volumes of text.

## Features

- Exact and fuzzy profanity detection with adjustable similarity threshold
- Masking profanity with configurable styles (e.g., stars)
- Load banned and excluded words from YAML files or directly via Python sets
- Excludes specific words from masking (e.g., “on”, “no”)
- Simple API with `has_profanity()` and `clean()` methods

## Installation

``` sh
pip install profanex
```

## Usage

``` py
from profanex import ProfanityFilter

pf = ProfanityFilter()

text = "You are a b1tch!"
if pf.has_profanity(text):
    clean_text = pf.clean(text)
    print(clean_text)  # Output: You are a *****!

```

## Performance

Profanex can process 10,000 average-length text entries in under 1.5 seconds on modern hardware, making it well-suited for both real-time and batch profanity filtering.

For larger workloads, Profanex supports parallel processing using Python's `concurrent.futures` module. When executed with `ProcessPoolExecutor`, Profanex can leverage all available CPU cores to efficiently clean or scan tens of thousands of texts in parallel with minimal overhead.

- See `scripts/benchmark_clean_parallel.py` for an Example

## Configuration

You can customize the banned and excluded word lists by providing your own YAML files or Python sets during initialization.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "profanex",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "jyablonski9 <jyablonski9@gmail.com>",
    "keywords": "censorship, content-moderation, filtering, fuzzy-matching, normalization, profanity, text-processing",
    "author": null,
    "author_email": "jyablonski9 <jyablonski9@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/5e/5c/8dffe58d92c34f2486a5eefd8801bb230717cdbb10622fa42f22248336e8/profanex-0.0.2.tar.gz",
    "platform": null,
    "description": "# Profanex\n\nProfanex is a Python library for detecting and masking profanity in text using a combination of exact and fuzzy matching. It supports customizable banned and excluded word lists, configurable masking styles, and fast performance suitable for processing large volumes of text.\n\n## Features\n\n- Exact and fuzzy profanity detection with adjustable similarity threshold\n- Masking profanity with configurable styles (e.g., stars)\n- Load banned and excluded words from YAML files or directly via Python sets\n- Excludes specific words from masking (e.g., \u201con\u201d, \u201cno\u201d)\n- Simple API with `has_profanity()` and `clean()` methods\n\n## Installation\n\n``` sh\npip install profanex\n```\n\n## Usage\n\n``` py\nfrom profanex import ProfanityFilter\n\npf = ProfanityFilter()\n\ntext = \"You are a b1tch!\"\nif pf.has_profanity(text):\n    clean_text = pf.clean(text)\n    print(clean_text)  # Output: You are a *****!\n\n```\n\n## Performance\n\nProfanex can process 10,000 average-length text entries in under 1.5 seconds on modern hardware, making it well-suited for both real-time and batch profanity filtering.\n\nFor larger workloads, Profanex supports parallel processing using Python's `concurrent.futures` module. When executed with `ProcessPoolExecutor`, Profanex can leverage all available CPU cores to efficiently clean or scan tens of thousands of texts in parallel with minimal overhead.\n\n- See `scripts/benchmark_clean_parallel.py` for an Example\n\n## Configuration\n\nYou can customize the banned and excluded word lists by providing your own YAML files or Python sets during initialization.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "0.0.2",
    "project_urls": null,
    "split_keywords": [
        "censorship",
        " content-moderation",
        " filtering",
        " fuzzy-matching",
        " normalization",
        " profanity",
        " text-processing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "396625fe9fceec66354a083e94f4be21dfd26ebe3c3997701a8735d147d5d562",
                "md5": "664255dc2de4d012a52ea384a082cf98",
                "sha256": "d23a1676eeb8c1c0238359ea7417b26be213f3345197b55d88194146fa7e3490"
            },
            "downloads": -1,
            "filename": "profanex-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "664255dc2de4d012a52ea384a082cf98",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 7577,
            "upload_time": "2025-07-12T19:54:01",
            "upload_time_iso_8601": "2025-07-12T19:54:01.136094Z",
            "url": "https://files.pythonhosted.org/packages/39/66/25fe9fceec66354a083e94f4be21dfd26ebe3c3997701a8735d147d5d562/profanex-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5e5c8dffe58d92c34f2486a5eefd8801bb230717cdbb10622fa42f22248336e8",
                "md5": "086328aca1a48fad97720ea605b4c5e6",
                "sha256": "de99d2eaf2cf0843c4c06612fbcdab353566d51b3f66de3f76b6d6e3e3511051"
            },
            "downloads": -1,
            "filename": "profanex-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "086328aca1a48fad97720ea605b4c5e6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 6802,
            "upload_time": "2025-07-12T19:54:01",
            "upload_time_iso_8601": "2025-07-12T19:54:01.888246Z",
            "url": "https://files.pythonhosted.org/packages/5e/5c/8dffe58d92c34f2486a5eefd8801bb230717cdbb10622fa42f22248336e8/profanex-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-12 19:54:01",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "profanex"
}
        
Elapsed time: 0.97464s