Releases: FlacSy/BadWords
Releases · FlacSy/BadWords
2.3.1 — PyPI sdist fix
Fixes
- PyPI: LICENSE file is now included in the source distribution (sdist). This fixes installation on Python 3.10+ when no prebuilt wheel is available.
- PyPI: Release workflow now builds and uploads sdist automatically.
Added
examples/python/ml_moderation.py— example of ML-based toxicity detection withbadwords-py[ml].
v2.3.0 — ML Module & Benchmarks
Optional ML-based toxicity detection and benchmark updates.
Packages
- Python:
pip install badwords-py - Python (ML):
pip install badwords-py[ml] - Rust:
cargo add badwords-core - Node.js / Browser:
npm install badwords-wasm @badwords/languages
Highlights
- badwords-py[ml] — optional ML toxicity predictor (XLM-RoBERTa ONNX)
- Model storage — GitHub Releases, cache
~/.cache/badwords/ml/, orBADWORDS_ML_PATH - Benchmarks —
make bench/make bench-compare(vs glin-profanity) - Throughput — ~130–400 K/s (rule-based), ~150–220/s (ML)
ML
from badwords.ml import ToxicityPredictor
p = ToxicityPredictor() # downloads from GitHub Releases on first use
prob = p.predict("Текст") # 0.0–1.0Assets
- badwords-ml-model.zip — ML model for
badwords-py[ml](download on first use)
v.2.2.0
v2.2.0 — Rust Core & Multi-Platform
Major release: core rewritten in Rust, bindings for Python, Rust, and JavaScript (WebAssembly).
Packages
| Platform | Install |
|---|---|
| Python | pip install badwords-py |
| Rust | cargo add badwords-core |
| Node.js / Browser | npm install badwords-wasm @badwords/languages |
Highlights
- badwords-core (crates.io) — Rust library
- badwords-py (PyPI) — Python bindings via PyO3
- badwords-wasm (npm) — WebAssembly for JS/TS
- @badwords/languages (npm) — 25 language packs
- GitHub Actions CI (tests, format, release)
- Docs: badwords.flacsy.dev
Breaking changes
- Project layout:
badwords/→python/badwords/, newrust/crate structure
v2.1.0
BadWords 2.1.0
-
Добавлен мощный текстовый процессор (TextProcessor) с расширенными возможностями:
- Транслитерация между кириллицей и латиницей
- Нормализация Unicode-символов
- Обнаружение и обработка гомоглифов
- Агрессивная нормализация текста
- Частотный анализ символов
- Многослойная фильтрация
-
Добавлена поддержка Python 3.10 и выше