Humanize Chinese AI Text
Comprehensive CLI for detecting and transforming Chinese AI-generated text. Makes robotic AI writing natural and human-like with 6 specialized writing style transforms.
NEW in v1.1: Style transforms (知乎/小红书/公众号/口语化/学术/文艺), enhanced detection (16 patterns), emotional analysis
Quick Start
# Detect AI patterns (16 categories)
python scripts/detect_cn.py text.txt
# Humanize text
python scripts/humanize_cn.py text.txt -o clean.txt
# Scene-specific humanization
python scripts/humanize_cn.py text.txt --scene social # Social media
python scripts/humanize_cn.py text.txt --scene tech # Tech blog
python scripts/humanize_cn.py text.txt --scene formal # Formal article
# NEW: Apply writing styles
python scripts/humanize_cn.py text.txt --style zhihu -o zhihu.txt
python scripts/humanize_cn.py text.txt --style xiaohongshu -o xhs.txt
python scripts/style_cn.py text.txt --style casual -o casual.txt
# List all available styles
python scripts/style_cn.py --list
# Compare before/after
python scripts/compare_cn.py text.txt -o clean.txt
Detection Categories
The analyzer checks for 16 pattern categories specific to Chinese AI text (v1.1 added 4 new patterns):
Critical (Immediate AI Detection)
| Category |
Examples |
| Three-Part Structure |
首先...其次...最后, 一方面...另一方面 |
| Mechanical Connectors |
值得注意的是, 综上所述, 不难发现 |
| Empty Grand Words |
赋能, 闭环, 智慧时代, 数字化转型 |
High Signal
| Category |
Examples |
| AI High-Frequency Words |
助力, 彰显, 凸显, 焕发, 深度剖析 |
| Technical Jargon Misuse |
解构, 量子纠缠, 光谱 (in non-tech context) |
| Excessive Rhetoric |
对偶句 (>2x), 排比句 (>1x), 引用句 (>4x) |
Medium Signal
| Category |
Examples |
| Punctuation Overuse |
Dense em dashes, excessive semicolons |
| Obscure Metaphors |
Forced, disconnected comparisons |
| Uniform Paragraphs |
Equal-length paragraphs (no rhythm) |
Style Signal
| Category |
Examples |
| Low Burstiness |
Monotonous sentence structure |
| Low Perplexity |
Predictable word choices |
| Emotional Flatness |
NEW Lack of emotional words and expressions |
| Repetitive Structure |
NEW Sentence starters repeat >3 times |
| Slang Overuse |
NEW Internet slang in formal context |
| Vocabulary Homogeneity |
NEW Low diversity in word choice |
Writing Style Transforms (NEW in v1.1)
Transform text into 6 specialized Chinese writing styles:
| Style |
Name |
Description |
Best For |
casual |
口语化风格 |
Like chatting with friends — natural, relaxed |
Social media, messaging |
zhihu |
知乎风格 |
Rational, in-depth, with personal opinions |
Q&A platforms, thoughtful analysis |
xiaohongshu |
小红书风格 |
Enthusiastic, emoji-rich, product-focused |
Lifestyle sharing, reviews, recommendations |
wechat |
公众号风格 |
Storytelling, engaging, relatable |
WeChat articles, newsletters |
academic |
学术风格 |
Rigorous but not stiff, precise terminology |
Academic papers, research reports |
literary |
文艺风格 |
Poetic, imagery-rich, metaphorical |
Creative writing, essays |
Usage
# Apply style directly
python scripts/style_cn.py input.txt --style zhihu -o output.txt
# Combine humanization + style
python scripts/humanize_cn.py ai_text.txt --style xiaohongshu -o natural.txt
# List all styles
python scripts/style_cn.py --list
Style Features
Casual (口语化)
- Removes formal structure (首先/其次/最后)
- Adds colloquial connectors (说实话, 确实, 其实)
- Includes tone particles (吧, 呢, 啊)
- Light emoji usage
Zhihu (知乎)
- Personal opinion markers (从我的经验来看, 个人认为)
- Data/evidence support (实测发现, 根据XX调研)
- Example-driven (举个例子)
- Logical but conversational
Xiaohongshu (小红书)
- Enthusiastic openers (姐妹们!分享一下~)
- High emoji density (😊✨💯)
- Intensifiers (超级, 巨, 绝绝子, yyds)
- Hashtags (#好物分享)
- Short paragraphs
Wechat (公众号)
- Story-driven openings
- Questions for engagement (你有没有想过)
- Relatable scenarios
- Emotional connection
Academic (学术)
- Removes colloquialisms
- Precise terminology
- Formal connectors (研究表明, 数据显示)
- Reduces emotional expressions
Literary (文艺)
- Metaphors and imagery
- Poetic language
- Descriptive phrases (在XX的光影里)
- Artistic expressions
Scripts
detect_cn.py — Scan Chinese AI Patterns
python scripts/detect_cn.py essay.txt
python scripts/detect_cn.py essay.txt -j # JSON output
python scripts/detect_cn.py essay.txt -s # score only
echo "文本" | python scripts/detect_cn.py
Output:
- AI feature statistics (by category)
- AI probability score (low/medium/high/very high)
- Auto-fixable patterns marked
- Perplexity and burstiness indicators
humanize_cn.py — Transform to Human-Like
python scripts/humanize_cn.py essay.txt
python scripts/humanize_cn.py essay.txt -o output.txt
python scripts/humanize_cn.py essay.txt --scene social # Social media style
python scripts/humanize_cn.py essay.txt -a # Aggressive mode
Scene Parameters (--scene):
social: Social media (casual, conversational)
tech: Tech blog (professional but approachable)
formal: Formal article (rigorous but natural)
chat: Chat/dialogue (friendly, concise)
Auto-fixes:
- Remove three-part structure (首先/其次/最后)
- Replace mechanical connectors (值得注意的是 → 注意/要提醒的是)
- Simplify empty words (赋能 → 帮助/提升, 闭环 → 完整流程)
- Reduce punctuation density (em dash, semicolon)
- Control rhetoric frequency (对偶, 排比, 比喻)
Aggressive Mode (-a):
- Add colloquial expressions
- Inject emotional color
- Vary sentence rhythm
- Add personal perspective
compare_cn.py — Before/After Analysis
python scripts/compare_cn.py essay.txt
python scripts/compare_cn.py essay.txt --scene tech -o clean.txt
Shows AI feature comparison and score changes before/after transformation.
style_cn.py — Writing Style Transform (NEW)
python scripts/style_cn.py essay.txt --style zhihu -o essay_zhihu.txt
python scripts/style_cn.py blog.txt --style xiaohongshu -o blog_xhs.txt
python scripts/style_cn.py --list # Show all available styles
Supported styles: casual, zhihu, xiaohongshu, wechat, academic, literary
Transform text into specific Chinese writing styles with style-appropriate vocabulary, tone, and structure.
Workflow
Scan for detection risk:
python scripts/detect_cn.py document.txt
Transform with comparison:
python scripts/compare_cn.py document.txt --scene tech -o document_v2.txt
Verify improvement:
python scripts/detect_cn.py document_v2.txt -s
Manual review for content quality and scene appropriateness
AI Probability Scoring
| Rating |
Criteria |
| Very High |
Three-part structure, mechanical connectors, or empty grand words present |
| High |
>20 issues OR issue density >3% |
| Medium |
>10 issues OR issue density >1.5% |
| Low |
<10 issues AND density <1.5% |
Scene-Specific Guidelines
Social Media (社交媒体)
Style: Casual, conversational, like chatting with friends
- ✅ Short paragraphs (1-3 sentences)
- ✅ Colloquial expressions (说实话, 没想到, 真的绝了)
- ✅ Specific details (product names, locations, personal feelings)
- ✅ Emoji and hashtags
- ❌ Avoid: 值得注意的是, 总而言之
- ❌ Avoid: Long paragraphs, complex sentences
Tech Blog (技术博客)
Style: Professional but approachable, can be humorous
- ✅ Specific tech stack, tool names
- ✅ Code examples, performance data
- ✅ Real experiences ("踩过的坑", "实测效果")
- ✅ Clear structure with headings (not numbered lists)
- ❌ Avoid: 赋能, 闭环, 生态
- ❌ Avoid: 首先/其次/最后structure
Formal Article (正式文章)
Style: Objective, rigorous, but natural
- ✅ Clear logic with proper evidence
- ✅ Precise academic expressions
- ✅ Cited research sources
- ✅ Data and charts supporting arguments
- ❌ Avoid: Excessive rhetoric (对偶, 排比)
- ❌ Avoid: Empty grand words
Chat/Dialogue (对话场景)
Style: Friendly, patient, genuine
- ✅ Concise, targeted responses
- ✅ Empathy and understanding
- ✅ Direct solutions
- ✅ Moderate emoji use
- ❌ Avoid: 很高兴为您服务 (template phrases)
- ❌ Avoid: Lengthy explanations, repetitive questions
Customizing Patterns
Edit scripts/patterns_cn.json to add/modify:
ai_vocabulary_cn — Chinese AI high-frequency words
filler_phrases_cn — Clichés and replacements
empty_words_cn — Empty grand vocabulary
rhetoric_limits — Rhetoric frequency limits
scene_styles — Scene-specific style configs
Batch Processing
# Scan all files
for f in *.txt; do
echo "=== $f ==="
python scripts/detect_cn.py "$f" -s
done
# Transform all markdown (tech blog style)
for f in *.md; do
python scripts/humanize_cn.py "$f" --scene tech -o "${f%.md}_clean.md"
done
Reference
Based on comprehensive Chinese AI writing research:
- Tencent News: "Deconstructing 'AI Flavor': Why We Dislike AI Writing"
- 53AI: "Detection and Optimization of Article 'AI Flavor'"
- AIGCleaner and other Chinese de-AI tools
- Wikipedia: "Signs of AI Writing" (English reference)
Key insights:
- Perplexity: AI text has low perplexity (predictable word choices)
- Burstiness: AI text has low burstiness (uniform sentence structure)
- Emotion: AI text lacks strong opinions and personal color
1---2name: humanize-chinese3description: Detect and humanize AI-generated Chinese text with 6 style transforms (casual/zhihu/xiaohongshu/wechat/academic/literary). Removes "AI flavor" using 16 detection patterns. Pure Python, no dependencies. v1.1.04---56# Humanize Chinese AI Text78Comprehensive CLI for detecting and transforming Chinese AI-generated text. Makes robotic AI writing natural and human-like with 6 specialized writing style transforms.910**NEW in v1.1:** Style transforms (知乎/小红书/公众号/口语化/学术/文艺), enhanced detection (16 patterns), emotional analysis1112## Quick Start1314```bash15# Detect AI patterns (16 categories)16python scripts/detect_cn.py text.txt1718# Humanize text19python scripts/humanize_cn.py text.txt -o clean.txt2021# Scene-specific humanization22python scripts/humanize_cn.py text.txt --scene social # Social media23python scripts/humanize_cn.py text.txt --scene tech # Tech blog24python scripts/humanize_cn.py text.txt --scene formal # Formal article2526# NEW: Apply writing styles27python scripts/humanize_cn.py text.txt --style zhihu -o zhihu.txt28python scripts/humanize_cn.py text.txt --style xiaohongshu -o xhs.txt29python scripts/style_cn.py text.txt --style casual -o casual.txt3031# List all available styles32python scripts/style_cn.py --list3334# Compare before/after35python scripts/compare_cn.py text.txt -o clean.txt36```3738---3940## Detection Categories4142The analyzer checks for **16 pattern categories** specific to Chinese AI text (v1.1 added 4 new patterns):4344### Critical (Immediate AI Detection)45| Category | Examples |46|----------|----------|47| Three-Part Structure | 首先...其次...最后, 一方面...另一方面 |48| Mechanical Connectors | 值得注意的是, 综上所述, 不难发现 |49| Empty Grand Words | 赋能, 闭环, 智慧时代, 数字化转型 |5051### High Signal52| Category | Examples |53|----------|----------|54| AI High-Frequency Words | 助力, 彰显, 凸显, 焕发, 深度剖析 |55| Technical Jargon Misuse | 解构, 量子纠缠, 光谱 (in non-tech context) |56| Excessive Rhetoric | 对偶句 (>2x), 排比句 (>1x), 引用句 (>4x) |5758### Medium Signal59| Category | Examples |60|----------|----------|61| Punctuation Overuse | Dense em dashes, excessive semicolons |62| Obscure Metaphors | Forced, disconnected comparisons |63| Uniform Paragraphs | Equal-length paragraphs (no rhythm) |6465### Style Signal66| Category | Examples |67|----------|----------|68| Low Burstiness | Monotonous sentence structure |69| Low Perplexity | Predictable word choices |70| Emotional Flatness | **NEW** Lack of emotional words and expressions |71| Repetitive Structure | **NEW** Sentence starters repeat >3 times |72| Slang Overuse | **NEW** Internet slang in formal context |73| Vocabulary Homogeneity | **NEW** Low diversity in word choice |7475---7677## Writing Style Transforms (NEW in v1.1)7879Transform text into 6 specialized Chinese writing styles:8081| Style | Name | Description | Best For |82|-------|------|-------------|----------|83| `casual` | 口语化风格 | Like chatting with friends — natural, relaxed | Social media, messaging |84| `zhihu` | 知乎风格 | Rational, in-depth, with personal opinions | Q&A platforms, thoughtful analysis |85| `xiaohongshu` | 小红书风格 | Enthusiastic, emoji-rich, product-focused | Lifestyle sharing, reviews, recommendations |86| `wechat` | 公众号风格 | Storytelling, engaging, relatable | WeChat articles, newsletters |87| `academic` | 学术风格 | Rigorous but not stiff, precise terminology | Academic papers, research reports |88| `literary` | 文艺风格 | Poetic, imagery-rich, metaphorical | Creative writing, essays |8990### Usage9192```bash93# Apply style directly94python scripts/style_cn.py input.txt --style zhihu -o output.txt9596# Combine humanization + style97python scripts/humanize_cn.py ai_text.txt --style xiaohongshu -o natural.txt9899# List all styles100python scripts/style_cn.py --list101```102103### Style Features104105#### Casual (口语化)106- Removes formal structure (首先/其次/最后)107- Adds colloquial connectors (说实话, 确实, 其实)108- Includes tone particles (吧, 呢, 啊)109- Light emoji usage110111#### Zhihu (知乎)112- Personal opinion markers (从我的经验来看, 个人认为)113- Data/evidence support (实测发现, 根据XX调研)114- Example-driven (举个例子)115- Logical but conversational116117#### Xiaohongshu (小红书)118- Enthusiastic openers (姐妹们!分享一下~)119- High emoji density (😊✨💯)120- Intensifiers (超级, 巨, 绝绝子, yyds)121- Hashtags (#好物分享)122- Short paragraphs123124#### Wechat (公众号)125- Story-driven openings126- Questions for engagement (你有没有想过)127- Relatable scenarios128- Emotional connection129130#### Academic (学术)131- Removes colloquialisms132- Precise terminology133- Formal connectors (研究表明, 数据显示)134- Reduces emotional expressions135136#### Literary (文艺)137- Metaphors and imagery138- Poetic language139- Descriptive phrases (在XX的光影里)140- Artistic expressions141142---143144## Scripts145146### detect_cn.py — Scan Chinese AI Patterns147148```bash149python scripts/detect_cn.py essay.txt150python scripts/detect_cn.py essay.txt -j # JSON output151python scripts/detect_cn.py essay.txt -s # score only152echo "文本" | python scripts/detect_cn.py153```154155**Output:**156- AI feature statistics (by category)157- AI probability score (low/medium/high/very high)158- Auto-fixable patterns marked159- Perplexity and burstiness indicators160161### humanize_cn.py — Transform to Human-Like162163```bash164python scripts/humanize_cn.py essay.txt165python scripts/humanize_cn.py essay.txt -o output.txt166python scripts/humanize_cn.py essay.txt --scene social # Social media style167python scripts/humanize_cn.py essay.txt -a # Aggressive mode168```169170**Scene Parameters (--scene):**171- `social`: Social media (casual, conversational)172- `tech`: Tech blog (professional but approachable)173- `formal`: Formal article (rigorous but natural)174- `chat`: Chat/dialogue (friendly, concise)175176**Auto-fixes:**177- Remove three-part structure (首先/其次/最后)178- Replace mechanical connectors (值得注意的是 → 注意/要提醒的是)179- Simplify empty words (赋能 → 帮助/提升, 闭环 → 完整流程)180- Reduce punctuation density (em dash, semicolon)181- Control rhetoric frequency (对偶, 排比, 比喻)182183**Aggressive Mode (-a):**184- Add colloquial expressions185- Inject emotional color186- Vary sentence rhythm187- Add personal perspective188189### compare_cn.py — Before/After Analysis190191```bash192python scripts/compare_cn.py essay.txt193python scripts/compare_cn.py essay.txt --scene tech -o clean.txt194```195196Shows AI feature comparison and score changes before/after transformation.197198### style_cn.py — Writing Style Transform (NEW)199200```bash201python scripts/style_cn.py essay.txt --style zhihu -o essay_zhihu.txt202python scripts/style_cn.py blog.txt --style xiaohongshu -o blog_xhs.txt203python scripts/style_cn.py --list # Show all available styles204```205206**Supported styles:** casual, zhihu, xiaohongshu, wechat, academic, literary207208Transform text into specific Chinese writing styles with style-appropriate vocabulary, tone, and structure.209210---211212## Workflow2132141. **Scan** for detection risk:215 ```bash216 python scripts/detect_cn.py document.txt217 ```2182192. **Transform** with comparison:220 ```bash221 python scripts/compare_cn.py document.txt --scene tech -o document_v2.txt222 ```2232243. **Verify** improvement:225 ```bash226 python scripts/detect_cn.py document_v2.txt -s227 ```2282294. **Manual review** for content quality and scene appropriateness230231---232233## AI Probability Scoring234235| Rating | Criteria |236|--------|----------|237| Very High | Three-part structure, mechanical connectors, or empty grand words present |238| High | >20 issues OR issue density >3% |239| Medium | >10 issues OR issue density >1.5% |240| Low | <10 issues AND density <1.5% |241242---243244## Scene-Specific Guidelines245246### Social Media (社交媒体)247**Style:** Casual, conversational, like chatting with friends248- ✅ Short paragraphs (1-3 sentences)249- ✅ Colloquial expressions (说实话, 没想到, 真的绝了)250- ✅ Specific details (product names, locations, personal feelings)251- ✅ Emoji and hashtags252- ❌ Avoid: 值得注意的是, 总而言之253- ❌ Avoid: Long paragraphs, complex sentences254255### Tech Blog (技术博客)256**Style:** Professional but approachable, can be humorous257- ✅ Specific tech stack, tool names258- ✅ Code examples, performance data259- ✅ Real experiences ("踩过的坑", "实测效果")260- ✅ Clear structure with headings (not numbered lists)261- ❌ Avoid: 赋能, 闭环, 生态262- ❌ Avoid: 首先/其次/最后structure263264### Formal Article (正式文章)265**Style:** Objective, rigorous, but natural266- ✅ Clear logic with proper evidence267- ✅ Precise academic expressions268- ✅ Cited research sources269- ✅ Data and charts supporting arguments270- ❌ Avoid: Excessive rhetoric (对偶, 排比)271- ❌ Avoid: Empty grand words272273### Chat/Dialogue (对话场景)274**Style:** Friendly, patient, genuine275- ✅ Concise, targeted responses276- ✅ Empathy and understanding277- ✅ Direct solutions278- ✅ Moderate emoji use279- ❌ Avoid: 很高兴为您服务 (template phrases)280- ❌ Avoid: Lengthy explanations, repetitive questions281282---283284## Customizing Patterns285286Edit `scripts/patterns_cn.json` to add/modify:287- `ai_vocabulary_cn` — Chinese AI high-frequency words288- `filler_phrases_cn` — Clichés and replacements289- `empty_words_cn` — Empty grand vocabulary290- `rhetoric_limits` — Rhetoric frequency limits291- `scene_styles` — Scene-specific style configs292293---294295## Batch Processing296297```bash298# Scan all files299for f in *.txt; do300 echo "=== $f ==="301 python scripts/detect_cn.py "$f" -s302done303304# Transform all markdown (tech blog style)305for f in *.md; do306 python scripts/humanize_cn.py "$f" --scene tech -o "${f%.md}_clean.md"307done308```309310---311312## Reference313314Based on comprehensive Chinese AI writing research:315- Tencent News: "Deconstructing 'AI Flavor': Why We Dislike AI Writing"316- 53AI: "Detection and Optimization of Article 'AI Flavor'"317- AIGCleaner and other Chinese de-AI tools318- Wikipedia: "Signs of AI Writing" (English reference)319320Key insights:321- **Perplexity**: AI text has low perplexity (predictable word choices)322- **Burstiness**: AI text has low burstiness (uniform sentence structure)323- **Emotion**: AI text lacks strong opinions and personal color