humanize
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHumanize Developer Text
让开发者文本更具人文风格
Fix AI-generated writing patterns in docs, docstrings, commit messages, PR descriptions, and code comments. Prioritize deletion over rewriting — the best fix for filler is removal.
修复文档、docstrings、commit messages、PR描述和代码注释中AI生成的写作模式。优先删除而非改写——解决冗余内容的最佳方式就是移除。
Core Principles
核心原则
- Delete first, rewrite second. Most AI patterns are padding. Removing them improves the text.
- Use simple words. Replace "utilize" with "use", "facilitate" with "help", "implement" with "add".
- Keep sentences short. Break compound sentences. One idea per sentence.
- Preserve meaning. Never change what the text says, only how it says it.
- Match the register. Commit messages are terse. READMEs are conversational. API docs are precise.
- Don't overcorrect. A slightly formal sentence is fine. Only fix patterns that read as obviously AI-generated.
- 先删除,后改写。大多数AI写作模式都是冗余的填充内容。移除它们能直接提升文本质量。
- 使用简单词汇。将“utilize”替换为“use”,“facilitate”替换为“help”,“implement”替换为“add”。
- 保持句子简短。拆分复合句,每句只表达一个核心意思。
- 保留原意。绝不改变文本要传达的信息,仅调整表述方式。
- 匹配文本场景。commit messages要简洁凝练,README需通俗易懂,API文档要精准严谨。
- 不过度修正。略微正式的句子无需修改,仅修复那些明显带有AI生成痕迹的表述。
Fix Strategies by Category
按类型分类的优化策略
Content Patterns
内容模式
| Type | Strategy | Risk |
|---|---|---|
| Promotional language | Replace superlatives with specifics | Needs review |
| Vague authority | Delete the claim or add a citation | Safe |
| Formulaic structure | Remove the intro/conclusion wrapper | Needs review |
| Synthetic openers | Delete the opener, start with the point | Safe |
Before:
markdown
In today's rapidly evolving software landscape, authentication is a crucial
component that plays a pivotal role in securing modern applications.After:
markdown
This guide covers authentication setup for the API.| 类型 | 优化策略 | 风险等级 |
|---|---|---|
| 宣传式表述 | 用具体内容替换夸张形容词 | 需要人工审核 |
| 模糊的权威性表述 | 删除该表述或添加引用来源 | 安全 |
| 公式化结构 | 移除开头/结尾的套话 | 需要人工审核 |
| 无意义的开场白 | 删除开场白,直接切入主题 | 安全 |
优化前:
markdown
In today's rapidly evolving software landscape, authentication is a crucial
component that plays a pivotal role in securing modern applications.优化后:
markdown
This guide covers authentication setup for the API.Vocabulary Patterns
词汇模式
| Type | Strategy | Risk |
|---|---|---|
| High-signal AI words | Direct word swap | Safe |
| Low-signal clusters | Reduce density, keep 1-2 | Needs review |
| Copula avoidance | Use "is/are" naturally | Safe |
| Rhetorical devices | Delete the question, state the fact | Safe |
| Synonym cycling | Pick one term, use it consistently | Needs review |
| Commit inflation | Rewrite to match actual change scope | Needs review |
Word swap reference:
| AI Word | Replacement |
|---|---|
| utilize | use |
| leverage (as "use") | use |
| delve | look at, explore, examine |
| facilitate | help, enable, let |
| endeavor | try, work, effort |
| harnessing | using |
| paradigm | approach, model, pattern |
| whilst | while |
| furthermore | also, and |
| moreover | also, and |
| robust (non-technical) | reliable, solid, strong |
| seamless | smooth, easy |
| cutting-edge | modern, latest, new |
| pivotal | important, key |
| elevate | improve |
| empower | let, enable |
| revolutionize | change, improve |
| unleash | release, enable |
| synergy | (delete — rarely means anything) |
| embark | start, begin |
Before:
text
feat: Leverage robust caching paradigm to facilitate seamless data retrievalAfter:
text
feat: add response caching for faster reads| 类型 | 优化策略 | 风险等级 |
|---|---|---|
| 典型AI高频词汇 | 直接替换词汇 | 安全 |
| 无意义词汇堆砌 | 精简密度,仅保留1-2个核心词汇 | 需要人工审核 |
| 刻意回避系动词 | 自然使用“is/are” | 安全 |
| 修辞性问句 | 删除问句,直接陈述事实 | 安全 |
| 同义词滥用 | 选定一个术语并保持一致 | 需要人工审核 |
| Commit信息浮夸 | 改写以匹配实际变更范围 | 需要人工审核 |
词汇替换参考:
| AI词汇 | 替换词 |
|---|---|
| utilize | use |
| leverage (作“使用”义) | use |
| delve | look at, explore, examine |
| facilitate | help, enable, let |
| endeavor | try, work, effort |
| harnessing | using |
| paradigm | approach, model, pattern |
| whilst | while |
| furthermore | also, and |
| moreover | also, and |
| robust (非技术语境) | reliable, solid, strong |
| seamless | smooth, easy |
| cutting-edge | modern, latest, new |
| pivotal | important, key |
| elevate | improve |
| empower | let, enable |
| revolutionize | change, improve |
| unleash | release, enable |
| synergy | (直接删除——几乎无实际意义) |
| embark | start, begin |
优化前:
text
feat: Leverage robust caching paradigm to facilitate seamless data retrieval优化后:
text
feat: add response caching for faster readsFormatting Patterns
格式模式
| Type | Strategy | Risk |
|---|---|---|
| Boldface overuse | Remove bold from non-key terms | Safe |
| Emoji decoration | Remove emoji from technical content | Safe |
| Heading restatement | Delete the restating sentence | Safe |
Before:
markdown
undefined| 类型 | 优化策略 | 风险等级 |
|---|---|---|
| 过度使用粗体 | 移除非关键术语的粗体格式 | 安全 |
| 表情符号装饰 | 从技术文档中移除表情符号 | 安全 |
| 标题重复表述 | 删除重复标题的句子 | 安全 |
优化前:
markdown
undefinedError Handling
Error Handling
Error handling is a critical aspect of building reliable applications.
The function catches and processes all runtime errors.
handleError
**After:**
```markdownError handling is a critical aspect of building reliable applications.
The function catches and processes all runtime errors.
handleError
**优化后:**
```markdownError Handling
Error Handling
The function catches runtime errors and logs them with context.
handleErrorundefinedThe function catches runtime errors and logs them with context.
handleErrorundefinedCommunication Patterns
沟通模式
| Type | Strategy | Risk |
|---|---|---|
| Chat leaks | Delete entirely | Safe |
| Cutoff disclaimers | Delete entirely | Safe |
| Sycophantic tone | Delete or neutralize | Safe |
| Apologetic errors | Rewrite as direct error message | Needs review |
Before:
python
undefined| 类型 | 优化策略 | 风险等级 |
|---|---|---|
| 聊天式冗余内容 | 直接删除 | 安全 |
| 时效性免责声明 | 直接删除 | 安全 |
| 谄媚语气 | 删除或中性化表述 | 安全 |
| 道歉式错误信息 | 改写为直接明确的错误提示 | 需要人工审核 |
优化前:
python
undefinedGreat implementation! This elegantly handles the edge case.
Great implementation! This elegantly handles the edge case.
As of my last update, this API endpoint supports JSON.
As of my last update, this API endpoint supports JSON.
**After:**
```python
**优化后:**
```pythonHandles the re-entrant edge case from issue #42.
Handles the re-entrant edge case from issue #42.
This endpoint accepts JSON.
This endpoint accepts JSON.
undefinedundefinedFiller Patterns
冗余内容模式
| Type | Strategy | Risk |
|---|---|---|
| Filler phrases | Delete the phrase | Safe |
| Excessive hedging | Remove qualifiers, state directly | Safe |
| Generic conclusions | Delete the conclusion paragraph | Safe |
Before:
markdown
It's worth noting that the configuration file might potentially need to be
updated. Going forward, this could possibly affect performance.After:
markdown
Update the configuration file. This affects performance.| 类型 | 优化策略 | 风险等级 |
|---|---|---|
| 冗余短语 | 删除该短语 | 安全 |
| 过度模糊表述 | 移除限定词,直接陈述 | 安全 |
| 通用结论 | 删除结论段落 | 安全 |
优化前:
markdown
It's worth noting that the configuration file might potentially need to be
updated. Going forward, this could possibly affect performance.优化后:
markdown
Update the configuration file. This affects performance.Code Docs Patterns
代码文档模式
| Type | Strategy | Risk |
|---|---|---|
| Tautological docstrings | Delete or add real information | Needs review |
| Narrating obvious code | Delete the comment | Safe |
| "This noun verbs" | Rewrite in active/direct voice | Safe |
| Exhaustive enumeration | Keep only non-obvious params | Needs review |
Before:
python
def get_user(user_id: int) -> User:
"""Get a user.
This method retrieves a user from the database by their ID.
Args:
user_id: The ID of the user to get.
Returns:
User: The user object.
Raises:
ValueError: If the user ID is invalid.
"""
return db.query(User).get(user_id)After:
python
def get_user(user_id: int) -> User:
"""Raises UserNotFound if ID doesn't exist in the database."""
return db.query(User).get(user_id)| 类型 | 优化策略 | 风险等级 |
|---|---|---|
| 同义反复的docstrings | 删除或添加实际有效信息 | 需要人工审核 |
| 陈述代码显而易见功能的注释 | 删除该注释 | 安全 |
| “This noun verbs”式表述 | 改写为主动/直接语态 | 安全 |
| 过度详尽的参数枚举 | 仅保留非显而易见的参数说明 | 需要人工审核 |
优化前:
python
def get_user(user_id: int) -> User:
"""Get a user.
This method retrieves a user from the database by their ID.
Args:
user_id: The ID of the user to get.
Returns:
User: The user object.
Raises:
ValueError: If the user ID is invalid.
"""
return db.query(User).get(user_id)优化后:
python
def get_user(user_id: int) -> User:
"""Raises UserNotFound if ID doesn't exist in the database."""
return db.query(User).get(user_id)Developer Voice Guidelines
开发者写作风格指南
Good developer writing is:
- Conversational but precise. Write like you'd explain it to a colleague, but get the details right.
- Direct. State opinions. "Use X" not "You might consider using X".
- Terse where appropriate. Commit messages and code comments should be short. Don't pad them.
- Specific. Replace vague claims with concrete details, numbers, or examples.
- Consistent. Pick one term and stick with it. Don't cycle synonyms.
优质的开发者写作应具备以下特点:
- 通俗易懂且精准严谨。像给同事讲解一样写作,但要确保细节准确。
- 直接明确。清晰表达观点,用“使用X”而非“你可以考虑使用X”。
- 按需简洁。commit messages和代码注释应简短,避免冗余。
- 具体详实。用具体细节、数据或示例替代模糊表述。
- 保持一致。选定一个术语并持续使用,避免同义词滥用。
Register Guide
文本场景风格参考
| Artifact | Tone | Length | Example |
|---|---|---|---|
| Commit message | Terse, imperative | 50-72 chars | |
| Code comment | Brief, explains why | 1-2 lines | |
| Docstring | Precise, adds value | What the name doesn't tell you | |
| PR description | Structured, factual | Context + what changed + how to test | Bullet points, not paragraphs |
| README | Conversational, scannable | As short as possible | Start with what it does, then how to use it |
| Error message | Actionable, specific | What happened + what to do | |
| 文档类型 | 语气 | 长度 | 示例 |
|---|---|---|---|
| Commit message | 简洁、命令式 | 50-72个字符 | |
| 代码注释 | 简短、解释原因 | 1-2行 | |
| Docstring | 精准、补充信息 | 补充名称无法传达的内容 | |
| PR描述 | 结构化、事实性 | 上下文 + 变更内容 + 测试方法 | 使用项目符号,而非段落 |
| README | 通俗易懂、易扫描 | 尽可能简短 | 先说明功能,再讲解使用方法 |
| 错误提示 | 可操作、具体 | 说明问题 + 解决方案 | |
Applying Fixes
优化方案的应用
Safe Fixes (Auto-Apply)
可自动应用的安全优化
These are mechanical and can be applied without human review:
- Delete chat leaks ("Certainly!", "Great question!")
- Delete cutoff disclaimers ("As of my last update")
- Delete filler phrases ("It's worth noting that")
- Delete heading restatements
- Remove emoji from technical docs
- Remove excessive bold formatting
- Swap high-signal AI vocabulary (utilize -> use)
- Delete "As we can see" / "Let's take a look at"
- Delete narrating-obvious comments
这些优化属于机械性操作,无需人工审核即可应用:
- 删除聊天式冗余内容(如“Certainly!”、“Great question!”)
- 删除时效性免责声明(如“As of my last update”)
- 删除冗余短语(如“It's worth noting that”)
- 删除标题重复表述
- 从技术文档中移除表情符号
- 移除过度的粗体格式
- 替换典型AI高频词汇(如utilize -> use)
- 删除“As we can see” / “Let's take a look at”这类表述
- 删除陈述代码显而易见功能的注释
Needs Review Fixes (Interactive)
需人工审核的优化(交互式)
These require a human to verify the replacement preserves intent:
- Rewriting promotional language (may need domain knowledge)
- Fixing synonym cycling (need to pick the right term)
- Rewriting tautological docstrings (need to decide what's actually worth documenting)
- Trimming exhaustive parameter docs (need to decide which params are non-obvious)
- Rewriting commit messages (scope judgment)
- Restructuring formulaic sections (may change document flow)
- Fixing apologetic error messages (wording matters for UX)
这些优化需要人工验证替换内容是否保留了原意:
- 改写宣传式表述(可能需要领域知识)
- 修正同义词滥用问题(需选定正确术语)
- 改写同义反复的docstrings(需判断哪些内容值得记录)
- 精简过度详尽的参数文档(需判断哪些参数是非显而易见的)
- 改写Commit信息(需判断变更范围)
- 重构公式化章节(可能会改变文档流程)
- 修正道歉式错误信息(措辞会影响用户体验)