SuperAPI AI Directory

humanize-chinese

General & other

View repository

Updated 10-15 17:30

About this skill

Humanize Chinese AI Text v5.0

A complete toolchain for detecting and rewriting Chinese AI-generated text. It can run independently (unified CLI or standalone scripts), and can also be used as an LLM prompt guide.

v5.0 highlights: scene-aware three-way LR fusion (general / academic / longform); HC3 fused accuracy 95%; added --scene novel/auto long-text scenario; added --style novel long-form narrative;--best-of-n N (default 10) multiple humanize runs take the lowest LR; paragraph-level signals (paragraph length CV / cross-paragraph trigram repetition) + counter-rewriting.

CLI Tools

Unified CLI (recommended)

./humanize detect 文本.txt -v                              # 检测 + 详细
./humanize detect 章节.txt --scene novel                   # 长文本/小说显式 scene
./humanize detect 稿件.txt --scene auto                    # 按长度自动切 (≥1500 走 longform LR)
./humanize rewrite 文本.txt -o 改后.txt                    # 改写(默认 best-of-10)
./humanize rewrite 文本.txt -o 改后.txt --best-of-n 5      # 自调 best-of-N
./humanize rewrite 文本.txt -o 改后.txt --quick            # 快速模式(跳统计/best-of)
./humanize academic 论文.txt -o 改后.txt --compare          # 学术降重 + 双评分对比
./humanize style 章节.txt --style novel                    # 长篇叙事专属 (剔除 AI prompt artifact + markdown headers)
./humanize style 文本.txt --style xiaohongshu              # 风格转换
./humanize compare 文本.txt -a                              # 前后对比

Standalone script form (equivalent)

All scripts are under the scripts/ directory, pure Python, no dependencies.

# 检测 AI 模式(20+ 规则维度 + 8 统计特征,0-100 分)
python scripts/detect_cn.py text.txt
python scripts/detect_cn.py text.txt -v          # 详细 + 最可疑句子
python scripts/detect_cn.py text.txt -s           # 仅评分
python scripts/detect_cn.py text.txt -j           # JSON 输出

# 改写(默认 best-of-10,scene-aware)
python scripts/humanize_cn.py text.txt -o clean.txt
python scripts/humanize_cn.py text.txt --scene social -a   # 社交 + 激进
python scripts/humanize_cn.py text.txt --quick             # 18× 速度,纯替换
python scripts/humanize_cn.py text.txt --cilin             # 启用 CiLin 同义词扩展

# 风格转换(先自动 humanize 再套风格)
python scripts/style_cn.py text.txt --style zhihu -o out.txt

# 前后对比
python scripts/compare_cn.py text.txt --scene tech -a

# 学术论文 AIGC 降重(10 学术维度 + scene-aware academic LR + 双评分)
python scripts/academic_cn.py paper.txt -o clean.txt --compare
python scripts/academic_cn.py paper.txt -o clean.txt -a --compare  # 激进
python scripts/academic_cn.py paper.txt -o clean.txt --quick       # 快速模式

Scoring criteria

Score Level Meaning
0-24 LOW Basically looks human-written
25-49 MEDIUM Some AI traces
50-74 HIGH Most 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 Fixed random seed
--scene general / academic / novel / auto (detect_cn) —— auto switches to longform LR at >= 1500 characters
--style casual / zhihu / xiaohongshu / wechat / academic / literary / weibo / novel
--best-of-n N humanize N times and take the lowest LR (default 10)
--compare Before/after comparison (academic dual scoring)
--quick Fast mode (skips statistical optimization + best-of, 18x speed)
--cilin Enable CiLin synonym expansion (humanize, 38873 words, including collision blacklist)
--no-humanize Do not remove AI words before style conversion
--rule-only detect uses only the rule layer (skips LR fusion)

Workflow

# 1. 检测
./humanize detect document.txt -v
# 2. 改写 + 对比
./humanize compare document.txt -a -o clean.txt
# 3. 验证
./humanize detect clean.txt -s
# 4. 可选:转风格
./humanize style clean.txt --style zhihu -o final.txt

HC3-Chinese benchmark

Thresholds are based on HC3-Chinese Cohen's d calibration on 300+300 human/AI samples, scene-aware LR trained on 500+500:

  • Sentence length coefficient of variation CV: d = 1.22 (strongest single signal)
  • Short-sentence ratio (< 10 characters): d = 1.21
  • Paragraph length CV: d = -1.49 (new v5 long-text signal)
  • Within-paragraph sentence length CV: d = -2.08 (strongest v5 long-text signal)
  • Cross-paragraph trigram repetition: d = +1.13 (new v5 long-text signal)
  • Perplexity: d = 0.47
  • GLTR top-10 bucket: d = 0.44
  • DivEye skew / kurt: d = 0.41 / 0.29
  • Comma density: d = -0.47

v5.0 100-sample regression test (HC3 fused): 95% correct separation rate / 55.0 point gap / +40.5 average reduction / 100% paragraph retention / 0 grammar defects.

Long-text 170-sample regression (longform benchmark): gap 51.4 / avg delta +25.1 / paragraph retention 98.8%. By genre: academic +13.8 / news +18.8 / blog +36.3 / novel +19.5 / review +31.8.

Hero samples(best-of-10, seed=42): academic 100→35 (-65) / general 100→35 (-65) / Xiaohongshu 100→41 (-59) / long-form blog 96→41 (-55) / work report 96→13 (-83).


Direct LLM usage guide

When the user asks to "remove the AI flavor", "lower AIGC", "humanize the text", or "make it sound human", if the CLI tool cannot be run, handle it manually according to the following process.

Step 1: Detect AI writing patterns

Scan the text for the following patterns and classify them by severity:

🔴 High-risk patterns (obvious at a glance as AI)

Three-part formulaic patterns:

  • First… second… finally
  • On one hand… on the other hand
  • First… second… third

Mechanical connectives: It is worth noting that, in summary, it is not hard to find that, in conclusion, at the same time, it can be seen that, not only that, in other words, more importantly, it cannot be denied that, obviously, it goes without saying that, ultimately

Empty grandiose words: empower, closed loop, digital transformation, collaborative synergy, cost reduction and efficiency improvement, deep integration, all-round, multi-dimensional, systematic, high-quality development, new quality productive forces

🟠 Medium-risk patterns

High-frequency AI words: assist, highlight, underscore, underlying logic, lever, reach, precipitate, review, iterate, break out of the circle, disrupt

Filler nonsense: it is worth mentioning that, as everyone knows, without a doubt, specifically speaking, in short

Template sentence patterns:

  • With the continuous development of…
  • In today's… era
  • In the context of…
  • As an important component of…
  • This is not only… but even more…

Balanced-discussion clichés: Although… but… at the same time, there is both… and… and even more

🟡 Low-risk patterns

  • Too many hedging phrases (to a certain extent, to some degree appearing >5 times)
  • List addiction (constantly ①②③④⑤)
  • Punctuation abuse (large numbers of semicolons and dashes)
  • Piled-up rhetoric (too much parallelism and antithesis)

⚪ Style signals

  • Paragraph lengths highly uniform
  • Sentence lengths monotonous
  • Flat emotional expression
  • Repeated opening methods
  • Low information entropy (predictable word choices)

Step 2: Rewriting strategy

Handle in the following order:

1. Cut the three-part structure Break up "first… second… finally" and replace it with natural transitions. Not every point needs to be numbered.

2. Replace AI clichés

  • In summary → in short / in the end / (just delete it)
  • It is worth noting that → (just delete it; the following words can speak for themselves)
  • empower → help / support / improve
  • digital transformation → informatization reform / technological upgrading
  • it is not hard to find that → it can be seen that / (delete it)
  • assist → help / drive

3. Sentence restructuring

  • Merge overly short sentences ("He was very tired. He decided to rest." → "He was tired, so he just took a break.")
  • Split overly long sentences (break at transitions such as "but," "however," and "at the same time")
  • Break the even rhythm (alternate long and short sentences; don't make every sentence about the same length)

4. Reduce repeated wording If the same word appears more than 3 times, switch to a synonym. For example, "conduct" can be changed to "do," "handle," "carry out," or "start."

5. Inject human flavor

  • Add one or two colloquial expressions (if the context allows)
  • Use concrete examples instead of abstract generalizations
  • Occasionally add a rhetorical question or exclamation
  • Don't use a general-specific-general structure in every paragraph

6. Paragraph rhythm Break the pattern where every paragraph is about the same length. Some paragraphs have 2 sentences, some have 5, like the natural variation in length when a person writes.

Step 3: Special Handling for Academic Papers

When the text is an academic paper, the rewriting rules are different—do not make it colloquial; maintain academic rigor:

Academic-specific detection dimensions:

  1. AI academic phrasing ("this paper aims to," "is of great significance," "conducted an in-depth analysis")
  2. Excessive passive voice ("is widely used," "is considered")
  3. Paragraph structure too neat (every paragraph is general-specific-general)
  4. Abnormal connector density
  5. Lack of synonymous expression ("research" appears 8 times)
  6. Low citation integration (every citation is "XX (2020) pointed out...")
  7. Templated data discussion ("as can be seen from the table")
  8. Excessive enumeration (①②③④ appear frequently)
  9. Conclusion too perfect (only mention the good, not the limitations)
  10. Tone too certain ("inevitably," "without a doubt")

Academic rewriting strategies:

  • Replace AI academic clichés (maintain academic tone):

    • This paper aims to → This paper attempts to / This study focuses on
    • is of great significance → is worth attention / has some reference value
    • Research shows → Prior research has found / Existing literature shows / The author observed
    • conducted an in-depth analysis → made a preliminary exploration / carried out a discussion
    • achieved significant results → produced certain effects / achieved initial results
  • Reduce passive sentences:

    • is widely used → is used relatively often / has applications in multiple fields
    • is considered → is usually regarded as / is generally considered
  • Inject academic hedging: Before overly absolute judgments, add "possibly," "to a certain extent," "for now," "from a preliminary view"

  • Strengthen the author's subjectivity:

    • Research shows → The author believes / This study finds
    • It can be considered → The author tends to believe
  • Add limitations: If the conclusion section does not mention limitations, add a sentence: "Of course, this study also has certain limitations..."

  • Break structural uniformity: Adjust paragraph lengths to avoid every paragraph being the same. Merge paragraphs that are too short and split those that are too long.

Step 4: Verification

After rewriting is complete, use the CLI tool to verify the results:

./humanize detect output.txt -s

Targets (based on the v5.0 fused detector, best-of-10 humanize):

  • General text reduced below 35 points (LOW range)
  • Academic papers reduced below 35 points (both academic-specific and general scores are low)
  • Long-form blogs/novels (≥1500 characters) reduced to around 41 points (MEDIUM)
  • Real ChatGPT short-output baselines are usually already at 5-25 points, and after rewriting drop another 3-10 points
  • Stereotyped AI template text (paper templates/eight-legged essays) can show a 60-83 point reduction

Note: The v5.0 fused score integrates the LR ensemble (rule × 0.2 + LR × 0.8). Scores for the same text will be more accurate than v3.x rule-only.--rule-only Can be downgraded to a pure rule view.


Configuration Instructions

All detection modes and replacement rules are in scripts/patterns_cn.json, customizable:

  • Add new AI vocabulary
  • Adjust weights
  • Add replacement rules
  • Modify regex matching

External configuration fields

critical_patterns    — 高权重检测(三段式、连接词、空洞词)
high_signal_patterns — 中权重检测(AI 高频词、模板句)
replacements         — 替换词库(正则 + 纯文本)
academic_patterns    — 学术专用检测与替换
scoring              — 权重和阈值配置