网淘吧来吧,欢迎您!

Humanize AI

2026-04-01 新闻来源:网淘吧 围观:9
电脑广告
手机广告

Humanize CLI

用于检测并自动修正AI写作模式的命令行工具。

脚本

analyze.py — 检测AI模式

扫描文本并报告AI常用词汇、夸大表述、聊天机器人痕迹以及可自动替换的短语。

Humanize AI

# Analyze a file
python scripts/analyze.py input.txt

# Analyze from stdin
echo "This serves as a testament to our commitment" | python scripts/analyze.py

# JSON output for programmatic use
python scripts/analyze.py input.txt --json

输出示例:

==================================================
AI PATTERN ANALYSIS - 5 issues found
==================================================

AI VOCABULARY:
  • testament: 1x
  • crucial: 2x

AUTO-REPLACEABLE:
  • "serves as" → "is": 1x
  • "in order to" → "to": 1x

humanize.py — 自动替换模式

对常见的AI化表达执行自动替换。

# Humanize and print to stdout
python scripts/humanize.py input.txt

# Write to output file
python scripts/humanize.py input.txt -o output.txt

# Include em dash replacement
python scripts/humanize.py input.txt --fix-dashes

# Quiet mode (no change log)
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" 等

工作流程

  1. 先进行分析以查看需要修正的内容:

    python scripts/analyze.py document.txt
    
  2. 自动修正安全的替换:

    python scripts/humanize.py document.txt -o document_clean.txt
    
  3. 手动审核针对分析标记的AI术语和夸大表述(这些需要人工判断)

  4. 重新分析以确认改进效果:

    python scripts/analyze.py document_clean.txt
    

自定义模式

编辑scripts/patterns.json以添加/移除:

  • ai_words— 仅标记但不自动替换的术语
  • puffery— 需要标记的推广性语言
  • replacements— 词组→替换映射(空字符串表示删除)
  • chatbot_artifacts— 需自动移除的短语
  • hedging_phrases— 需标记的过度模糊表述

批量处理

处理多个文件:

# Analyze all markdown files
for f in *.md; do
  echo "=== $f ===" 
  python scripts/analyze.py "$f"
done

# Humanize all txt files in place
for f in *.txt; do
  python scripts/humanize.py "$f" -o "$f.tmp" && mv "$f.tmp" "$f"
done

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏

文章底部电脑广告
手机广告位-内容正文底部
上一篇:Accessibility Toolkit 下一篇:Umeå Data

相关文章

您是本站第364310名访客 今日有75篇新文章/评论