名称: humanize-ai
描述: 通过检测和自动修复 AI 生成内容,使其更人性化。使用 Python 脚本将 AI 文本人性化。扫描 AI 词汇、夸大宣传、聊天机器人痕迹,并自动替换填充短语。适用于:在 AI 检测器中分析文本并未来绕过检测、批量处理文件、运行自动清理,或在手动人性化前获取报告。
允许工具:
- Read
- Write
- StrReplace
- Shell
- Glob
用于检测和自动修复 AI 写作模式的命令行工具。
扫描文本并报告 AI 词汇、夸大宣传、聊天机器人痕迹和可自动替换的短语。
# 分析文件
python scripts/analyze.py input.txt
# 从标准输入分析
echo "This serves as a testament to our commitment" | python scripts/analyze.py
# 以 JSON 格式输出,便于程序化使用
python scripts/analyze.py input.txt --json
输出示例:
==================================================
AI 模式分析 - 发现 5 个问题
==================================================
AI 词汇:
• testament: 1 次
• crucial: 2 次
可自动替换:
• "serves as" → "is": 1 次
• "in order to" → "to": 1 次
对常见的 AI 表达模式执行自动替换。
# 人性化处理并输出到标准输出
python scripts/humanize.py input.txt
# 写入输出文件
python scripts/humanize.py input.txt -o output.txt
# 包含破折号替换
python scripts/humanize.py input.txt --fix-dashes
# 静默模式(不显示更改日志)
python scripts/humanize.py input.txt -q
自动修复的内容:
- 填充短语:"in order to" → "to", "due to the fact that" → "because"
- 避免系动词:"serves as" → "is", "boasts" → "has"
- 句子起始词:移除 "Additionally,", "Furthermore,", "Moreover,"
- 弯引号 → 直引号
- 聊天机器人痕迹:移除 "I hope this helps", "Let me know if" 等
先分析,查看需要修复的内容:
bash
python scripts/analyze.py document.txt
自动修复 安全的替换项:
bash
python scripts/humanize.py document.txt -o document_clean.txt
手动审查 分析脚本标记出的 AI 词汇和夸大宣传(这些需要人工判断)
重新分析 以确认改进效果:
bash
python scripts/analyze.py document_clean.txt
编辑 scripts/patterns.json 以添加/移除:
- ai_words — 仅标记但不自动替换的词汇
- puffery — 需要标记的宣传性语言
- replacements — 短语 → 替换映射(空字符串 = 删除)
- chatbot_artifacts — 需自动移除的短语
- hedging_phrases — 需要标记的过度模糊用语
处理多个文件:
# 分析所有 Markdown 文件
for f in *.md; do
echo "=== $f ==="
python scripts/analyze.py "$f"
done
# 原地人性化所有 txt 文件
for f in *.txt; do
python scripts/humanize.py "$f" -o "$f.tmp" && mv "$f.tmp" "$f"
done