Humanize Chinese AI Text v3.0
A complete toolchain for detecting and rewriting Chinese AI-generated text. Can run standalone (unified CLI or independent scripts), or serve as an LLM prompt guide.
v3.0 Highlights: HC3 accuracy 51→73% (+22 pts); sentence-length CV Cohen's d = 1.22 strongest statistical feature; 40 paraphrase templates + 122 academic replacements; unified CLI + --quick 18× speed boost.
CLI Tools
Unified CLI (Recommended)
./humanize detect text.txt -v # Detection + verbose
./humanize rewrite text.txt -o rewritten.txt --quick # Quick rewrite (18× speed)
./humanize academic paper.txt -o rewritten.txt --compare # Academic reduction + dual-score comparison
./humanize style text.txt --style xiaohongshu # Style conversion
./humanize compare text.txt -a # Before/after comparison
Standalone Scripts (Equivalent)
All scripts reside in the scripts/ directory, pure Python, no dependencies.
# Detect AI patterns (20+ rule dimensions + 8 statistical features, 0-100 score)
python scripts/detect_cn.py text.txt
python scripts/detect_cn.py text.txt -v # Verbose + most suspicious sentences
python scripts/detect_cn.py text.txt -s # Score only
python scripts/detect_cn.py text.txt -j # JSON output
# Rewrite (three-tier adaptive: conservative/moderate/full)
python scripts/humanize_cn.py text.txt -o clean.txt
python scripts/humanize_cn.py text.txt --scene social -a # Social + aggressive
python scripts/humanize_cn.py text.txt --quick # 18× speed, pure replacement
python scripts/humanize_cn.py text.txt --cilin # Enable CiLin synonym expansion
# Style conversion (first auto-humanize, then apply style)
python scripts/style_cn.py text.txt --style zhihu -o out.txt
# Before/after comparison
python scripts/compare_cn.py text.txt --scene tech -a
# Academic paper AIGC reduction (11 dimensions + diffusion + dual-score)
python scripts/academic_cn.py paper.txt -o clean.txt --compare
python scripts/academic_cn.py paper.txt -o clean.txt -a --compare # Aggressive
python scripts/academic_cn.py paper.txt -o clean.txt --quick # Quick mode
Score Scale
| Score | Level | Meaning |
|---|---|---|
| 0-24 | LOW | Reads human-like |
| 25-49 | MEDIUM | Some AI traces |
| 50-74 | HIGH | Likely AI-generated |
| 75-100 | VERY HIGH | Almost certainly AI |
Parameter Quick Reference
| Parameter | Description |
|---|---|
-v | Verbose mode, shows suspicious sentences |
-s | Score only |
-j | JSON output |
-o | Output file |
-a | Aggressive mode |
--seed N | Fix random seed |
--scene | general / social / tech / formal / chat |
--style | casual / zhihu / xiaohongshu / wechat / academic / literary / weibo |
--compare | Before/after comparison (academic dual-score) |
--quick | Quick mode (skip statistical optimization, 18× speed) |
--cilin | Enable CiLin synonym expansion (humanize, 38873 words) |
--no-humanize | Do not remove AI words before style conversion |
Workflow
# 1. Detect
./humanize detect document.txt -v
# 2. Rewrite + compare
./humanize compare document.txt -a -o clean.txt
# 3. Verify
./humanize detect clean.txt -s
# 4. Optional: convert style
./humanize style clean.txt --style zhihu -o final.txt
HC3-Chinese Benchmark
v3.0 all thresholds calibrated on HC3-Chinese 300+300 human/AI samples using Cohen's d:
- Sentence length CV: d = 1.22 (strongest single signal)
- Short sentence ratio (<10 characters): d = 1.21
- Perplexity: d = 0.47
- GLTR top-10 bucket: d = 0.44
- DivEye skew / kurt: d = 0.41 / 0.29
- Comma density: d = -0.47
100-sample regression test: 73% correct separation rate / 9.9-point gap / +4.2 average reduction.
LLM Direct Use Guide
When a user asks to "remove AI flavor," "reduce AIGC," "humanize text," or "make it sound more natural," and the CLI tools are unavailable, follow the manual process below.
Step 1: Detect AI Writing Patterns
Scan the text for the following patterns, classified by severity:
🔴 High-Risk Patterns (Immediately Identifiable as AI)
Three-Piece Template:
- First…second…finally
- On the one hand…on the other hand
- Firstly…secondly…thirdly
Mechanical Connectors: it is worth noting, in summary, it is not hard to find, all in all, at the same time, thus, not only that, in other words, more importantly, undeniable, obvious, self-evident, at the end of the day
Empty Grandiose Words: empower, closed-loop, digital transformation, synergistic, cost reduction and efficiency improvement, deep integration, comprehensive, multi-dimensional, systematic, high-quality development, new quality productive forces
🟠 Medium-Risk Patterns
AI High-Frequency Words: assist, highlight, underscore, core logic, lever, reach, precipitate, review, iterate, break the circle, disrupt
Filler Clichés: it is worth mentioning, as everyone knows, without a doubt, specifically, in short
Template Sentences:
- With the continuous development of…
- In today's era of…
- Against the backdrop of…
- As an important component of…
- This is not only…but also…
Balanced Argument Platitudes: although…but…at the same time, both…and…and more
🟡 Low-Risk Patterns
- Excessive hedging ("to some extent," "to a certain degree" appearing >5 times)
- List addiction (overuse of ①②③④⑤)
- Punctuation abuse (frequent semicolons, dashes)
- Rhetoric pile-up (excessive parallelism)
⚪ Stylistic Signals
- Highly uniform paragraph lengths
- Monotonous sentence lengths
- Flat emotional expression
- Repetitive opening styles
- Low information entropy (predictable word choices)
Step 2: Rewriting Strategy
Process in the following order:
1. Remove Three-Piece Templates Break apart "First…Second…Finally" – use natural transitions. Not every point needs a number.
2. Replace AI Clichés
- In summary → In short / Ultimately / (delete entirely)
- It is worth noting → (delete entirely; the statement can stand alone)
- Empower → Help / Support / Enhance
- Digital transformation → IT modernization / Tech upgrade
- It is not hard to find → One can see / (delete)
- Assist → Help / Drive / Push
3. Restructure Sentences
- Merge overly short sentences ("He was tired. He decided to rest." → "He was tired, so he took a break.")
- Split overly long sentences (break at "but," "however," "meanwhile")
- Break uniform rhythm (alternate long and short sentences)
4. Reduce Repetitive Vocabulary If a word appears more than 3 times, replace with synonyms. For example, "carry out" can become "do," "undertake," "perform," "conduct."
5. Inject Human Flavor
- Add one or two colloquial expressions (if the context allows)
- Replace abstract generalizations with concrete examples
- Occasionally add a rhetorical question or exclamation
- Avoid summary-to-detail structure in every paragraph
6. Paragraph Rhythm Break the uniformity of paragraph lengths. Some paragraphs should have 2 sentences, others 5 – mimicking natural human variation.
Step 3: Academic Paper Special Handling
When the text is an academic paper, different rewriting rules apply – do not colloquialize; maintain academic rigor:
Academic-Specific Detection Dimensions:
- AI academic phrasing ("this paper aims to," "has great significance," "conducted an in-depth analysis")
- Excessive passive constructions ("is widely used," "is regarded as")
- Overly uniform paragraph structure (each paragraph: topic–support–conclusion)
- Abnormal connector word density
- Poor synonym diversity ("study" appears 8 times)
- Low citation integration (each citation is "XX (2020) points out…")
- Template-based data commentary ("As can be seen from the table")
- Excessive listing (①②③④ frequent)
- Overly perfect conclusions (only strengths, no limitations)
- Overly certain tone ("inevitably," "without a doubt")
Academic Rewriting Strategy:
-
Replace AI Academic Platitudes (preserving academic tone):
- This paper aims to → This paper attempts to / This study focuses on
- Has great significance → Is noteworthy / Has some reference value
- Research shows → Previous studies have found / Existing literature indicates / The author observes
- Conducted an in-depth analysis → Performed a preliminary exploration / Carried out a discussion
- Achieved remarkable results → Has produced certain effects / Initial results are seen
-
Reduce Passive Voice:
- Is widely used → Has found broad application / Is applied in multiple fields
- Is regarded as → Is often viewed as / Is generally considered
-
Inject Academic Hedging: Add "may," "to some extent," "as far as the current data shows," "preliminarily speaking" before overly absolute judgments.
-
Enhance Author Agency:
- Research shows → The author believes / This study finds
- It can be argued that → The author tends to argue that
-
Add Limitations: If the conclusion does not mention limitations, add a sentence: "Of course, this study also has certain limitations…"
-
Break Structural Uniformity: Adjust paragraph lengths to avoid uniformity. Merge overly short paragraphs, split overly long ones.
Step 4: Verification
After rewriting, verify with the CLI tool:
./humanize detect output.txt -s
Targets (based on v3.0 enhanced detector):
- General text: drop below 50 (MEDIUM range)
- Academic papers: drop below 40 (academic-specific), general score below 35
- Real ChatGPT output baseline is usually already in 5-25 range; a 3-10 point drop after rewriting is considered successful
- Rigid AI template papers (essay templates / "eight-legged essays") can see 50+ point drop
Note: v3.0 detect_cn added three strong indicators: sentence-length CV, short-sentence ratio, and comma density. For the same text, scores will be slightly higher (more accurate) than v2.x – this is normal.
Configuration
All detection patterns and replacement rules reside in scripts/patterns_cn.json. You can customize:
- Add new AI vocabulary
- Adjust weights
- Add replacement rules
- Modify regex patterns
External Configuration Fields
critical_patterns — High-weight detection (three-piece templates, connectors, empty words)
high_signal_patterns — Medium-weight detection (AI high-frequency words, template sentences)
replacements — Replacement dictionary (regex + plain text)
academic_patterns — Academic-specific detection and replacement
scoring — Weight and threshold configuration