@faircopy/rules-nlp

中文文档
1.27.3发布于 2026/11/07MITTypeScriptES Module构建来源已验证近 30 天下载 1.2万

使用折中法的可选 NLP 动力规则集

中文使用文档
文档目录11 节
  1. 规则
  2. no-absolute-intensifiers
  3. sentence-complexity
  4. no-overly-complex-sentences
  5. no-vague-comparatives
  6. no-qualifier-creep
  7. no-non-inclusive-language-nlp
  8. no-llm-speak
  9. no-weak-verbs
  10. no-noun-strings
  11. no-n-things

@ faircopy/ rules- nlp

可选的 NLP 动力规则集 compromise。 。 。 .

npm i -D @faircopy/rules-nlp

装入规则片一次, 然后配置规则 赤裸的规则ID :

rulesets: ['@faircopy/rules-nlp'],
rules: {
  'no-absolute-intensifiers': 'warn',
  'no-adverb-overuse': 'warn',
  'no-expletive-openers': 'warn',
  'no-filter-words': 'warn',
  'no-future-promises': 'warn',
  'no-hedge-words': 'warn',
  'no-empty-transformation-claims': 'warn',
  'no-passive-voice': 'warn',
  'no-qualifier-creep': 'warn',
  'no-redundant-pairs': 'warn',
  'no-vague-comparatives': 'warn',
  'no-weak-modals': 'warn',
  'no-stacked-adjectives': 'warn',
  'no-nominalized-phrases': 'warn',
  'no-noun-strings': 'warn',
  'no-pronoun-led-claims': 'warn',
  'no-buzzword-stacks': 'warn',
  'no-complex-readability': 'warn',
  'no-overly-complex-sentences': 'warn',
  'no-vague-quantifiers': 'warn',
  'no-meaningless-modifiers': 'warn',
  'no-superlative-claims': 'warn',
  'no-llm-speak': 'warn',
  'no-n-things': 'warn',
  'no-weak-verbs': 'warn',
}

软件包合格标识 @faircopy/rules-nlp/no-passive-voice 仍然工作,如果另一个装入的规则显示相同的赤裸规则名称,则需要使用.

规则

规则说明
no-absolute-intensifiers绝对形容词前的旗帜加速度 very unique
no-adverb-overuse带有两个以上副词的旗帜句子以 -ly
no-empty-transformation-claims旗子宽变的陈词滥调 transform the way teams work
no-expletive-openers旗下句子打开像 There are
no-filter-words禁用过滤短语 I think 财务报告和审定财务报表 it seems
no-future-promises旗下未来的美好承诺 will help you
no-hedge-words旗杆词类 kind of 财务报告和审定财务报表 somewhat
no-jargon旗下商业术语 leverage 财务报告和审定财务报表 circle back
no-passive-voice标记可能的被动语音构造
no-qualifier-creep旗上堆放的限定词或加速度等 very really good
no-redundant-pairs旗下冗余的固定词组 first and foremost
no-vague-comparatives标出省略明确基线的比较索赔
no-weak-modals国旗套期模式债权 can help 财务报告和审定财务报表 might improve
no-stacked-adjectives在名词前加多个形容词的旗帜名词短语
no-nominalized-phrases标记 X of Y 短语类 optimization of onboarding
no-noun-strings连续名词的旗下密集字符串 user experience design process
no-pronoun-led-claims旗帜模糊的句子打开者喜欢 This helps 财务报告和审定财务报表 It enables
no-buzzword-stacks带有抽象益惠名词的旗下句子超载
no-complex-readabilityFlesch-Kincaid 级别超过目标的旗手
no-overly-complex-sentences旗下句子加载协调或次协调组合
no-vague-quantifiers无数字锚标的旗下光刻符
no-meaningless-modifiers旗下加速度像 very 财务报告和审定财务报表 obviously 没有添加信息
no-superlative-claims旗下未证实的叠加 best 财务报告和审定财务报表 world-class
no-non-inclusive-language-nlp标出非包容性术语并提出中性替代办法
no-llm-speak旗下LLM的陈词滥调 delve into 财务报告和审定财务报表 robust 并提出具体的备选办法
no-n-things标记所计占位符框架, 如 Three things. 财务报告和审定财务报表 5 things to know
no-weak-verbs旗帜模糊动作动词如 make 财务报告和审定财务报表 perform 并提出更强有力的备选方案
sentence-complexity超过文字或条款阈值的旗帜句子

no-absolute-intensifiers

绝对形容词已经表达出一种极端,因此强化词如 very 是多余的.

rules: {
  'no-absolute-intensifiers': 'warn',
}

选项 :

选项类型默认说明
intensifiersstring[]['very', 'really', 'completely', ...]可视为强化词或短语
absolutesstring[]['unique', 'finished', 'destroyed', ...]不应强化的绝对形容词

示例

'no-absolute-intensifiers': ['warn', {
  intensifiers: ['very', 'highly'],
  absolutes: ['unique', 'critical'],
}]

sentence-complexity

长,条款重的句子更难读取. 这个规则标出任何句子超过可配置的单词计数或包含太多有限制的动词条款,并建议将其分作更短的句子.

rules: {
  'sentence-complexity': 'warn',
}

选项 :

选项类型默认说明
maxWordCountnumber25每句允许的最大字数
maxClauseCountnumber3每句允许的最大限定动词条款

带有自定义阈值的示例 :

'sentence-complexity': ['warn', {
  maxWordCount: 20,
  maxClauseCount: 2,
}]

标记示例 :

The engineer reviewed the requirements and wrote the code and ran the tests and deployed the application while the team watched and celebrated the release together.

建议的修补:将每一独立条款的句子分开.

The engineer reviewed the requirements. They wrote the code, ran the tests, and deployed the application. The team watched and celebrated the release together.

no-overly-complex-sentences

装有联想的句子常常会跑来跑去,或者筑得太深. 此规则标出任何句子超过可配置的坐标相接数,次相接数,或总相接数.

rules: {
  'no-overly-complex-sentences': 'warn',
}

选项 :

选项类型默认说明
maxConjunctionsnumber4每句允许的最大总数
maxCoordinatingnumber3每句允许的最大坐标组合
maxSubordinatingnumber2每句允许的最大次坐标组合
coordinatingstring[]['and', 'but', 'or', 'nor', 'yet', 'so']作为协调组合的单词
subordinatingstring[]['because', 'although', 'though', 'while', 'since', 'unless', 'if', 'when', 'after', 'before', 'until', 'whether', 'once']单词作为次排序组合
allowListstring[][]计数时忽略的单词

带有自定义阈值的示例 :

'no-overly-complex-sentences': ['warn', {
  maxConjunctions: 3,
  maxCoordinating: 2,
  maxSubordinating: 1,
}]

标记示例 :

I ran and swam and biked and hiked and climbed.

建议的修补:将清单分为更短的句子,或使用一个圆形清单.

I ran, swam, and biked. Then I hiked and climbed.

一些词,例如: since 或者说 so,可以在特定情况下作为前置或副词. 如果规则太吵 无法复制, 加字到 allowList。 。 。 .

no-vague-comparatives

比较索赔 faster, (中文(简体) ), easier,或 more efficient 只有在读者知道基线时才能说服. 此规则标记了非配对的比较形容词和副词 than 在同一句话中.

rules: {
  'no-vague-comparatives': 'warn',
}

选项 :

选项类型默认说明
comparativesstring[]['better', 'worse', 'more', 'less', 'faster', 'slower', 'easier', 'harder', 'stronger', 'weaker', 'higher', 'lower', 'bigger', 'smaller', 'greater']需要基准的比较词或短语
requireThanbooleantrue是否为 a than 在同一句中

带有自定义设置的示例 :

'no-vague-comparatives': ['warn', {
  comparatives: ['superior', 'inferior', 'better'],
  requireThan: true,
}]

标记示例 :

Our editor is faster. It is also easier to use.

建议的固定:增加一个具体基准.

Our editor is faster than the old one. It is also easier to use than a spreadsheet.

no-qualifier-creep

堆积的限定词或强化词稀释了债权,使其发出被套入的声音. 本规则在形容词或副词前由两个或两个以上的修饰词组所构成.

rules: {
  'no-qualifier-creep': 'warn',
}

选项 :

选项类型默认说明
qualifiersstring[]['very', 'really', 'quite', ...]作为限定词或强化词的单词
maxQualifiersnumber1在超过部分标出前行中允许的最大限定符

带有自定义设置的示例 :

'no-qualifier-creep': ['warn', {
  qualifiers: ['very', 'really', 'quite'],
  maxQualifiers: 1,
}]

标记示例 :

The result is very really quite good.

建议固定:保留最强的限定词或用具体证据来取代该短语.

The result is excellent.

no-non-inclusive-language-nlp

非包容性术语可以疏远读者. 这个规则标记了常见的非包容性语言,并且建议使用NLP-意识相匹配的中性替代品,这样它就能理解词边界和部分语境.

rules: {
  'no-non-inclusive-language-nlp': 'warn',
}

选项 :

选项类型默认说明
termsNonInclusiveTerm[]见来源标出名称的术语,每个名称都有备选名称清单
allowedTermsstring[][]允许和跳过的条件

带有自定义术语的示例:

'no-non-inclusive-language-nlp': ['warn', {
  terms: [
    { term: 'guys', alternatives: ['everyone', 'team', 'folks'] },
    { term: 'blacklist', alternatives: ['denylist', 'blocklist'] },
  ],
  allowedTerms: ['whitelist'],
}]

标记示例 :

Hey guys, add this to the blacklist and do a sanity check.

建议的固定:

Hey everyone, add this to the blocklist and do a quick check.

规则使用 compromise 以避免部分字词匹配(例如, guyses 而不标记),并跳过只使用动词的模糊词,例如 master 内 master the skill。 。 。 .

no-llm-speak

LLM生成的拷贝往往会回落到添加,抽象的短语中,这些短语听起来很权威,但并不多说. 这一规则标出LLM常见的陈词滥调并提出了混凝土取而代之的建议.

rules: {
  'no-llm-speak': 'warn',
}

选项 :

选项类型默认说明
phrasesLlmSpeakPhrase[]见来源要标的词, 每个词都有替代词列表
allowedPhrasesstring[][]允许和跳过的措辞

带有自定义短语的示例 :

'no-llm-speak': ['warn', {
  phrases: [
    { phrase: 'delve into', alternatives: ['explore', 'examine'] },
    { phrase: 'robust', alternatives: ['strong', 'resilient'] },
  ],
  allowedPhrases: ['crucial'],
}]

标记示例 :

It's important to note that we will delve into the robust, intricate tapestry. Furthermore, the system is crucial.

建议的固定:

Note that we will explore the strong, detailed pattern. Also, the system is critical.

规则使用 compromise 用于文字意识匹配,所以 robustness 当配置的词组是 robust。 。 。 .

no-weak-verbs

模糊动作动词如 make, (中文(简体) ), perform, (中文(简体) ), conduct,以及 carry out 隐藏真正的行动。 这个规则会标出用作动词的弱动词并提出了更强更具体的替代方案. 用这个 compromise 以识别动词表达,所以 made, (中文(简体) ), performed,以及 carried out 也标出标记,而名词用法如 the make of the car 被忽略.

rules: {
  'no-weak-verbs': 'warn',
}

选项 :

选项类型默认说明
verbsWeakVerb[][{ verb: 'make', alternatives: ['create', 'build', 'produce'] }, ...]要标的动词,每个动词都有建议选项
allowListstring[][]允许和跳过的动词或短语

有自定义动词的例子 :

'no-weak-verbs': ['warn', {
  verbs: [
    { verb: 'utilize', alternatives: ['use'] },
    { verb: 'leverage', alternatives: ['use', 'exploit'] },
  ],
  allowList: ['make'],
}]

标记示例 :

We need to make a decision, perform a review, and carry out the plan.

建议的固定:

We need to decide, review, and implement the plan.

由于规则通过动词活字来匹配,它也可能标出常见的用词动词和平话等 make out, (中文(简体) ), make do,或 made it添加到 allowList 如果你的风格指南能接受的话.

no-noun-strings

连续三个或三个以上的名词会生成密集,难以读取的化合物. 此规则将名词字符串相继标记,并建议用动词或预设来重写.

rules: {
  'no-noun-strings': 'warn',
}

选项 :

选项类型默认说明
maxConsecutiveNounsnumber3标记前允许的最大连续名词
allowedPhrasesstring[][]允许和跳过的措辞

带有自定义设置的示例 :

'no-noun-strings': ['warn', {
  maxConsecutiveNouns: 4,
  allowedPhrases: ['user experience design process'],
}]

标记示例 :

The user experience design process is slow.

建议的固定:

The process for designing the user experience is slow.

规则使用 compromise 用于部分语音标记并跳过地名等适当的名词.

no-n-things

一个数加上一个占位名词 Three things., (中文(简体) ), 5 things to know before launch ——取出它的号码来作节奏而不是意义. 这个框架是一个有文献记载的AI-writing tell:选择计数是因为所列举的列表感到出拳,而不是因为内容要求很多项目. 标出标题中的项目,或放弃计数并陈述索赔.

rules: {
  'no-n-things': 'warn',
}

选项 :

选项类型默认说明
minCountnumber2标记前的最小基本数; 保留 one thing 独行
nounsstring[]['thing', 'things']完成此程序的占位符名词 N ___ 边框
allowedPhrasesstring[][]允许和跳过的措辞

带有自定义设置的示例 :

'no-n-things': ['warn', {
  minCount: 3,
  nouns: ['thing', 'things', 'tips', 'takeaways'],
}]

标记示例 :

Three things you should know about memory.

建议的固定:

How Ditto remembers your conversations.

规则使用 compromise 用于部分语音标记。 只有红外线能触发它 First things first, (中文(简体) ), All things considered,以及 a few things 和具体的名词一样 three tabs。 。 。 .

版本与发布记录

@faircopy/rules-nlp 共发布 34 个版本,首次发布于 2026/04/24;过去 12 个月发布了 34 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.27.3latest2026/11/077 天前
1.27.22026/11/077 天前
1.27.12026/11/077 天前
1.27.02026/11/0410 天前
1.26.02026/10/2124 天前
1.25.02026/10/2025 天前

关于 @faircopy/rules-nlp 的常见问题

@faircopy/rules-nlp 是什么?

使用折中法的可选 NLP 动力规则集

如何安装 @faircopy/rules-nlp?

在项目目录运行 npm install @faircopy/rules-nlp,或使用 pnpm add / yarn add / bun add。

@faircopy/rules-nlp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@faircopy/rules-nlp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@faircopy/rules-nlp 可以商用吗?

@faircopy/rules-nlp 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@faircopy/rules-nlp 的下载量有多少?

根据 npm 官方下载统计,@faircopy/rules-nlp 在 2026/10/14 – 2026/11/12 这 30 天内被下载 11,912 次,日均约 397 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@faircopy/rules-nlp 还在维护吗?

最新版本 1.27.3 发布于 2026/11/07(7 天前);至今共发布 34 个版本,其中过去 12 个月发布了 34 个;首次发布于 2026/04/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。