ai-text-cleaner
Regelbasierter + LLM-gestützter Cleaner für KI-typische Schreibmuster in deutschen Texten.
Erkennt und glättet z. B. Em-Dash-Overuse, Floskeln („In der heutigen Zeit", „Darüber hinaus", „Es ist wichtig zu beachten"), generische Intros, Buzzword-Verben, generische Headlines und gleichförmige Satzlängen.
Architektur
Zwei Stufen, optional kombinierbar:
- Tier 1 — Rules (stdlib + YAML, offline, gratis, deterministisch)
- Tier 2 — LLM-Polish (Anthropic Claude, Default
claude-haiku-4-5-20251001, optional)
Geplant für v0.3.0: Tier 3 — Adversarial-Eval-Loop mit eigenem Klassifikator.
Installation
pip install ai-text-cleaner # nur Rules
pip install ai-text-cleaner[llm] # mit LLM-Polish
pip install ai-text-cleaner[llm,clipboard] # voll
CLI
ai-text-cleaner artikel.md # Default: Hybrid (Rules + LLM, falls Key vorhanden)
ai-text-cleaner artikel.md --rules-only # nur Tier 1, offline
ai-text-cleaner artikel.md --llm-only # nur Tier 2
ai-text-cleaner artikel.md -o out.md
ai-text-cleaner artikel.md --report # Analyse ohne Rewrite
ai-text-cleaner draft.json --format bm-json # Blog-Machine-DraftVersion-JSON
cat artikel.md | ai-text-cleaner - # stdin → stdout
ai-text-cleaner --clipboard # liest + schreibt Clipboard
ai-text-cleaner artikel.md --rules em_dashes,floskeln
ENV: ANTHROPIC_API_KEY für die LLM-Stufe. Fehlt der Key → automatischer Rückfall auf --rules-only mit Warnung.
Python-API
from ai_text_cleaner import clean_text, analyze_text, Mode
result = clean_text(
"In der heutigen Zeit revolutioniert KI die Branche — und das schnell — und tiefgreifend.",
mode=Mode.HYBRID,
)
print(result.text)
print(result.report.markdown())
Was wird erkannt?
- Em-Dashes: > 1 Em-Dash pro Absatz → Komma/Punkt
- Floskeln:
„In der heutigen Zeit",„Darüber hinaus",„Es ist wichtig zu beachten",„Zusammenfassend lässt sich sagen"u. a. - Buzzword-Verben:
„revolutionieren"→„verändert",„optimieren"→„verbessert"(kontextabhängig) - Headlines:
„Die ultimative/komplette/perfekte ..."→ neutralisiert - Whitespace: NBSP, doppelte Leerzeichen, Mehrfach-Newlines
- Satzlängen-Varianz: Hinweis im Report (kein Auto-Rewrite in v1)
Erweiterung der Patterns via eigene YAML: ai-text-cleaner artikel.md --patterns custom.yaml.
Grenzen
- „100% KI-frei" ist technisch nicht garantierbar. Selbst menschliche Texte werden von AI-Detectors mit ~5–15% Falsch-Positiv-Rate als „KI" klassifiziert. Das Tool senkt die Wahrscheinlichkeit deutlich, kann sie aber nicht eliminieren.
- v1 ist DE-fokussiert. EN-Patterns sind nicht im Scope.
- LLM-Stufe ist nicht-deterministisch — Output variiert bei wiederholtem Lauf.
Tests
pip install -e ".[dev,llm,clipboard]"
pytest -v
Lizenz
MIT
Metadata
Release files for ai-text-cleaner 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_text_cleaner-0.1.0.tar.gz | 21.9 kB | Without provenance | Details for ai_text_cleaner-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_text_cleaner-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ai_text_cleaner-0.1.0-py3-none-any.whl |
Total release size: 45.2 kB
Release files / ai_text_cleaner-0.1.0.tar.gz
| Download URL | ai_text_cleaner-0.1.0.tar.gz |
|---|---|
| Size | 21.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e13b43770f9d08c1ac84108305d074c95a294c3e8e177cfc172b3c9782930f2
|
|
BLAKE2b-256 checksum How to use checksums |
80b95010be8bd0bca4d760f6e980d018b8fd0d4f5e3e20339d330da71adb1bb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / ai_text_cleaner-0.1.0-py3-none-any.whl
| Download URL | ai_text_cleaner-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7b4b4cb4b865eecf0bda1b2d20e153a7a0e45b4145b67dcbf3bbd10821cf58a
|
|
BLAKE2b-256 checksum How to use checksums |
896b7064c9fbcae20a65c6551a12a58f68078bfccc5044e437ff0faad365b745
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Security for ai-text-cleaner 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.