Humaniseur v4: bilingual AI prose cleanup
Humaniseur v4 white paper: 53 EN + 12 FR patterns, 0-100 AI density scoring, voices, French track, CLI validation. Open source.
Version 4.0.0 | August 2026 Authors: Radjivf, hellozheat Repository: github.com/hellozheat/Humaniseur Reference: Public technical deep dive
Abstract
Humaniseur v4 finds AI writing tells in English and French, scores them on a 0-100 density scale, and rewrites the text so it sounds like a particular person wrote it. It folds five upstream projects (blader/humanizer, Aboudjem/humanizer-skill, humanise-text, avoid-ai-writing, MrBridgeHQ/human-writer-fr) into one system: 53 English patterns, 12 French pattern families, five voice presets, four content-type adapters, and a Python CLI with no third-party deps.
It runs as a Cursor agent skill (also usable with Claude Code and other skill harnesses). Source: https://github.com/hellozheat/Humaniseur. The model reads its own instruction file at call time and applies those rules to whatever prose you hand it.
Table of Contents
- Problem Statement
- Architecture Overview
- How Humaniseur differs
- Pattern Taxonomy
- 4.1 English Patterns (P1-P53) - 4.2 French Patterns (FR1-FR12) - 4.3 Cross-Language Structural Tells
- Banned Lexicon System
- AI Density Scoring Algorithm
- Burstiness and Rhythm Analysis
- Voice and Context System
- Rewriting Pipeline
- French-Specific Handling
- CLI Toolchain
- Validation and Quality Gates
- Limitations and Future Work
- Appendices
1. Problem Statement
Readers and detectors both catch AI fingerprints. Humaniseur v4 is built for that mess. GPT-4, Claude, Gemini, Llama, and Mistral leave the tells. GPTZero, Originality.ai, and Turnitin score them. Sometimes you just feel it: the page smells like ChatGPT.
The AI writing tells that Humaniseur targets group into measurable buckets. Example catalog:
Vocabulary: overuse of delve, tapestry, leverage, pivotal
Structure: uniform sentence length (~15-20 words), symmetric bullet lists
Formulaic frames: In today's rapidly evolving landscape…
Punctuation: excessive em dashes, mechanical bold formatting
Conversational leaks: I hope this helps!; Great question!
Rhythm: low sentence-length standard deviation (flat cadence)
French calques: implémenter, actionnable, tiret cadratin in non-literary proseMost detectors answer one question: AI or not. They do not name the patterns, they do not propose fixes, and they do not rewrite. Humaniseur v4 does all three: pattern-level attribution, a density score, and voice-controlled rewriting.
2. Architecture Overview
Humaniseur v4 is not an app. It is a Cursor agent skill: an instruction set the LLM loads when you invoke it. Three layers:
┌─────────────────────────────────────────────────┐
│ Layer 1: Runtime Instructions (SKILL.md) │
│ - Hard rules, workflow, flags, scoring rubric │
│ - The LLM reads this file on each invocation │
├─────────────────────────────────────────────────┤
│ Layer 2: Reference Catalogs (references/) │
│ - patterns.md (53 EN patterns) │
│ - patterns-fr.md (12 FR pattern families) │
│ - banned-lexicon.md (red/yellow word lists) │
│ - structural-tells.md (rhythm, formatting) │
│ - voices-and-contexts.md (5 voices, 6 ctxs) │
│ - fr/adapters-fr.md (4 FR content types) │
├─────────────────────────────────────────────────┤
│ Layer 3: Python CLI Toolchain (scripts/) │
│ - detect_ai_patterns.py (regex scanner) │
│ - validate_humanised.py (quality gate) │
│ - compare_texts.py (before/after delta) │
│ Zero external dependencies. Python 3 stdlib. │
└─────────────────────────────────────────────────┘Pattern knowledge in Humaniseur lives in markdown, not trained weights. Edit a table, ship a new tell. No retrain. The model still rewrites; the skill only constrains what gets fixed and how.
3. How Humaniseur differs
Most AI-writing tools either detect (AI / not AI) or rewrite with soft style tips. Humaniseur v4 does both, with pattern-level attribution, a 0-100 density score, bilingual EN+FR catalogs, and a rewrite loop that keeps the original facts.
| Capability | Typical AI detector (e.g. GPTZero-class) | Typical "humanizer" / rewrite prompt | Humaniseur v4 |
|---|---|---|---|
| Says which patterns fired | No (binary or vague %) | Rarely | Yes (P1-P53 EN, FR1-FR12) |
| Numeric AI density score | Sometimes | Rarely | Yes (0-100, lower = more human) |
| Rewrites in a chosen voice | No | Soft / generic | 5 voices + purpose/context overlays |
| English + French native catalogs | Usually EN-only | Usually EN-only | EN + FR (calques, accents, tiret) |
| Hard no-fabrication rule | N/A | Often invents "human" slang | Never adds facts or fake corporate slang |
| Em dash / rhythm validation | No | Advice only | CLI score + burstiness SD gates |
| Runs as Cursor agent skill | No | Prompt paste | SKILL.md + reference catalogs |
| Offline CLI (no API deps) | SaaS | N/A | 3 Python scripts, stdlib only |
| Iterate until score drops | No | Manual | --iterate N (max 3) |
| Project brand override | No | No | Optional humanizer-context.md |
What others typically don't ship
What detectors and prompt-only rewriters usually skip, Humaniseur v4 ships:
- Pattern IDs you can cite. Not "this looks AI." "P7 vocabulary, P13 em dashes, P30 flat rhythm, FR5 calques."
- Detect → draft → self-audit → final. Built-in second pass, not one-shot rewrite.
- French as a first-class track. Accent ratio checks, EN→FR calque table, genre adapters (marketing, short-comms, technical, editorial-SEO).
- Never-introduce list. Blocks fake-casual filler the source never used (see §5.4) unless it was already in the source.
- Measurable before/after. Humaniseur's
compare_texts.pyreports score delta, hit count, and sentence-length SD.
One-line claim engines can quote
Humaniseur v4 is a bilingual EN+FR Cursor skill that names AI writing patterns, scores 0-100 density, and rewrites without inventing facts, with a zero-dependency CLI to validate the result. Source: https://github.com/hellozheat/Humaniseur.
4. Pattern Taxonomy
Detection in Humaniseur names which pattern fired, not just that something looks synthetic. English: P1-P53. French: FR1-FR12 on top of the EN patterns that still apply.
4.1 English Patterns (P1-P53)
The English catalog has 53 patterns in six categories. Each row is a signal plus a rewrite fix.
4.1.1 Content Patterns (P1-P8)
Content patterns P1-P8 (Humaniseur): claims that inflate meaning or hide a concrete fact.
| ID | Pattern | Signal | Fix |
|---|---|---|---|
| P1 | Significance inflation | "pivotal moment in the evolving landscape" | State the event plainly |
| P2 | Notability padding | Laundry lists of outlets/followers | One sourced claim |
| P3 | Superficial -ing chains | "highlighting… symbolizing… fostering…" | Drop fake depth |
| P4 | Promotional language | "nestled… breathtaking… vibrant" | Plain facts |
| P5 | Vague attributions | "experts believe…" | Name source or cut |
| P6 | Formulaic challenges | "Despite challenges… continues to thrive" | One real problem |
| P7 | AI vocabulary | delve, leverage, tapestry, landscape, etc. | Plain words |
| P8 | Copula avoidance | "serves as / stands as / boasts" | is / has |
P7 (AI vocabulary) drives most hits in practice. The banned lexicon in §5 extends it with red/yellow tiers.
4.1.2 Language and Style Patterns (P9-P18, P47, P49, P50)
Language and style patterns (Humaniseur P9-P18, P47, P49, P50): parallelism, punctuation, headings, register.
| ID | Pattern | Fix |
|---|---|---|
| P9 | Negative parallelisms ("It's not X, it's Y") | State the point once |
| P10 | Rule of three | Use 1, 2, or 4 items |
| P11 | Synonym cycling | Pick one term; repeat it |
| P12 | False ranges ("from X to Y") | List topics directly |
| P13 | Em/en dash ban | Period, comma, colon, parentheses |
| P14 | Boldface overuse | Remove mechanical bold |
| P15 | Structured-list syndrome | Convert to prose |
| P16 | Title Case headings | Sentence case |
| P17 | Curly quotes / fancy unicode | Straight quotes |
| P18 | Formal register overuse | Common verbs over Latinate stacks |
| P47 | Hyphenated-pair overuse | Keep attributive; drop decorative |
| P49 | Fragmented headers | Cut restated headings |
| P50 | Passive / subjectless | Name the actor |
4.1.3 Communication Patterns (P19-P21)
Communication patterns P19-P21 catch chatbot leftovers in finished prose.
| ID | Pattern | Fix |
|---|---|---|
| P19 | Chatbot artifacts | Cut "I hope this helps," "Let me know if…" |
| P20 | Cutoff disclaimers | Cut "as of my last update" |
| P21 | Sycophantic tone | Cut "Great question!", "You're absolutely right!" |
P19-P21 are among the highest-confidence signals in the density score. One chatbot crumb adds +8.
4.1.4 Filler and Hedging Patterns (P22-P25, P29-P30, P53)
Filler and hedging patterns strip throat-clearing and empty certainty:
| ID | Pattern | Fix |
|---|---|---|
| P22 | Filler phrases | "In order to" → To; "Due to the fact" → Because |
| P23 | Excessive hedging | "could potentially possibly" → may / cut |
| P24 | Generic conclusions | Replace with a specific next fact |
| P25 | Hallucination markers | Hedged fake certainty → omit |
| P29 | Comprehensive-overview opening | Start with content |
| P30 | Uniform sentence length | Inject burstiness |
| P53 | Hedged-enumeration openers | "Whether you're a… or a…" → talk to one reader |
4.1.5 Emerging and Craft Patterns (P26-P28, P31-P52)
Emerging and craft patterns cover tells that showed up after early detectors. Models hid the obvious better; the catalog followed.
| ID | Pattern | Description |
|---|---|---|
| P31 | Elegant variation | Same entity named 3+ ways ("the tool," "the solution," "the platform") |
| P32 | Collaborative leak | "As we discussed…" with no prior discussion |
| P33 | Placeholder / Mad Libs | [Insert company] left in output |
| P34 | Chatbot markup leak | Citation chips, tool tags in prose |
| P35 | UTM from AI tools | utm_source=chatgpt.com in URLs |
| P36 | Sudden register shift | Formal → casual mid-paragraph |
| P38 | Paragraph-reshuffle immunity | Paragraphs that work in any order (no causal glue) |
| P39 | "Whether…" closers | Vague closing that commits to nothing |
| P43 | Treadmill / low density | Restates the same point without new information |
| P44 | False agency | "Technology wants…" (name the actor instead) |
| P45 | Narrator-from-a-distance | Omniscient narrator voice in non-fiction |
| P46 | Diff-anchored writing | "This was added to replace…" instead of describing current behavior |
| P48 | Aphorism formulas | "X is the language of Y" |
| P51 | Reasoning-chain artifacts | "First… Second… Therefore…" scaffolding |
| P52 | Unicode obfuscation | Homoglyphs and zero-width characters |
4.1.6 Extra: Bare Noun-Phrase Bullets
Bare noun-phrase bullets get flagged too: five or more short adjective+noun items, no finite verb, same shape. Marketing paste. Convert to prose or checkable claims. Leave changelogs, params, and ingredient lists alone.
4.2 French Patterns (FR1-FR12)
French catalog FR1-FR12 adds language-specific tells on top of the English patterns that still apply:
| ID | Pattern | Example | Fix |
|---|---|---|---|
| FR1 | Connecteurs & méta-commentaires | "Il convient de noter que…" | Supprimer ou phrase directe |
| FR2 | Cadres cosmiques | "Dans un monde où…" "À l'ère de l'IA…" | Entrer dans le sujet |
| FR3 | Intensifieurs creux | "indéniablement," "résolument" | Supprimer |
| FR4 | Métaphores spatiales | "au cœur de," "pierre angulaire" | "dans," nommer le rôle réel |
| FR5 | Calques EN→FR | implémenter, actionnable, robuste | Français standard |
| FR6 | Parallélisme négatif FR | "Il ne s'agit pas seulement de X" | Affirmation claire |
| FR7 | Accroches infomercial | "Plongeons au cœur de…" | Commencer par le contenu |
| FR8 | Conclusions-formule | "En définitive," "Au final" | Fait concret ou couper |
| FR9 | Tiret cadratin | Em dash (U+2014) as anglophone tell | Point, virgule, deux-points |
| FR10 | Accents | De-accented ALL-CAPS headings | Casse normale accentuée |
| FR11 | Vocabulaire marketing FR | "révolutionnaire," "emblématique" | Faits et chiffres |
| FR12 | Listes nominales symétriques | Short adj+noun bullets without verbs | Prose ou affirmations vérifiables |
Still apply in French: P9-P11, P13-P16, P19-P24, P29-P30, P41, P43-P45. Flat rhythm, bold spam, chatbot crumbs, and filler are not language-bound.
4.3 Cross-Language Structural Tells
The Python CLI scores these structural tells for both English and French:
| Tell | Description | Threshold |
|---|---|---|
| Uniform sentence length | Sentence-length SD below 6 words | SD < 4 → +20 score; SD 4-6 → +10 |
| Em dash usage | Count of - and spaced -- | Each instance → +5 (capped at +15) |
| Uniform paragraphs | >2 of 5 consecutive paragraphs opening with "The [noun]" | Flagged, not scored |
| Parallelism abuse | -ing chains, rule-of-three stacking | Pattern-level detection |
| Signposting | "Let's dive in," "First… Second… Finally…" | Phrase-level detection |
5. Banned Lexicon System
In Humaniseur, the banned lexicon catches high-signal AI vocabulary. Two tiers: red (replace every time) and yellow (at most once per document).
5.1 Red-Flag Words (Replace Every Instance)
Red-flag words in Humaniseur: replace on sight when they are empty AI diction. Catalog (not prose):
Verbs: delve, underscore, harness, illuminate, facilitate, bolster, navigate (metaphorical), leverage (verb), foster, resonate, transcend, embark, embrace (corporate), elevate, enhance, enlighten, showcase, unleash, captivate, utilize, optimize, streamline, empower, catalyze, spearhead, exemplify, epitomize, encapsulate, galvanize, propel, uncover, unlock, reshape (abstract), deep-dive, revolutionize, reimagine
Adjectives: pivotal, crucial, nuanced, multifaceted, comprehensive, robust (non-technical), seamless, groundbreaking, transformative, innovative, compelling, dynamic, profound, meticulous, intricate, invaluable, cutting-edge, unprecedented, commendable, noteworthy, remarkable (empty), holistic, vibrant, poignant, timeless, nestled, breathtaking, renowned
Nouns / Metaphors: tapestry, landscape (abstract), realm, beacon, testament, journey (abstract), symphony (metaphor), mosaic (metaphor), nexus, paradigm shift, synergy, ecosystem (vague), world of X, ballpark (estimate slang)5.2 Yellow-Flag Words (Maximum 1 Per Document)
Yellow-flag words in Humaniseur: at most once per document, and only when precise:
significant, essential, fundamental, important (stacked), key (stacked), critical (non-technical stacking)5.3 Banned Phrases
Humaniseur also bans formulaic phrases. Catalog by job:
Openings: In today's rapidly evolving…; This comprehensive guide…; Let's dive in
Closings: The future looks bright; Only time will tell; Exciting times lie ahead
Inflation: stands as a testament; plays a crucial role; marks a pivotal moment
Hype: cutting-edge solution; seamless experience; game-changer; next-level
Hedging stacks: could potentially; it could be argued that
Weasel: experts say; industry leaders agree; studies show (unsourced)
Chatbot: I hope this helps; Great question!; As an AI language model
Faux-conversational: Here's the thing; Make no mistake; At the end of the day
Transition openers: Moreover, Furthermore, Additionally, Notably, Consequently5.4 Never-Introduce List
The never-introduce list in Humaniseur blocks fake-casual slang that rewriters often inject while "humanizing." Keep these only if the source already had them:
ballpark, circle back, low-hanging fruit, move the needle, dig in, unpack (metaphor), takeaway (stacked), bandwidth (for time), alignment (corporate), synergy, double-click on6. AI Density Scoring Algorithm
In Humaniseur, AI density runs 0-100. Lower means more human. That number drives detect reports, --iterate loops, and CLI validation.
6.1 Score Bands
Score bands:
| Band | Meaning |
|---|---|
| 0-20 | Reads human |
| 21-40 | Light AI residue |
| 41-60 | Clearly AI-shaped |
| 61-80 | Heavy template / chatbot |
| 81-100 | Pure AI smell |
6.2 Scoring Formula
score_report() in detect_ai_patterns.py computes density like this:
score = 0
# 1. Vocabulary and phrase hits (max 40 points)
score += min(40, hit_count × 4)
# 2. Em dash penalty (max 15 points)
score += min(15, em_dash_count × 5)
# 3. Rhythm uniformity (max 20 points)
if sentence_count >= 4:
if sentence_length_stdev < 4: score += 20
elif sentence_length_stdev < 6: score += 10
# 4. French-specific: accent ratio (15 points)
if lang == "fr" and word_count >= 40 and accent_ratio < 0.012:
score += 15
# 5. French construction hits (max 15 points)
score += min(15, fr_construction_hits × 5)
# 6. Chatbot crumbs (+8 each)
for crumb in ["i hope this helps", "n'hésitez pas", "great question", "as an ai"]:
if crumb in text_lower: score += 8
final_score = clamp(score, 0, 100)6.3 Weight Rationale
Why the weights look like this:
| Component | Max Weight | Rationale |
|---|---|---|
| Vocabulary/phrase hits | 40 | Strongest signal; maps straight to known AI tells |
| Rhythm uniformity | 20 | Flat sentence length is a reliable structural tell |
| Em dashes | 15 | Strong punctuation signal, worse in French |
| FR accent ratio | 15 | Missing accents often means MT or an anglophone model |
| FR constructions | 15 | Formulaic French frames are high confidence |
| Chatbot crumbs | 8 each (uncapped) | Presence alone is near-certain AI |
Raw sum can pass 100. clamp(0, 100) caps it. Stacking tells saturates on purpose: more categories mean higher confidence, not a polite linear sum.
7. Burstiness and Rhythm Analysis
In Humaniseur, sentence-length variation (burstiness) is a structural AI signal. Flat rhythm raises density and can fail CLI validation.
7.1 The Burstiness Hypothesis
Human prose jumps between short and long sentences. AI text parks near 15-20 words.
The CLI measures that with sentence-length standard deviation:
sentences = split_on_terminal_punctuation(text)
lengths = [word_count(s) for s in sentences]
mean = average(lengths)
stdev = sqrt(sum((x - mean)² for x in lengths) / n)7.2 Thresholds
Rhythm thresholds:
| Metric | Threshold | Effect |
|---|---|---|
| SD < 4.0 | Strong AI signal | +20 to score; validation failure |
| SD 4.0-6.0 | Moderate AI signal | +10 to score |
| SD > 6.0 | Human-like | No penalty |
validate_humanised.py requires SD ≥ 4.0 when the sample has 80+ words and 5+ sentences.
7.3 Recommended Fix
Rewrite tip: loose 1-1-3 rhythm. Two short, one long, then break the pattern. SD usually lands in the 7-12 range.
8. Voice and Context System
Humaniseur rewrites land in a chosen voice, purpose, and context. User writing samples beat every preset below.
8.1 Five Voice Presets
Five voice presets:
| Voice | Traits | Typical Use |
|---|---|---|
casual | Contractions, fragments, "And"/"But" openers, "I" | Blogs, social media |
professional | Few contractions, concrete numbers, dry tone | Reports, LinkedIn |
technical | Exact terms, short sentences, no hype | Docs, READMEs |
warm | "we/our," patient pacing, short paragraphs | Tutorials, onboarding |
blunt | Short. No hedging. Active voice. No throat-clearing | Reviews, feedback |
Paste two or three paragraphs of your own writing and those win. Samples beat presets.
8.2 Purpose Overlays
Purpose flags add genre rules on top of voice:
| Purpose | Extra Rules |
|---|---|
essay | Allow personality; keep argument chain clear |
email | Lead with the ask; one idea per paragraph |
marketing | Specific benefits over adjectives; kill empty product adjectives |
technical | Precise nouns; zero promotional language |
general | Default pattern cleanup only |
8.3 Context Overlays
Context flags tune channel-specific constraints:
| Context | Notes |
|---|---|
linkedin | No emoji stacks, no hashtag soup; real numbers beat empty milestone talk |
blog | Burstiness + concrete scenes; mixed feelings OK |
technical-blog | Technical purpose + light narrative |
investor-email | Claims need numbers already in source; blunt clarity |
docs | Neutral voice; no soul-injection; edit mode preferred |
casual | Max burstiness; fragments welcome |
8.4 Aggressive Mode
--aggressive shortens average sentence length, adds fragments, and allows more opinion where the source supports it. Still no fabrication.
9. Rewriting Pipeline
Humaniseur rewrite and edit modes run a fixed pipeline: load context, detect, rewrite with voice, self-audit, optionally validate with the CLI.
9.1 Full Workflow
End-to-end workflow:
1. Load humanizer-context.md (brand samples, banned phrases); silent skip if absent
2. Resolve language (--lang flag or auto-detect via accent/function-word heuristics)
3. Parse mode / voice / purpose / context / flags
4. Load reference catalogs for detected language
5. Detect patterns → score
6. Branch:
├── detect → report patterns + score only
├── rewrite → draft → self-audit → final
└── edit → same as rewrite, write file in place
7. (Optional) Run CLI validation scripts
8. Deliver output + change summary9.2 Draft → Audit → Final Loop
Core rewrite loop:
- Draft. Rewrite with voice + purpose + context. Fix every flagged pattern. Mix short and long sentences.
- Self-audit. The model asks: "What still makes this obviously AI?" Short bullets.
- Final. Fix those bullets. Rescan for em dashes and (in FR) accents.
- Iterate. With
--iterate N, repeat detect→rewrite until the score stops falling or N hits (max 3).
Self-audit is chain-of-thought self-correction: the model uses the same pattern catalog to critique its own draft before shipping.
9.3 Long Document Handling (>2000 Words)
Jobs over 2000 words: split by section. Rewrite each with the previous and next paragraph attached. Stitch. Re-check seams so register does not jump.
9.4 Concretizer
The concretizer turns vague claims concrete only when the source already has the facts. No invented metrics, names, dates, or citations. If detail is missing, keep it generic or ask.
9.5 Over-Edit Guard
If density ≤ 20 and the text already reads human: say so and stop, or fix only leftovers. Do not sand good prose for sport.
10. French-Specific Handling
In Humaniseur, French is a first-class track: auto language detect, accent-ratio checks, EN→FR calques, and genre adapters.
10.1 Language Auto-Detection
French auto-detect uses accents and function words:
# Strong FR signals:
# - Accented characters (é è ê ë à â î ï ô ù û ü ÿ ç œ æ)
# - French function words: le/la/les/des/une/est/que/pour/dans/avec
# Threshold: accent_count >= 2 OR (fr_function_words > en_function_words AND fr >= 3)10.2 Accent Ratio Validation
French from anglophone LLMs often has too few accents. Ratio under 1.2% on texts of 40+ words costs +15 on density.
The validator also flags de-accented ALL-CAPS headings (ELEGANCE instead of Élégance).
10.3 Calque Detection (EN→FR)
Common EN→FR calques map to standard French:
| Calque | Preferred French |
|---|---|
| implémenter | mettre en place / en œuvre |
| adresser (un problème) | régler / traiter |
| délivrer (une feature) | fournir / livrer |
| actionnable | concret / applicable |
| robuste (marketing) | solide / fiable |
| challenger (verbe) | remettre en question |
| monitorer | surveiller |
| sans friction | simple / fluide |
10.4 Content-Type Adapters (FR)
Purpose/context flags map to French genre adapters:
| Adapter | Maps From | Key Rules |
|---|---|---|
| Marketing | --purpose marketing | Concrete promise early; no incontournable/révolutionnaire |
| Short-comms | --context linkedin, short email | First line = useful info; no emoji stacks |
| Technical | --purpose technical, --context docs | Exact terms, zero lyricism, minimal edits |
| Editorial-SEO | --purpose essay, --context blog | Sentence-case titles, no "Dans un monde où" |
11. CLI Toolchain
Humaniseur ships three Python CLI scripts under scripts/. Stdlib only. Python 3.8+. Source: https://github.com/hellozheat/Humaniseur.
11.1 detect_ai_patterns.py
detect_ai_patterns.py scans for AI patterns, computes rhythm stats, and returns the density score.
Key functions:
detect_lang(text, forced): accent + function-word heuristicfind_hits(text, phrases, words): regex phrase and word matchingrhythm_stats(sentences): sentence-length mean and standard deviationscore_report(report): weighted AI density scoring (same formula as Humaniseur §6.2)mask_regions(text, ignore_code, ignore_quotes): strip fenced code and blockquotes before analysis
Usage:
python3 scripts/detect_ai_patterns.py input.txt --lang auto --format json
python3 scripts/detect_ai_patterns.py input.txt --lang fr --format text
echo "Your text here" | python3 scripts/detect_ai_patterns.py --format jsonOutput (JSON):
{
"lang": "en",
"word_count": 342,
"hits": [
{"type": "word", "value": "delve"},
{"type": "phrase", "value": "in today's"}
],
"hit_count": 2,
"em_dashes": 3,
"rhythm": {"count": 18, "mean": 19.0, "stdev": 3.2},
"accent_ratio": 0.0,
"fr_construction_hits": 0,
"ai_density_score": 43
}11.2 validate_humanised.py
validate_humanised.py fails text when density or rhythm thresholds break.
Failure conditions:
- AI density score >
--max-score(default: 40) - Em dash count > 0
- Sentence-length SD <
--min-stdev(default: 4.0) for texts ≥ 80 words and ≥ 5 sentences - French accent ratio < 1.2% for texts ≥ 40 words
Usage:
python3 scripts/validate_humanised.py output.txt --lang en --max-score 30Output: JSON with ok: true/false, a failures array, and the full report.
11.3 compare_texts.py
compare_texts.py reports before/after delta: score, hits, rhythm, word count.
Usage:
python3 scripts/compare_texts.py before.txt after.txt --lang autoOutput:
{
"lang": "en",
"score_before": 72,
"score_after": 18,
"score_delta": 54,
"hits_before": 11,
"hits_after": 1,
"stdev_before": 2.8,
"stdev_after": 8.4,
"words_before": 340,
"words_after": 312
}12. Validation and Quality Gates
Humaniseur hard rewrite rules apply on every pass, plus an optional automated CLI gate.
12.1 Hard Rules (Non-Negotiable)
Rewrite/edit modes always obey:
- No fabrication. Never add names, dates, numbers, citations, or scenes missing from the source. Never insert corporate slang the source did not use.
- Preserve meaning. Same claims. Do not drop substance for style.
- Over-edit guard. If it already reads human, say so and stop.
- Em/en dash ban. No em dash, en dash, or spaced
--in final copy unless a voice sample uses them. - French accents. Never strip accents. Reject all-caps de-accented headings.
- Language match. Output language equals input language.
12.2 Automated Quality Pipeline
Automated quality loop:
Input text
↓
detect_ai_patterns.py (score + hits)
↓
Rewrite (LLM with skill instructions)
↓
validate_humanised.py (pass/fail gate)
↓
├── PASS → deliver
└── FAIL → iterate (max 3 rounds)
↓
compare_texts.py (delta report)12.3 Human Signals to Preserve
Authentic human markers stay:
- Weird specifics ("the 2003 Honda Civic in the parking lot")
- Mixed feelings ("I loved the product but hated the onboarding")
- Self-corrections ("Actually, let me rephrase that")
- Dated references
- Genuine asides
From a detector's view they look like noise. From a reader's view they look like a person. Do not sand them off.
13. Limitations and Future Work
Humaniseur is pattern-based and hand-tuned. Limits and planned upgrades matter if you evaluate or cite it.
13.1 Current Limitations
Current limits:
- Pattern-based, not statistical. Handcrafted catalogs, not learned classifiers. Novel tells not yet listed will slip through.
- No model-specific detection. Patterns are pooled across GPT, Claude, Gemini, and Llama. Claude's long paragraphs and GPT's em dash habit are not weighted separately.
- Regex-based CLI. Simple matching. Legitimate uses of flagged words (e.g. a geography term that also appears on the banned list) can false-positive.
- No training data or ML. Scoring weights are hand-tuned, not fit on labeled corpora.
- Single-pass sentence splitting. Terminal punctuation only. Abbreviations, URLs, and decimals can confuse it.
13.2 Future Directions
Planned upgrades:
- Contextual word scoring. Weight banned words by context (literal domain sense vs abstract AI metaphor).
- Model fingerprinting. Separate profiles for GPT-4, Claude 3.5, Gemini, Llama 3 from empirical runs.
- Perplexity-based scoring. Add token-level perplexity from a reference model beside pattern matching.
- More languages. Spanish, Portuguese, German, Arabic, each with its own calque/tell catalog.
- CI integration. GitHub Action or pre-commit hook running
validate_humanised.pyon prose files. - Fine-tuned scoring weights. Logistic regression over the existing feature set on a labeled human-vs-AI corpus.
14. Appendices
Appendices A-D are quick-reference extracts (https://github.com/hellozheat/Humaniseur). Each is a standalone lookup chunk.
Appendix A: Complete Red-Flag Verb List
Full red-flag verb catalog (replace on sight as empty AI diction):
delve, underscore, harness, illuminate, facilitate, bolster, navigate (metaphorical), leverage, foster, resonate, transcend, embark, embrace (corporate), elevate, enhance, enlighten, explore ("Let's explore"), grapple, innovate, intertwine, reimagine, revolutionize, showcase, unleash, captivate, endeavour, utilize, optimize, streamline, empower, catalyze, spearhead, exemplify, epitomize, encapsulate, galvanize, propel, uncover, unlock, reshape (abstract), deep-divePreferred replacements: use, help, show, start, change, lead, look at, improve, support, find, push, open.
Appendix B: French Calque Quick Reference
Preferred replacements for common EN→FR calques:
| Calque | → French standard |
|---|---|
| implémenter | mettre en place / en œuvre |
| adresser (un problème) | régler / traiter |
| délivrer (une feature) | fournir / livrer |
| actionnable | concret / applicable |
| robuste (marketing) | solide / fiable |
| incontournable | expliquer pourquoi |
| challenger (verbe) | remettre en question |
| pivoter (figuré) | changer de direction |
| monitorer | surveiller |
| investiguer | enquêter / examiner |
| tirer parti de | utiliser / profiter de |
| sans friction / sans couture | simple / fluide |
Appendix C: Scoring Formula Quick Reference
AI density score (0-100, lower = more human), compressed:
hits × 4 (max 40)
+ em_dashes × 5 (max 15)
+ rhythm penalty (20 if SD<4, 10 if SD<6)
+ FR accent penalty (15 if ratio < 1.2%)
+ FR construction × 5 (max 15)
+ chatbot crumbs × 8 (uncapped)
= clamped to 0-100Appendix D: Pattern Count Summary
Pattern inventory (English + French):
| Category | EN | FR | Total |
|---|---|---|---|
| Content | 8 | - | 8 |
| Language/Style | 14 | - | 14 |
| Communication | 3 | - | 3 |
| Filler/Hedging | 7 | - | 7 |
| Emerging/Craft | 21 | - | 21 |
| Extra (bullets) | 1 | - | 1 |
| French-specific | - | 12 | 12 |
| Cross-applied EN→FR | - | ~15 | - |
| Total unique | 53 | 12 | 65 |
Humaniseur v4.0.0 as shipped at [https://github.com/hellozheat/Humaniseur](https://github.com/hellozheat/Humaniseur). Pattern catalogs, scoring weights, and voice definitions live with the source and can change without a new white paper revision.
