{"id":47170257,"url":"https://github.com/voidborne-d/humanize-chinese","last_synced_at":"2026-04-27T07:03:30.247Z","repository":{"id":344095387,"uuid":"1164510579","full_name":"voidborne-d/humanize-chinese","owner":"voidborne-d","description":"免费本地 AI 文本去痕迹工具 | Chinese AI text detection \u0026 humanization. N-gram perplexity analysis, 20+ detection patterns, academic AIGC reduction (知网/维普/万方), 7 style transforms. Zero dependencies, runs locally.","archived":false,"fork":false,"pushed_at":"2026-03-26T16:20:59.000Z","size":197,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T04:52:02.838Z","etag":null,"topics":["academic","agent-skill","ai-detection","aigc","chinese","claude-code-skill","humanizer","nlp","perplexity","text-analysis"],"latest_commit_sha":null,"homepage":"https://clawhub.ai/skills/humanize-chinese","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voidborne-d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-23T06:56:28.000Z","updated_at":"2026-03-26T16:23:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/voidborne-d/humanize-chinese","commit_stats":null,"previous_names":["voidborne-d/humanize-chinese"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/voidborne-d/humanize-chinese","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidborne-d%2Fhumanize-chinese","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidborne-d%2Fhumanize-chinese/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidborne-d%2Fhumanize-chinese/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidborne-d%2Fhumanize-chinese/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voidborne-d","download_url":"https://codeload.github.com/voidborne-d/humanize-chinese/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidborne-d%2Fhumanize-chinese/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31997804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["academic","agent-skill","ai-detection","aigc","chinese","claude-code-skill","humanizer","nlp","perplexity","text-analysis"],"created_at":"2026-03-13T05:00:19.493Z","updated_at":"2026-04-19T07:02:06.360Z","avatar_url":"https://github.com/voidborne-d.png","language":"Python","readme":"# 🔧 中文 AI 文本去痕迹工具\n\n**免费、本地运行、零依赖、零 LLM。检测 + 改写一步到位。**\n\n[![GitHub stars](https://img.shields.io/github/stars/voidborne-d/humanize-chinese?style=flat-square)](https://github.com/voidborne-d/humanize-chinese)\n[![ClawHub](https://img.shields.io/badge/clawhub-humanize--chinese-blue?style=flat-square)](https://clawhub.com/skills/humanize-chinese)\n[![License: MIT Non-Commercial](https://img.shields.io/badge/License-MIT_Non--Commercial-yellow?style=flat-square)](LICENSE)\n[![Python](https://img.shields.io/badge/Python-3.6+-blue?style=flat-square)](https://python.org)\n[![Claude Code](https://img.shields.io/badge/Claude_Code-compatible-orange?style=flat-square)](#claude-code)\n\n---\n\n## 30 秒看效果\n\n```bash\n./humanize academic 论文.txt -o 改后.txt --compare\n```\n\n```\n学术专用评分 (11 维度):\n  原文:    92/100 VERY HIGH\n  改写后:  52/100 HIGH\n  ✅ 降低了 40 分\n\n通用 AIGC 评分 (同 detect_cn.py):\n  原文:    74/100 HIGH\n  改写后:  50/100 HIGH\n  ✅ 降低了 24 分\n```\n\n**三款测试样本平均降低 37+ 分**。不用注册、不用付费、不用联网、不需要 API Key。10k 字符 5 秒搞定（`--quick` 模式 0.3 秒，18× 速度）。\n\n---\n\n## 改写前后对比\n\n### 🎓 学术论文（VERY HIGH → HIGH，降 40 分）\n\n**改写前** 🔴 92分：\n\u003e 本文旨在探讨人工智能对高等教育教学模式的影响，具有重要的理论意义和实践价值。研究表明，人工智能技术已被广泛应用于课堂教学、学生评估和个性化学习等多个方面。\n\n**改写后** 🟠 52分：\n\u003e 本研究聚焦于人工智能对高等教育教学模式的影响，兼具理论探索与实践参考的双重价值。前人研究发现，人工智能技术已广泛用于课堂教学、学生评估和个性化学习等多个方面。\n\n### 💬 通用文本（VERY HIGH → HIGH，降 35 分）\n\n**改写前** 🔴 100分：\n\u003e 综上所述，人工智能技术在教育领域具有重要的应用价值和广阔的发展前景。值得注意的是，随着技术的不断发展，AI 将在个性化学习、智能评估等方面发挥越来越重要的作用，为教育行业的数字化转型赋能。\n\n**改写后** 🟠 65分：\n\u003e 简单讲，人工智能技术在教育领域有其独特价值和广阔的进展前景。如今，AI 将在个性化学习、智能评估等维度发挥越来越要紧的作用。\n\n### 🌸 社交媒体 → 小红书风格（VERY HIGH → HIGH，降 37 分）\n\n**改写前** 🔴 100分\n**改写后** 🟠 63分（自动先 humanize 去 AI 词，再加入小红书风格要素）\n\n**所有示例的 AIGC 评分都基于统一检测器 detect_cn.py，使用 seed=42 可复现。**\n\n---\n\n## 真实数据测试\n\n我们用 [HC3-Chinese](https://github.com/Hello-SimpleAI/chatgpt-comparison-detection) 公开数据集（12,853 对人类 vs ChatGPT 真实问答）做了基准测试，随机抽 100 对看工具的实际效果。\n\n### 检测器表现\n\n| 能力 | 数值 | 说明 |\n|---|---|---|\n| 区分 AI 和人写的能力 | **75%** | 随机抽一对文本，检测器给 AI 打分更高的概率 |\n| AI 原分 vs 人类原分 | 25.1 vs 10.3 | 差 **14.7 分**，检测器能明显区分 |\n\n### 改写效果（HC3 100 样本，平均降幅 **7.9 分**）\n\n| 领域 | AI 原分 | 改写后 | 下降 |\n|---|---|---|---|\n| 🏥 医学问答 | 29.6 | 15.3 | **-14.3** |\n| ⚖️ 法律问答 | 33.0 | 18.9 | **-14.1** |\n| 💬 开放问答 | 32.9 | 21.9 | **-11.0** |\n| 🧠 心理咨询 | 37.1 | 27.6 | -9.5 |\n| 💰 金融问答 | 23.4 | 17.0 | -6.4 |\n| 📚 百科问答 | 9.9 | 9.8 | -0.1 |\n| 🔍 事实问答 | 10.9 | 10.4 | -0.5 |\n\n**简单说：长文本、专业领域（医学/法律/开放问答）改写效果最好，能降 11-14 分。**\n\n### 需要知道的\n\n- **真实 ChatGPT 不等于\"AI 样板文\"**。HC3 里的 ChatGPT 原始分数就只有 5-25 分（本来就不那么明显），所以降幅只有几分。但如果是典型的八股 AI 文（论文模板/小红书腔），降幅会大得多（见上面的 50+ 分示例）。\n- **短问答难降**：百科、事实类问答本身字数少，AI 特征不明显，工具发挥空间有限。\n- **所有阈值都有依据**：每个检测特征都在 600 对人类-AI 样本上标定过，不是拍脑袋设的。\n\n自己跑一遍：\n\n```bash\n# 需要先下载 HC3 数据到 ../data/hc3_chinese_all.jsonl\npython evals/run_hc3_benchmark.py --n 100 --seed 42\n```\n\n---\n\n## 安装\n\n```bash\n# 方式一：ClawHub\nclawhub install humanize-chinese\n\n# 方式二：Git Clone\ngit clone https://github.com/voidborne-d/humanize-chinese.git\n\n# 方式三：Claude Code Skill\nnpx skills add https://github.com/voidborne-d/humanize-chinese.git\n```\n\n不需要 `pip install` 任何东西。下载就能用。\n\n---\n\n## Claude Code\n\n4 个 slash command，复制到 `.claude/commands/` 即可：\n\n```bash\ngit clone https://github.com/voidborne-d/humanize-chinese.git\ncp humanize-chinese/claude-code/*.md YOUR_PROJECT/.claude/commands/\n```\n\n然后在 Claude Code 里：\n\n```\n/detect 综上所述，人工智能技术在教育领域具有重要的应用价值...\n/humanize 本文旨在探讨人工智能对高等教育教学模式的影响...\n/academic 论文.txt\n/style xiaohongshu 在当今快节奏的生活中...\n```\n\n| 命令 | 功能 |\n|------|------|\n| `/detect` | AI 痕迹检测，0-100 评分 |\n| `/humanize` | 去 AI 味改写 |\n| `/academic` | 学术论文 AIGC 降重 |\n| `/style [风格]` | 风格转换（7 种） |\n\n---\n\n## 快速上手\n\n### 统一 CLI（推荐）\n\n```bash\n./humanize --list\n./humanize detect 论文.txt                       # 检测\n./humanize academic 论文.txt -o 改后.txt --compare # 学术降重\n./humanize rewrite text.txt --quick -o clean.txt  # 通用改写（极速）\n./humanize style text.txt --style xiaohongshu     # 风格转换\n./humanize compare text.txt -a                    # 前后对比\n./humanize \u003csub\u003e --help                           # 子命令帮助\n```\n\n底层依然是各 `scripts/*_cn.py` 独立脚本，`./humanize` 只是分发器，直接调用旧脚本也完全 OK。\n\n### 🎓 学术论文降 AIGC 率\n\n```bash\n./humanize academic 论文.txt                      # 只检测\n./humanize academic 论文.txt -o 改后.txt --compare  # 改写 + 对比\n./humanize academic 论文.txt -o 改后.txt --quick    # 快速模式（跳过统计，~18× 速度）\n./humanize academic 论文.txt -o 改后.txt -a --compare  # 激进模式\n```\n\n### 🔍 通用文本去 AI 味\n\n```bash\n./humanize detect text.txt -v           # 检测（详细）\n./humanize rewrite text.txt -o clean.txt # 改写\n./humanize rewrite text.txt --quick      # 纯替换，极快\n./humanize compare text.txt -a           # 对比\n```\n\n### 🎨 风格转换\n\n```bash\n./humanize style text.txt --style xiaohongshu   # 小红书\n./humanize style text.txt --style zhihu         # 知乎\n./humanize style text.txt --style weibo         # 微博\n```\n\n7 种风格：口语化 / 知乎 / 小红书 / 公众号 / 学术 / 文艺 / 微博\n（风格转换会先自动跑一遍 humanize，去掉 AI 高频词，再套风格。`--no-humanize` 关闭。）\n\n---\n\n## 功能一览\n\n| 功能 | 说明 |\n|------|------|\n| 🔍 AI 检测 | 20+ 规则维度 + **HC3-校准**的 8 个统计特征（含 d=1.22 的句长 CV 和 d=1.21 的短句占比），0-100 评分 |\n| 📈 统计层 | 字符级 trigram 困惑度 + DivEye 惊奇度 + GLTR rank 分桶 + 句长 burstiness + 标点密度 |\n| ✏️ 智能改写 | 困惑度引导选词 + 低频 bigram 注入 + 短句插入 + 句长随机化 + **40 paraphrase 模板** + 三档自适应强度 |\n| 🎓 学术降重 | 11 维度检测（含扩散度）+ **122 条学术替换** + 独立 picker 策略，针对知网/维普/万方 |\n| 🎨 风格转换 | 7 种中文写作风格（知乎/小红书/微博/公众号/学术/文艺/口语化） |\n| 📊 前后对比 | 学术分 + 通用分双评分，改写效果一目了然 |\n| 🔄 可复现 | `--seed` 保证相同输入相同输出 |\n| ⚡ 速度 | 10k 字符 `--quick` 模式 0.3 秒，完整模式 5 秒 |\n| 📦 零依赖 | 纯 Python 标准库，下载即用。可选 CiLin 词林（`--cilin`，38873 词 + 语义过滤） |\n| 📐 基准测试 | HC3-Chinese 12853 对人类/AI 真实问答回归测试 |\n\n---\n\n## 🎓 学生党必看\n\n用 ChatGPT / DeepSeek 写了论文初稿？三步搞定：\n\n```bash\n# 1. 看看 AIGC 率多高\npython scripts/academic_cn.py 论文.txt\n\n# 2. 一键改写\npython scripts/academic_cn.py 论文.txt -o 改后.txt --compare\n\n# 3. 不够就开激进模式\npython scripts/academic_cn.py 论文.txt -o 改后.txt -a --compare\n```\n\n**工具做了什么：**\n- \"本文旨在\" → \"本研究聚焦于\"\n- \"被广泛应用\" → \"得到较多运用\"\n- 打破每段一样长的结构\n- 加入\"可能\"\"在一定程度上\"等学术犹豫语\n- \"研究表明\" → \"笔者认为\"\"前人研究发现\"\n- 基于 HC3-Chinese Cohen's d 校准的统计特征，学术词表禁用口语候选（不会把\"应用\"改成\"施用\"）\n\n⚠️ 改完通读一遍，确认专业术语没被误改、引用格式正确。建议用知网 AMLC 或维普验证。\n\n---\n\n## 评分标准\n\n| 分数 | 等级 | 含义 |\n|------|------|------|\n| 0-24 | 🟢 LOW | 基本像人写的 |\n| 25-49 | 🟡 MEDIUM | 有些 AI 痕迹 |\n| 50-74 | 🟠 HIGH | 大概率 AI 生成 |\n| 75-100 | 🔴 VERY HIGH | 几乎确定是 AI |\n\n---\n\n## 技术原理\n\n### 规则层（看词）\n\n三段式套路、机械连接词、空洞宏大词、AI 高频词、模板句式、段落结构均匀度。规则都在 `scripts/patterns_cn.json`，可以自己改。\n\n### 统计层（看分布）\n\n所有阈值都基于 HC3-Chinese 300+300 人类-AI 对照样本的 Cohen's d 校准，不是拍脑袋设的。\n\n**1. 句长 burstiness (最强信号)** — AI 中文爱写 15-25 字等长句，人类长短交错。灵感来自 AIMS 2025 中文深度学习 AIGC 检测 paper + 知网语言模式链情报。\n   - 句长变异系数 CV (HC3 **Cohen's d = 1.22** — 人类 0.52 vs AI 0.32)\n   - 短句占比 (\u003c 10 字的句子比例，HC3 **Cohen's d = 1.21** — 人类 25% vs AI 2.6%)\n\n**2. 困惑度 (Perplexity)** — 字符序列的平均负对数概率（d = 0.47）。基于 `scripts/ngram_freq_cn.json` 训练语料的字符级 3-gram。\n\n**3. GLTR rank 分桶** ([Gehrmann et al. ACL 2019](https://arxiv.org/abs/1906.04043))\n   - top-10 bucket 占比（AI 更集中在高概率字，d = 0.44）\n\n**4. DivEye surprisal 时间序列** ([Basani \u0026 Chen TMLR 2026](https://arxiv.org/abs/2502.00258))\n   - skew（d = 0.41）、excess_kurt（d = 0.29）、spectral_flatness（d = 0.20）\n\n**5. 逗号密度** — 有趣发现：AIMS 2025 paper 说「AI 标点密」但 HC3 实测相反。Q\u0026A corpus 里人类写 casual 文本用更多 commas（4.82/百字 vs AI 3.82/百字，d = -0.47）。加了 `low_comma_density` 指标。\n\n所有 statistical indicators 总分上限 25，和规则层（上限 75）加成最终 0-100。\n\n### 智能改写\n\n**Picker 策略**：每次替换从多候选中选「困惑度次高」的（最高的常是古语/错字，次高才是自然人类选择）。学术场景额外禁用 30 个口语候选 + 37 个 AI 触发词候选。\n\n**三档自适应强度**：\n- score \u003c 5：**conservative** — 仅短语替换 + 标点清理\n- 5 ≤ score \u003c 25：**moderate** — +restructure + bigram\n- score ≥ 25：**full** — 全量（含噪声注入 + 句长随机化）\n\n避免对已经够干净的文本乱加噪音反而更像 AI。\n\n**其他技术**：\n- 低频 bigram 注入（把 \"系统\" × 6 的重复 60% 换成 \"架构\"\"体系\"\"框架\"）\n- 句长随机化（避免每句差不多长，但保留\"X指出，Y\"等 attribution 结构）\n- 段落感知（每一步按 `\\n\\n` 分段处理，不丢段落结构）\n- 可选 CiLin 同义词词林扩展（`--cilin`，38,873 词 JSON）\n\n---\n\n## CLI 参数速查\n\n统一 CLI 形式（推荐）：\n\n```bash\n./humanize detect   [file] [-v] [-s] [-j]\n./humanize rewrite  [file] [-o out] [--scene S] [--style S] [-a] [--seed N] [--quick] [--cilin]\n./humanize academic [file] [-o out] [--detect-only] [-a] [--compare] [--quick]\n./humanize style    [file] --style S [-o out] [--no-humanize]\n./humanize compare  [file] [-o out] [--scene S] [-a]\n```\n\n等价的独立脚本形式：\n\n```bash\npython scripts/detect_cn.py [file] ...\npython scripts/humanize_cn.py [file] ...\npython scripts/academic_cn.py [file] ...\npython scripts/style_cn.py [file] --style S ...\npython scripts/compare_cn.py [file] ...\n```\n\n| 参数 | 说明 |\n|------|------|\n| `-v` | 详细模式，显示最可疑的句子 |\n| `-s` | 只输出评分 |\n| `-j` | JSON 输出 |\n| `-o` | 输出文件 |\n| `-a` | 激进模式 |\n| `--seed N` | 固定随机种子 |\n| `--quick` | 纯替换 + 结构还原，跳过统计优化（**~18× 速度**） |\n| `--no-stats` | 关闭统计优化 |\n| `--no-noise` | 关闭噪声注入和句长随机化 |\n| `--cilin` | 开启 CiLin 同义词扩展（humanize） |\n| `--compare` | 改写前后双评分对比（academic） |\n| `--no-humanize` | style 转换前不先去 AI 词 |\n\n---\n\n## 批量处理\n\n```bash\nfor f in *.txt; do echo \"=== $f ===\" \u0026\u0026 ./humanize detect \"$f\" -s; done\nfor f in *.md; do ./humanize rewrite \"$f\" -a -o \"${f%.md}_clean.md\"; done\n```\n\n---\n\n## 对比 Humanizer-zh\n\n和 [Humanizer-zh](https://github.com/op7418/Humanizer-zh)（5k⭐）的区别：\n\n| | 本项目 | Humanizer-zh |\n|---|---|---|\n| 运行方式 | ✅ 独立 CLI，终端直接跑 | 纯 prompt，必须在 Claude Code 内用 |\n| 依赖 | ✅ 零依赖、零 LLM、零 token | 需要 Claude Code + API 额度 |\n| 量化评分 | ✅ 0-100 分（学术 + 通用双尺度） | ❌ 无评分 |\n| 统计检测 | ✅ 困惑度 + DivEye + GLTR，HC3 校准 | ❌ 无 |\n| 学术模式 | ✅ 11 维度 + 120 条替换 | ❌ 无 |\n| 风格转换 | ✅ 7 种 | ❌ 无 |\n| 可复现 | ✅ `--seed` | ❌ 每次不同 |\n| 批量处理 | ✅ CLI 管道 | ❌ 只能单篇交互 |\n| 免费 | ✅ 完全免费 | ⚠️ 需要 API 额度 |\n| 基准测试 | ✅ HC3-Chinese 100 样本回归 | ❌ 无 |\n\n简单说：Humanizer-zh 是个好 prompt，但只能在 Claude Code 里用。我们是独立工具，任何环境都能跑，而且每次改动都有 HC3 回归验证。\n\n---\n\n## 局限\n\n- **真实 ChatGPT 输出** 不像网上样板那么极端，HC3 上 baseline 就 8 分左右，平均降幅只有 1.6 分。刻板化 AI 文本降幅明显（可 50+ 分），自然 ChatGPT 文本降幅温和。\n- **统计层不用神经网络**：我们用字符级 n-gram + 时间序列特征，不是 RoBERTa 这类分类器。优点是零依赖，缺点是分类 AUC 不如 SOTA 检测器。\n- **CNKI/维普/万方没有公开 API**，我们无法接入作为 oracle。PaperPass / 朱雀 都有腾讯 T-Sec CAPTCHA 反爬。所以本项目基于自己的检测公式 + HC3 回归测试迭代，不盲信第三方检测器的具体分数。\n- **不保证过 100% 的 AIGC 检测**。改写会降低「刻板 AI 味」，但最终还是要看检测器用什么模型。工具只是帮你更像人写的，不是反检测魔法。\n\n---\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=voidborne-d/humanize-chinese\u0026type=Date)](https://star-history.com/#voidborne-d/humanize-chinese\u0026Date)\n\n---\n\n## License\n\n**MIT Non-Commercial** — 个人学习、学术研究、非商业开源项目随便用。\n\n**禁止商业使用**，包括但不限于：\n- 卖本软件或基于本软件的衍生品\n- 把工具包装成付费服务（SaaS / API / 网页服务等）\n- 集成到商业产品中作为功能卖点\n- 用本软件给客户提供付费改写 / AI 检测服务\n\n如需商业授权，请通过 [GitHub repo](https://github.com/voidborne-d/humanize-chinese) 联系作者。\n","funding_links":[],"categories":["Skills"],"sub_categories":["Community Skills"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidborne-d%2Fhumanize-chinese","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoidborne-d%2Fhumanize-chinese","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidborne-d%2Fhumanize-chinese/lists"}