--- id: alt-profanity-check version: "1.9.0" license: unclear license_treatment: permissive maintenance: active --- # alt-profanity-check — A fast, robust library to check for offensive language in strings. Dropdown replacement of "profanity-check". License: permissive · Maintenance: active · Downloads: 324.9K/mo ## What it is and what it does Alt-profanity-check is a maintained fork providing fast offensive-language detection for Python applications. It uses a linear SVM model trained on 200k labeled text samples from hate-speech and toxic-comment datasets, combined with scikit-learn's CountVectorizer and LinearSVC to classify input strings as offensive or clean. The package returns either binary predictions (0 or 1) or probability scores, making it suitable for content moderation pipelines. The library trades some accuracy for speed compared to more sophisticated NLP approaches, but avoids the brittleness of hard-coded word blacklists. It depends on scikit-learn and joblib, and the maintainer aligns package versions with scikit-learn releases to ensure model compatibility. The package is actively maintained and requires Python 3.11 or newer; older Python versions require pinning to specific package versions. Use it for: - Filter user-generated comments or forum posts in real time to flag potentially offensive content for review. - Pre-screen chat messages or social media content in moderation workflows before human review. - Detect toxic language in customer support tickets or feedback to route sensitive cases appropriately. - Classify text datasets for research on hate speech or offensive language patterns. - Implement content policies in multiplayer games or collaborative platforms by scoring text submissions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Detects offensive or profane language in text strings using a machine-learning model trained on labeled datasets, returning binary classifications or probability scores. Yes, if you need fast, model-based profanity detection and can target Python 3.11+. The package is actively maintained, has no known vulnerabilities, and offers better accuracy than blacklist-based alternatives with minimal install friction. The main trade-off is the strict Python version requirement and scikit-learn version pinning; treat predictions as heuristics, not ground truth, and test on your specific use case before deploying. ## Install pip install alt-profanity-check uv add alt-profanity-check poetry add alt-profanity-check ## Installing alt-profanity-check Before you install: Low friction: pure Python wheel with only scikit-learn and joblib as runtime dependencies. Actively maintained with a release 64 days ago; requires Python 3.11 or newer, which may constrain adoption on older codebases. License in practice: MIT license (permissive); you can use, modify, and distribute this package freely with minimal legal restrictions. Quickstart: pip install alt-profanity-check from alt-profanity-check import predict, predict_prob predict(['fuck you']) # [1] predict_prob(['go to hell, you scum']) # [0.7618861] Requires Python 3.11 or newer; scikit-learn version must match the package version (e.g., alt-profanity-check 1.9.0 expects scikit-learn 1.9.0). Verify before relying: - Whether the package's scikit-learn version pinning strategy is enforced strictly or merely recommended. - Current accuracy metrics on modern datasets; the description cites benchmarks from December 2018. - Whether the command-line interface is available in the current version. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 324.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags profanity detection library, offensive language classifier, text content moderation, profanity check python, hate speech detection, toxic comment classifier, bad word detector, content-moderation, text-classification, machine-learning [View on SkillFed](https://skillfed.io/packages/alt-profanity-check) · [View on PyPI](https://pypi.org/project/alt-profanity-check/)