chaffjs 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/README.md +27 -2
  2. package/dist/address-chain.js +1 -1
  3. package/dist/address-chain.js.map +1 -1
  4. package/dist/backends/anthropic.d.ts +2 -1
  5. package/dist/backends/anthropic.d.ts.map +1 -1
  6. package/dist/backends/anthropic.js +4 -1
  7. package/dist/backends/anthropic.js.map +1 -1
  8. package/dist/backends/openai.d.ts +2 -1
  9. package/dist/backends/openai.d.ts.map +1 -1
  10. package/dist/backends/openai.js +1 -1
  11. package/dist/backends/openai.js.map +1 -1
  12. package/dist/backends/types.d.ts +2 -1
  13. package/dist/backends/types.d.ts.map +1 -1
  14. package/dist/backends/types.js +1 -1
  15. package/dist/backends/types.js.map +1 -1
  16. package/dist/baseline.js +1 -1
  17. package/dist/baseline.js.map +1 -1
  18. package/dist/calendar-number.d.ts +26 -0
  19. package/dist/calendar-number.d.ts.map +1 -0
  20. package/dist/calendar-number.js +51 -0
  21. package/dist/calendar-number.js.map +1 -0
  22. package/dist/cli-args.d.ts +0 -5
  23. package/dist/cli-args.d.ts.map +1 -1
  24. package/dist/cli-args.js +2 -2
  25. package/dist/cli-args.js.map +1 -1
  26. package/dist/cli-text.d.ts +6 -2
  27. package/dist/cli-text.d.ts.map +1 -1
  28. package/dist/cli-text.js +19 -12
  29. package/dist/cli-text.js.map +1 -1
  30. package/dist/cli.d.ts.map +1 -1
  31. package/dist/cli.js +43 -37
  32. package/dist/cli.js.map +1 -1
  33. package/dist/commands/cite.d.ts.map +1 -1
  34. package/dist/commands/cite.js +4 -4
  35. package/dist/commands/cite.js.map +1 -1
  36. package/dist/commands/eval.js +1 -1
  37. package/dist/commands/eval.js.map +1 -1
  38. package/dist/commands/init-ask.d.ts +19 -0
  39. package/dist/commands/init-ask.d.ts.map +1 -0
  40. package/dist/commands/init-ask.js +43 -0
  41. package/dist/commands/init-ask.js.map +1 -0
  42. package/dist/commands/test.d.ts +8 -0
  43. package/dist/commands/test.d.ts.map +1 -1
  44. package/dist/commands/test.js +70 -38
  45. package/dist/commands/test.js.map +1 -1
  46. package/dist/commands/tree.d.ts +1 -8
  47. package/dist/commands/tree.d.ts.map +1 -1
  48. package/dist/commands/tree.js +7 -6
  49. package/dist/commands/tree.js.map +1 -1
  50. package/dist/config/by-path.d.ts.map +1 -1
  51. package/dist/config/by-path.js +10 -9
  52. package/dist/config/by-path.js.map +1 -1
  53. package/dist/config/load.d.ts +4 -0
  54. package/dist/config/load.d.ts.map +1 -1
  55. package/dist/config/load.js +19 -0
  56. package/dist/config/load.js.map +1 -1
  57. package/dist/config/name-problems.d.ts +5 -0
  58. package/dist/config/name-problems.d.ts.map +1 -0
  59. package/dist/config/name-problems.js +11 -0
  60. package/dist/config/name-problems.js.map +1 -0
  61. package/dist/date-stamp.js +1 -1
  62. package/dist/date-stamp.js.map +1 -1
  63. package/dist/detectors/char-shape.d.ts.map +1 -1
  64. package/dist/detectors/char-shape.js +16 -6
  65. package/dist/detectors/char-shape.js.map +1 -1
  66. package/dist/detectors/en-shape.d.ts.map +1 -1
  67. package/dist/detectors/en-shape.js +101 -7
  68. package/dist/detectors/en-shape.js.map +1 -1
  69. package/dist/detectors/enumerated-runs.d.ts.map +1 -1
  70. package/dist/detectors/enumerated-runs.js +4 -2
  71. package/dist/detectors/enumerated-runs.js.map +1 -1
  72. package/dist/detectors/gram-place.js +1 -1
  73. package/dist/detectors/gram-place.js.map +1 -1
  74. package/dist/detectors/heading-case.d.ts.map +1 -1
  75. package/dist/detectors/heading-case.js +3 -1
  76. package/dist/detectors/heading-case.js.map +1 -1
  77. package/dist/detectors/index.d.ts.map +1 -1
  78. package/dist/detectors/index.js +4 -3
  79. package/dist/detectors/index.js.map +1 -1
  80. package/dist/detectors/lettered-index.d.ts +9 -0
  81. package/dist/detectors/lettered-index.d.ts.map +1 -0
  82. package/dist/detectors/lettered-index.js +54 -0
  83. package/dist/detectors/lettered-index.js.map +1 -0
  84. package/dist/detectors/lexicon.d.ts +5 -1
  85. package/dist/detectors/lexicon.d.ts.map +1 -1
  86. package/dist/detectors/lexicon.js +46 -3
  87. package/dist/detectors/lexicon.js.map +1 -1
  88. package/dist/detectors/orthography.d.ts.map +1 -1
  89. package/dist/detectors/orthography.js +24 -6
  90. package/dist/detectors/orthography.js.map +1 -1
  91. package/dist/detectors/phrase-match.d.ts +3 -1
  92. package/dist/detectors/phrase-match.d.ts.map +1 -1
  93. package/dist/detectors/phrase-match.js +20 -15
  94. package/dist/detectors/phrase-match.js.map +1 -1
  95. package/dist/detectors/repeated-head.d.ts.map +1 -1
  96. package/dist/detectors/repeated-head.js +5 -4
  97. package/dist/detectors/repeated-head.js.map +1 -1
  98. package/dist/detectors/signals.d.ts.map +1 -1
  99. package/dist/detectors/signals.js +16 -6
  100. package/dist/detectors/signals.js.map +1 -1
  101. package/dist/detectors/stacked-hedge.d.ts +23 -0
  102. package/dist/detectors/stacked-hedge.d.ts.map +1 -0
  103. package/dist/detectors/stacked-hedge.js +64 -0
  104. package/dist/detectors/stacked-hedge.js.map +1 -0
  105. package/dist/detectors/superlative-amount.d.ts +9 -0
  106. package/dist/detectors/superlative-amount.d.ts.map +1 -0
  107. package/dist/detectors/superlative-amount.js +20 -0
  108. package/dist/detectors/superlative-amount.js.map +1 -0
  109. package/dist/detectors/superlative-clause.d.ts +18 -0
  110. package/dist/detectors/superlative-clause.d.ts.map +1 -0
  111. package/dist/detectors/superlative-clause.js +61 -0
  112. package/dist/detectors/superlative-clause.js.map +1 -0
  113. package/dist/detectors/superlative-scope.d.ts +6 -0
  114. package/dist/detectors/superlative-scope.d.ts.map +1 -1
  115. package/dist/detectors/superlative-scope.js +3 -3
  116. package/dist/detectors/superlative-scope.js.map +1 -1
  117. package/dist/detectors/team.d.ts +0 -6
  118. package/dist/detectors/team.d.ts.map +1 -1
  119. package/dist/detectors/team.js +17 -1
  120. package/dist/detectors/team.js.map +1 -1
  121. package/dist/detectors/token-shape.d.ts.map +1 -1
  122. package/dist/detectors/token-shape.js +8 -6
  123. package/dist/detectors/token-shape.js.map +1 -1
  124. package/dist/document.d.ts +3 -0
  125. package/dist/document.d.ts.map +1 -1
  126. package/dist/document.js +18 -3
  127. package/dist/document.js.map +1 -1
  128. package/dist/eval.js +1 -1
  129. package/dist/eval.js.map +1 -1
  130. package/dist/feedback/draft.js +1 -1
  131. package/dist/feedback/draft.js.map +1 -1
  132. package/dist/feedback/excerpt.d.ts +0 -1
  133. package/dist/feedback/excerpt.d.ts.map +1 -1
  134. package/dist/feedback/excerpt.js +2 -2
  135. package/dist/feedback/excerpt.js.map +1 -1
  136. package/dist/file-header.d.ts +20 -0
  137. package/dist/file-header.d.ts.map +1 -0
  138. package/dist/file-header.js +21 -0
  139. package/dist/file-header.js.map +1 -0
  140. package/dist/files.js +3 -3
  141. package/dist/files.js.map +1 -1
  142. package/dist/genre-check.js +1 -1
  143. package/dist/genre-check.js.map +1 -1
  144. package/dist/genre-load.d.ts +6 -0
  145. package/dist/genre-load.d.ts.map +1 -0
  146. package/dist/genre-load.js +22 -0
  147. package/dist/genre-load.js.map +1 -0
  148. package/dist/genre-parse.d.ts +40 -0
  149. package/dist/genre-parse.d.ts.map +1 -0
  150. package/dist/genre-parse.js +104 -0
  151. package/dist/genre-parse.js.map +1 -0
  152. package/dist/genre-suggest.d.ts +15 -0
  153. package/dist/genre-suggest.d.ts.map +1 -0
  154. package/dist/genre-suggest.js +26 -0
  155. package/dist/genre-suggest.js.map +1 -0
  156. package/dist/genre.d.ts +1 -1
  157. package/dist/genre.d.ts.map +1 -1
  158. package/dist/genre.js +3 -13
  159. package/dist/genre.js.map +1 -1
  160. package/dist/init-choice.d.ts +12 -0
  161. package/dist/init-choice.d.ts.map +1 -0
  162. package/dist/init-choice.js +41 -0
  163. package/dist/init-choice.js.map +1 -0
  164. package/dist/init.d.ts.map +1 -1
  165. package/dist/init.js +16 -5
  166. package/dist/init.js.map +1 -1
  167. package/dist/judge.d.ts +2 -1
  168. package/dist/judge.d.ts.map +1 -1
  169. package/dist/judge.js +1 -1
  170. package/dist/judge.js.map +1 -1
  171. package/dist/line-paragraphs.d.ts +4 -0
  172. package/dist/line-paragraphs.d.ts.map +1 -0
  173. package/dist/line-paragraphs.js +69 -0
  174. package/dist/line-paragraphs.js.map +1 -0
  175. package/dist/mask.d.ts.map +1 -1
  176. package/dist/mask.js +7 -6
  177. package/dist/mask.js.map +1 -1
  178. package/dist/plugin.d.ts +6 -0
  179. package/dist/plugin.d.ts.map +1 -1
  180. package/dist/profile/check.d.ts +28 -0
  181. package/dist/profile/check.d.ts.map +1 -0
  182. package/dist/profile/check.js +12 -0
  183. package/dist/profile/check.js.map +1 -0
  184. package/dist/profile/for-file.d.ts +2 -2
  185. package/dist/profile/for-file.d.ts.map +1 -1
  186. package/dist/profile/for-file.js +9 -2
  187. package/dist/profile/for-file.js.map +1 -1
  188. package/dist/profile/load.js +1 -1
  189. package/dist/profile/load.js.map +1 -1
  190. package/dist/profile/select.d.ts +4 -2
  191. package/dist/profile/select.d.ts.map +1 -1
  192. package/dist/profile/select.js +8 -3
  193. package/dist/profile/select.js.map +1 -1
  194. package/dist/quoted-span.d.ts +15 -3
  195. package/dist/quoted-span.d.ts.map +1 -1
  196. package/dist/quoted-span.js +16 -11
  197. package/dist/quoted-span.js.map +1 -1
  198. package/dist/reasons.d.ts +1 -0
  199. package/dist/reasons.d.ts.map +1 -1
  200. package/dist/reasons.js +4 -1
  201. package/dist/reasons.js.map +1 -1
  202. package/dist/render/compact.d.ts.map +1 -1
  203. package/dist/render/compact.js +1 -2
  204. package/dist/render/compact.js.map +1 -1
  205. package/dist/render/eval.d.ts.map +1 -1
  206. package/dist/render/eval.js +4 -3
  207. package/dist/render/eval.js.map +1 -1
  208. package/dist/render/friendly.d.ts +2 -1
  209. package/dist/render/friendly.d.ts.map +1 -1
  210. package/dist/render/friendly.js +14 -6
  211. package/dist/render/friendly.js.map +1 -1
  212. package/dist/render/genres.d.ts +5 -0
  213. package/dist/render/genres.d.ts.map +1 -0
  214. package/dist/render/genres.js +28 -0
  215. package/dist/render/genres.js.map +1 -0
  216. package/dist/render/plural.d.ts +3 -0
  217. package/dist/render/plural.d.ts.map +1 -0
  218. package/dist/render/plural.js +5 -0
  219. package/dist/render/plural.js.map +1 -0
  220. package/dist/render/rules-json.d.ts.map +1 -1
  221. package/dist/render/rules-json.js +9 -3
  222. package/dist/render/rules-json.js.map +1 -1
  223. package/dist/render/semantic.d.ts +3 -2
  224. package/dist/render/semantic.d.ts.map +1 -1
  225. package/dist/render/semantic.js +94 -34
  226. package/dist/render/semantic.js.map +1 -1
  227. package/dist/render/summary.d.ts.map +1 -1
  228. package/dist/render/summary.js +4 -3
  229. package/dist/render/summary.js.map +1 -1
  230. package/dist/render/suppressions.d.ts.map +1 -1
  231. package/dist/render/suppressions.js +3 -2
  232. package/dist/render/suppressions.js.map +1 -1
  233. package/dist/render/text.d.ts +2 -0
  234. package/dist/render/text.d.ts.map +1 -1
  235. package/dist/render/text.js +11 -3
  236. package/dist/render/text.js.map +1 -1
  237. package/dist/rule-load.d.ts.map +1 -1
  238. package/dist/rule-load.js +4 -1
  239. package/dist/rule-load.js.map +1 -1
  240. package/dist/run-semantic.js +1 -1
  241. package/dist/run-semantic.js.map +1 -1
  242. package/dist/run.d.ts +2 -0
  243. package/dist/run.d.ts.map +1 -1
  244. package/dist/run.js +25 -15
  245. package/dist/run.js.map +1 -1
  246. package/dist/sentence-shape.d.ts +0 -1
  247. package/dist/sentence-shape.d.ts.map +1 -1
  248. package/dist/sentence-shape.js +3 -5
  249. package/dist/sentence-shape.js.map +1 -1
  250. package/dist/setting-problems.d.ts +5 -0
  251. package/dist/setting-problems.d.ts.map +1 -0
  252. package/dist/setting-problems.js +15 -0
  253. package/dist/setting-problems.js.map +1 -0
  254. package/dist/structure/build.js +5 -5
  255. package/dist/structure/build.js.map +1 -1
  256. package/dist/structure/cite.js +1 -1
  257. package/dist/structure/cite.js.map +1 -1
  258. package/dist/structure/issues.d.ts.map +1 -1
  259. package/dist/structure/issues.js +5 -5
  260. package/dist/structure/issues.js.map +1 -1
  261. package/dist/structure/markdown-path.d.ts.map +1 -1
  262. package/dist/structure/markdown-path.js +2 -2
  263. package/dist/structure/markdown-path.js.map +1 -1
  264. package/dist/structure/numbering.d.ts.map +1 -1
  265. package/dist/structure/numbering.js +1 -1
  266. package/dist/structure/numbering.js.map +1 -1
  267. package/dist/structure/relative-find.js +1 -1
  268. package/dist/structure/relative-find.js.map +1 -1
  269. package/dist/structure/sexp.js +1 -1
  270. package/dist/structure/sexp.js.map +1 -1
  271. package/dist/structure/unnumbered.js +2 -2
  272. package/dist/structure/unnumbered.js.map +1 -1
  273. package/dist/team-names.d.ts +9 -0
  274. package/dist/team-names.d.ts.map +1 -0
  275. package/dist/team-names.js +34 -0
  276. package/dist/team-names.js.map +1 -0
  277. package/dist/ui.d.ts +2 -0
  278. package/dist/ui.d.ts.map +1 -1
  279. package/dist/ui.js +6 -0
  280. package/dist/ui.js.map +1 -1
  281. package/dist/version.js +1 -1
  282. package/dist/version.js.map +1 -1
  283. package/dist/watch.d.ts +2 -2
  284. package/dist/watch.d.ts.map +1 -1
  285. package/dist/watch.js +5 -5
  286. package/dist/watch.js.map +1 -1
  287. package/genres.yaml +363 -0
  288. package/package.json +4 -3
  289. package/rules/adverb-overuse.yaml +2 -2
  290. package/rules/agentless-passive.yaml +1 -1
  291. package/rules/ai-generated-composite.yaml +2 -2
  292. package/rules/ai-tell.yaml +2 -2
  293. package/rules/bold-density.yaml +2 -2
  294. package/rules/closing-cliche.yaml +1 -1
  295. package/rules/concrete-evidence-density.yaml +2 -2
  296. package/rules/contraction-consistency.yaml +1 -1
  297. package/rules/cushion-phrase-density.yaml +1 -1
  298. package/rules/dangling-reference.yaml +1 -1
  299. package/rules/date-order.yaml +1 -1
  300. package/rules/date-weekday-mismatch.yaml +1 -1
  301. package/rules/double-keigo.yaml +1 -1
  302. package/rules/doubled-word.yaml +1 -1
  303. package/rules/duplicate-definition.yaml +1 -1
  304. package/rules/emoji-density.yaml +1 -1
  305. package/rules/empty-conclusion.yaml +2 -1
  306. package/rules/empty-intensifier.yaml +1 -1
  307. package/rules/excessive-hedging.yaml +16 -6
  308. package/rules/expletive-construction.yaml +2 -2
  309. package/rules/heading-echo.yaml +1 -1
  310. package/rules/hiragana-fukushi.yaml +1 -1
  311. package/rules/internal-jargon.yaml +2 -2
  312. package/rules/latin-spacing.yaml +5 -4
  313. package/rules/max-kanji-continuous.yaml +4 -3
  314. package/rules/max-paragraph-length.yaml +9 -2
  315. package/rules/max-sentence-length.yaml +14 -2
  316. package/rules/ngram-repetition.yaml +4 -4
  317. package/rules/no-doubled-joshi.yaml +2 -2
  318. package/rules/no-em-dash.yaml +2 -2
  319. package/rules/no-mixed-desumasu.yaml +1 -1
  320. package/rules/no-nakaguro-parallel.yaml +2 -2
  321. package/rules/numbering-gap.yaml +1 -1
  322. package/rules/oxford-comma-consistency.yaml +2 -1
  323. package/rules/padded-intro.yaml +2 -1
  324. package/rules/paragraph-length-variance.yaml +1 -1
  325. package/rules/preamble-length.yaml +2 -2
  326. package/rules/preferred-term.yaml +1 -1
  327. package/rules/proper-noun-density.yaml +3 -2
  328. package/rules/repeated-conjunction.yaml +2 -2
  329. package/rules/repeated-sentence-head.yaml +2 -2
  330. package/rules/required-sections.yaml +1 -1
  331. package/rules/rule-of-three.yaml +2 -2
  332. package/rules/sasete-itadaku.yaml +3 -3
  333. package/rules/section-length-uniformity.yaml +1 -1
  334. package/rules/sentence-initial-conjunction-run.yaml +2 -2
  335. package/rules/sentence-rhythm.yaml +1 -1
  336. package/rules/taigen-dome-in-prose.yaml +2 -2
  337. package/rules/title-case-consistency.yaml +1 -1
  338. package/rules/total-mismatch.yaml +1 -1
  339. package/rules/undefined-acronym.yaml +4 -4
  340. package/rules/unqualified-superlative.yaml +2 -2
  341. package/skills/chaff/SKILL.md +28 -9
  342. package/src/address-chain.ts +1 -1
  343. package/src/backends/anthropic.ts +5 -1
  344. package/src/backends/openai.ts +2 -1
  345. package/src/backends/types.ts +3 -2
  346. package/src/baseline.ts +1 -1
  347. package/src/calendar-number.ts +75 -0
  348. package/src/cli-args.ts +2 -2
  349. package/src/cli-text.ts +29 -15
  350. package/src/cli.ts +42 -41
  351. package/src/commands/cite.ts +4 -4
  352. package/src/commands/eval.ts +1 -1
  353. package/src/commands/init-ask.ts +53 -0
  354. package/src/commands/test.ts +102 -45
  355. package/src/commands/tree.ts +7 -6
  356. package/src/config/by-path.ts +8 -9
  357. package/src/config/load.ts +24 -0
  358. package/src/config/name-problems.ts +15 -0
  359. package/src/date-stamp.ts +1 -1
  360. package/src/detectors/char-shape.ts +21 -9
  361. package/src/detectors/en-shape.ts +106 -8
  362. package/src/detectors/enumerated-runs.ts +3 -2
  363. package/src/detectors/gram-place.ts +1 -1
  364. package/src/detectors/heading-case.ts +4 -1
  365. package/src/detectors/index.ts +4 -3
  366. package/src/detectors/lettered-index.ts +78 -0
  367. package/src/detectors/lexicon.ts +63 -6
  368. package/src/detectors/orthography.ts +31 -7
  369. package/src/detectors/phrase-match.ts +23 -12
  370. package/src/detectors/repeated-head.ts +3 -4
  371. package/src/detectors/signals.ts +15 -6
  372. package/src/detectors/stacked-hedge.ts +93 -0
  373. package/src/detectors/superlative-amount.ts +24 -0
  374. package/src/detectors/superlative-clause.ts +82 -0
  375. package/src/detectors/superlative-scope.ts +3 -3
  376. package/src/detectors/team.ts +18 -2
  377. package/src/detectors/token-shape.ts +8 -10
  378. package/src/document.ts +29 -3
  379. package/src/eval.ts +1 -1
  380. package/src/feedback/draft.ts +1 -1
  381. package/src/feedback/excerpt.ts +2 -2
  382. package/src/file-header.ts +31 -0
  383. package/src/files.ts +3 -3
  384. package/src/genre-check.ts +1 -1
  385. package/src/genre-load.ts +24 -0
  386. package/src/genre-parse.ts +126 -0
  387. package/src/genre-suggest.ts +37 -0
  388. package/src/genre.ts +4 -13
  389. package/src/init-choice.ts +47 -0
  390. package/src/init.ts +20 -6
  391. package/src/judge.ts +3 -1
  392. package/src/line-paragraphs.ts +83 -0
  393. package/src/mask.ts +5 -6
  394. package/src/plugin.ts +6 -0
  395. package/src/profile/check.ts +34 -0
  396. package/src/profile/for-file.ts +10 -3
  397. package/src/profile/load.ts +1 -1
  398. package/src/profile/select.ts +11 -4
  399. package/src/quoted-span.ts +26 -12
  400. package/src/reasons.ts +5 -1
  401. package/src/render/compact.ts +1 -3
  402. package/src/render/eval.ts +4 -3
  403. package/src/render/friendly.ts +21 -6
  404. package/src/render/genres.ts +31 -0
  405. package/src/render/plural.ts +6 -0
  406. package/src/render/rules-json.ts +10 -3
  407. package/src/render/semantic.ts +117 -34
  408. package/src/render/summary.ts +4 -3
  409. package/src/render/suppressions.ts +3 -2
  410. package/src/render/text.ts +18 -3
  411. package/src/rule-load.ts +6 -1
  412. package/src/run-semantic.ts +1 -1
  413. package/src/run.ts +28 -15
  414. package/src/sentence-shape.ts +3 -7
  415. package/src/setting-problems.ts +24 -0
  416. package/src/structure/build.ts +5 -5
  417. package/src/structure/cite.ts +1 -1
  418. package/src/structure/issues.ts +6 -5
  419. package/src/structure/markdown-path.ts +2 -2
  420. package/src/structure/numbering.ts +1 -1
  421. package/src/structure/relative-find.ts +1 -1
  422. package/src/structure/sexp.ts +1 -1
  423. package/src/structure/unnumbered.ts +2 -2
  424. package/src/team-names.ts +39 -0
  425. package/src/ui.ts +7 -0
  426. package/src/version.ts +1 -1
  427. package/src/watch.ts +5 -5
package/genres.yaml ADDED
@@ -0,0 +1,363 @@
1
+ # The genres chaff knows, in the order `chaff genres` lists them.
2
+ #
3
+ # A genre is a preset: pick the kind of document and chaff checks it the way that kind is written.
4
+ # rules: the level a rule runs at for this genre (strict / normal / relaxed / off), under chaff.yaml's rules.
5
+ # A group's rules apply to every genre in it; a genre's own rules win over its group's.
6
+ # A rule turned off here is listed under "did not run" with the genre as the reason.
7
+ # profile: the document profile (profiles/*.yaml) this genre reads with, when chaff.yaml names none.
8
+ # Which genres a rule applies to at all is the rule's use_for; the numbers behind a level are the rule's by_genre.
9
+
10
+ groups:
11
+ - id: technical
12
+ name: { ja: 技術文書, en: Technical }
13
+ - id: blog
14
+ name: { ja: ブログ, en: Blog }
15
+ - id: business
16
+ name: { ja: ビジネス文書, en: Business }
17
+ # Legal drafting repeats its terms and its sentence heads on purpose, puts the actor in the passive
18
+ # (shall be deemed), and joins long noun compounds (個人情報取扱事業者). Those rules would only flag the form.
19
+ - id: legal
20
+ name: { ja: 法務, en: Legal }
21
+ rules:
22
+ agentless-passive: off
23
+ max-kanji-continuous: off
24
+ no-doubled-joshi: off
25
+ ngram-repetition: off
26
+ repeated-sentence-head: off
27
+ heading-echo: off
28
+ taigen-dome-in-prose: off
29
+ unqualified-superlative: off
30
+ excessive-hedging: off
31
+ proper-noun-density: off
32
+ expletive-construction: off
33
+ adverb-overuse: off
34
+ concrete-evidence-density: off
35
+ closing-cliche: off
36
+ padded-intro: off
37
+ preamble-length: off
38
+ cushion-phrase-density: off
39
+ sasete-itadaku: off
40
+ sentence-rhythm: off
41
+ rule-of-three: off
42
+ section-length-uniformity: off
43
+ paragraph-length-variance: off
44
+ ai-tell: off
45
+ ai-generated-composite: off
46
+ # A help page repeats its heading in its first line (To upload a file, ...) and states no claims to back up.
47
+ - id: docs
48
+ name: { ja: 説明書, en: Documentation }
49
+ rules:
50
+ heading-echo: off
51
+ agentless-passive: off
52
+ concrete-evidence-density: off
53
+ preamble-length: off
54
+ proper-noun-density: off
55
+ unqualified-superlative: off
56
+ expletive-construction: off
57
+ adverb-overuse: off
58
+ cushion-phrase-density: off
59
+ double-keigo: off
60
+ sasete-itadaku: off
61
+ sentence-initial-conjunction-run: off
62
+ closing-cliche: off
63
+ padded-intro: off
64
+ sentence-rhythm: off
65
+ rule-of-three: off
66
+ section-length-uniformity: off
67
+ paragraph-length-variance: off
68
+ ai-tell: off
69
+ ai-generated-composite: off
70
+ # Science writes in the passive, hedges its claims on purpose (may, suggest) and cites numbers as its evidence.
71
+ - id: academic
72
+ name: { ja: 学術, en: Academic }
73
+ rules:
74
+ agentless-passive: off
75
+ excessive-hedging: off
76
+ expletive-construction: off
77
+ concrete-evidence-density: off
78
+ proper-noun-density: off
79
+ adverb-overuse: off
80
+ closing-cliche: off
81
+ padded-intro: off
82
+ preamble-length: off
83
+ cushion-phrase-density: off
84
+ sasete-itadaku: off
85
+ double-keigo: off
86
+ sentence-rhythm: off
87
+ rule-of-three: off
88
+ section-length-uniformity: off
89
+ paragraph-length-variance: off
90
+ # Length, rhythm, repetition and register are the author's choices in literature, and dialogue mixes styles.
91
+ # Only what one work can hold itself to runs: consistent spacing and commas, and numbering without gaps.
92
+ - id: literature
93
+ name: { ja: 文学, en: Literature }
94
+ rules:
95
+ max-sentence-length: off
96
+ max-paragraph-length: off
97
+ ngram-repetition: off
98
+ repeated-sentence-head: off
99
+ heading-echo: off
100
+ empty-intensifier: off
101
+ no-doubled-joshi: off
102
+ no-nakaguro-parallel: off
103
+ taigen-dome-in-prose: off
104
+ max-kanji-continuous: off
105
+ hiragana-fukushi: off
106
+ no-mixed-desumasu: off
107
+ contraction-consistency: off
108
+ doubled-word: off
109
+ agentless-passive: off
110
+ expletive-construction: off
111
+ excessive-hedging: off
112
+ unqualified-superlative: off
113
+ adverb-overuse: off
114
+ sentence-initial-conjunction-run: off
115
+ repeated-conjunction: off
116
+ undefined-acronym: off
117
+ proper-noun-density: off
118
+ concrete-evidence-density: off
119
+ closing-cliche: off
120
+ padded-intro: off
121
+ preamble-length: off
122
+ cushion-phrase-density: off
123
+ sasete-itadaku: off
124
+ double-keigo: off
125
+ no-em-dash: off
126
+ emoji-density: off
127
+ sentence-rhythm: off
128
+ rule-of-three: off
129
+ section-length-uniformity: off
130
+ paragraph-length-variance: off
131
+ ai-tell: off
132
+ ai-generated-composite: off
133
+ dangling-reference: off
134
+ duplicate-definition: off
135
+ date-order: off
136
+ date-weekday-mismatch: off
137
+ total-mismatch: off
138
+ # A speech opens with greetings and closes with thanks: that is its form, not padding.
139
+ - id: speech
140
+ name: { ja: 話し言葉, en: Speech }
141
+ rules:
142
+ agentless-passive: off
143
+ preamble-length: off
144
+ padded-intro: off
145
+ closing-cliche: off
146
+ concrete-evidence-density: off
147
+ proper-noun-density: off
148
+ sentence-rhythm: off
149
+ rule-of-three: off
150
+ section-length-uniformity: off
151
+ paragraph-length-variance: off
152
+
153
+ genres:
154
+ - id: technical/spec
155
+ name: { ja: 仕様書, en: Specification }
156
+ summary:
157
+ ja: 仕様書・RFC・設計文書。読み手に間違えさせないための文書
158
+ en: Specifications, RFCs and design documents, written so the reader cannot get it wrong
159
+ - id: technical/readme
160
+ name: { ja: README・技術文書, en: README and technical docs }
161
+ summary:
162
+ ja: README と開発者向けの説明
163
+ en: READMEs and documentation for developers
164
+ - id: blog/tech
165
+ name: { ja: 技術ブログ, en: Tech blog }
166
+ summary:
167
+ ja: 技術記事。ジャンルを決めないときはこれで見ます
168
+ en: Technical articles; the genre used when none is set
169
+ - id: blog/essay
170
+ name: { ja: エッセイ(ブログ), en: Blog essay }
171
+ summary:
172
+ ja: 自分の考えを書くブログのエッセイ
173
+ en: Personal essays posted on a blog
174
+ - id: blog/owned-media
175
+ name: { ja: オウンドメディア, en: Owned media }
176
+ summary:
177
+ ja: 会社や団体が読者に向けて出す記事
178
+ en: Articles an organisation publishes for its readers
179
+ - id: business/proposal
180
+ name: { ja: 提案書・企画書, en: Proposal }
181
+ summary:
182
+ ja: 提案書・企画書・計画書
183
+ en: Proposals, plans and pitches
184
+ - id: business/report
185
+ name: { ja: 報告書, en: Report }
186
+ summary:
187
+ ja: 報告書・白書・社内文書
188
+ en: Reports, white papers and internal documents
189
+ - id: business/email
190
+ name: { ja: メール・手紙, en: Email and letter }
191
+ summary:
192
+ ja: 仕事のメールと手紙
193
+ en: Work email and letters
194
+ - id: business/press-release
195
+ name: { ja: プレスリリース・お知らせ, en: Press release and notice }
196
+ summary:
197
+ ja: プレスリリースと、お知らせ
198
+ en: Press releases and public notices
199
+ - id: business/meeting-notes
200
+ name: { ja: 議事録, en: Meeting notes }
201
+ summary:
202
+ ja: 議事録・議事要旨
203
+ en: Minutes and meeting notes
204
+ - id: legal/contract
205
+ name: { ja: 契約書・規約, en: Contract and terms }
206
+ summary:
207
+ ja: 契約書・利用規約・プライバシーポリシー
208
+ en: Contracts, terms of service and privacy policies
209
+ suggest:
210
+ paths: ["(^|/)(contracts?|agreements?|terms|tos|nda|keiyaku|kiyaku)(/|[-_.])", "(^|/)privacy[-_]?policy[-_.]"]
211
+ ja: { line: "本契約|本規約|本ポリシー|以下「(?:甲|乙|丙)」|^#{1,6}\\s*(?:プライバシーポリシー|個人情報保護方針|利用規約|契約書)", min_lines: 2 }
212
+ en:
213
+ {
214
+ line: "\\b(?:[Tt]his Agreement|[Tt]hese Terms|[Tt]his (?:Privacy )?Policy|the Parties)\\b|^#{1,6}\\s*(?:Terms of (?:Service|Use)|Privacy Policy)\\b",
215
+ min_lines: 3,
216
+ }
217
+ # A contract is read clause by clause against its own numbers, definitions and dates: these are its mistakes.
218
+ rules:
219
+ numbering-gap: normal
220
+ duplicate-definition: normal
221
+ dangling-reference: normal
222
+ date-weekday-mismatch: normal
223
+ total-mismatch: normal
224
+ - id: legal/statute
225
+ name: { ja: 法令・規程, en: Statute and regulation }
226
+ summary:
227
+ ja: 法令・規則・社内規程・通達
228
+ en: Statutes, regulations and internal rules
229
+ profile: statute
230
+ # Also suggested when the content has the statute profile's shape.
231
+ suggest:
232
+ paths: ["(^|/)(laws?|statutes?|regulations?|kitei|kisoku)(/|[-_.])"]
233
+ ja: { line: "(?:この|本)(?:法律|政令|省令|府令|規則|規程|条例|定款|通達)", min_lines: 2 }
234
+ en: { line: "\\b(?:[Tt]his (?:Act|[Pp]art|[Ss]ubpart|[Rr]egulation)|[Tt]hese [Rr]egulations)\\b|^§\\s?\\d", min_lines: 3 }
235
+ - id: legal/judgment
236
+ name: { ja: 判決, en: Court decision }
237
+ summary:
238
+ ja: 判決文・決定
239
+ en: Court judgments and opinions
240
+ suggest:
241
+ ja: { line: "^(?:#{1,6}\\s*)?(?:主\\s*文|理\\s*由|判\\s*決)\\s*$", min_lines: 2 }
242
+ en: { line: "delivered the opinion of the Court|^(?:Reversed|Affirmed)\\.?$", min_lines: 1 }
243
+ - id: legal/patent
244
+ name: { ja: 特許明細書, en: Patent }
245
+ summary:
246
+ ja: 特許の明細書と請求項
247
+ en: Patent specifications and claims
248
+ suggest:
249
+ ja: { line: "【(?:課題|解決手段|請求項[0-90-9]+|選択図|技術分野|背景技術|発明の詳細な説明|特許請求の範囲)】", min_lines: 2 }
250
+ en: { line: "^#{1,6}\\s*(?:BACKGROUND OF THE INVENTION|SUMMARY OF THE INVENTION|Claims\\b)|\\bof claim \\d+", min_lines: 3 }
251
+ - id: docs/manual
252
+ name: { ja: マニュアル・手順書, en: Manual and how-to }
253
+ summary:
254
+ ja: 使い方の説明・手順書・ヘルプ
255
+ en: User guides, how-to pages and help
256
+ suggest:
257
+ paths: ["(^|/)(manuals?|guides?|how-?tos?|help|tutorials?|user-?guides?)(/|[-_.])"]
258
+ ja: { line: "^#{1,6}\\s.*(?:手順|操作方法|設定方法)", min_lines: 2 }
259
+ en: { line: "^#{1,6}\\s*(?:Steps?\\b|Step \\d|Prerequisites|Before you begin|Troubleshooting)", min_lines: 2 }
260
+ - id: docs/faq
261
+ name: { ja: よくある質問, en: FAQ }
262
+ summary:
263
+ ja: 問いと答えを並べたページ
264
+ en: Pages of questions and answers
265
+ suggest:
266
+ paths: ["(^|[/_-])(faqs?|q-?and-?a)([/_.-]|$)"]
267
+ ja: { line: "^(?:#{1,6}\\s*)?(?:[QQ][0-90-9]*[..::、\\s ]|問[0-90-9]+[..::\\s ])|^#{1,6}\\s*(?:よくある(?:ご)?質問|Q&A|Q&A)", min_lines: 2 }
268
+ en: { line: "^(?:#{1,6}\\s*)?Q[0-9]*[.:)]\\s|^#{1,6}\\s*(?:FAQs?|Frequently asked questions)\\b", min_lines: 2 }
269
+ - id: docs/glossary
270
+ name: { ja: 用語集, en: Glossary }
271
+ summary:
272
+ ja: 用語と、その説明を並べたページ
273
+ en: Lists of terms and what they mean
274
+ suggest:
275
+ paths: ["(^|/)(glossary|glossaries|yogo|用語集)(/|[-_.])"]
276
+ ja: { line: "^#{1,6}\\s*用語集", min_lines: 1 }
277
+ en: { line: "^#{1,6}\\s*Glossary\\b", min_lines: 1 }
278
+ - id: academic/paper
279
+ name: { ja: 論文, en: Academic paper }
280
+ summary:
281
+ ja: 論文と、その要旨
282
+ en: Papers and abstracts
283
+ suggest:
284
+ paths: ["(^|/)(papers?|ronbun)(/|[-_.])"]
285
+ ja: { line: "^(?:#{1,6}\\s*)?(?:要旨|抄録|参考文献|引用文献|謝辞)\\s*(?:[((].*)?$", min_lines: 2 }
286
+ en:
287
+ {
288
+ line: "^(?:#{1,6}\\s*)?(?:\\d+\\.?\\s+)?(?:Abstract|Keywords|Methods?|Methodology|Results|Discussion|Conclusions?|Related [Ww]ork|Bibliography|References)\\s*$",
289
+ min_lines: 4,
290
+ }
291
+ - id: literature/fiction
292
+ name: { ja: 小説, en: Fiction }
293
+ summary:
294
+ ja: 小説・物語
295
+ en: Novels and stories
296
+ suggest:
297
+ paths: ["(^|/)(novels?|fiction|stories|shosetsu)(/|[-_.])"]
298
+ - id: literature/essay
299
+ name: { ja: 随筆, en: Literary essay }
300
+ summary:
301
+ ja: 文学としての随筆。ブログのエッセイは blog/essay
302
+ en: Literary essays; a blog essay is blog/essay
303
+ - id: literature/poetry
304
+ name: { ja: 詩歌, en: Poetry }
305
+ summary:
306
+ ja: 詩・短歌・俳句
307
+ en: Poems and verse
308
+ suggest:
309
+ paths: ["(^|/)(poems?|poetry|tanka|haiku)(/|[-_.])"]
310
+ - id: literature/play
311
+ name: { ja: 戯曲・脚本, en: Play and script }
312
+ summary:
313
+ ja: 戯曲・脚本
314
+ en: Plays and scripts
315
+ suggest:
316
+ paths: ["(^|/)(plays?|screenplays?|kyakuhon)(/|[-_.])"]
317
+ en: { line: "^[A-Z][A-Z '-]{2,}\\.$", min_lines: 10 }
318
+ - id: speech/address
319
+ name: { ja: スピーチ・挨拶, en: Speech }
320
+ summary:
321
+ ja: 読み上げるために書いた演説・挨拶
322
+ en: Speeches and addresses written to be read aloud
323
+ suggest:
324
+ paths: ["(^|/)(speech(es)?|addresses)(/|[-_.])"]
325
+ ja: { line: "^(?:議長|御列席の皆様|ご列席の皆様|皆様|皆さん)、|ご清聴(?:いただき)?ありがとうございました", min_lines: 2 }
326
+ en: { line: "^(?:Mr\\.|Madam) (?:President|Speaker|Chair(?:man)?),|^Ladies and gentlemen,|Thank you for (?:your attention|listening)", min_lines: 2 }
327
+ - id: speech/transcript
328
+ name: { ja: 発言録, en: Transcript }
329
+ summary:
330
+ ja: 話したことを書き起こした記録(会見・国会の会議録)
331
+ en: Verbatim records of what was said (press conferences, parliamentary debates)
332
+ suggest:
333
+ paths: ["(^|/)(transcripts?|kaigiroku)(/|[-_.])"]
334
+ ja: { line: "^○[^ \\s]{1,30} |^((?:問|答))|^【(?:記者|大臣|質問|回答)】", min_lines: 3 }
335
+ en: { line: "^(?:Mr|Ms|Mrs|Dr)\\. [A-Z][A-Z-]{2,}(?: of [A-Z][a-z]+)?\\. ", min_lines: 3 }
336
+ # A transcript records what was said: its sentences, repeats and register are the speaker's, not the writer's to fix.
337
+ rules:
338
+ max-sentence-length: off
339
+ max-paragraph-length: off
340
+ ngram-repetition: off
341
+ repeated-sentence-head: off
342
+ heading-echo: off
343
+ empty-intensifier: off
344
+ no-doubled-joshi: off
345
+ no-nakaguro-parallel: off
346
+ taigen-dome-in-prose: off
347
+ max-kanji-continuous: off
348
+ hiragana-fukushi: off
349
+ no-mixed-desumasu: off
350
+ contraction-consistency: off
351
+ doubled-word: off
352
+ sasete-itadaku: off
353
+ double-keigo: off
354
+ cushion-phrase-density: off
355
+ excessive-hedging: off
356
+ unqualified-superlative: off
357
+ expletive-construction: off
358
+ adverb-overuse: off
359
+ sentence-initial-conjunction-run: off
360
+ repeated-conjunction: off
361
+ undefined-acronym: off
362
+ ai-tell: off
363
+ ai-generated-composite: off
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chaffjs",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Prose validation harness. Finds what is hard to read, and never rewrites it for you.",
5
5
  "keywords": [
6
6
  "chaff",
@@ -40,6 +40,7 @@
40
40
  "README.md",
41
41
  "bin",
42
42
  "dist",
43
+ "genres.yaml",
43
44
  "profiles",
44
45
  "rules",
45
46
  "skills",
@@ -54,8 +55,8 @@
54
55
  },
55
56
  "dependencies": {
56
57
  "@anthropic-ai/sdk": "^0.125.0",
57
- "@chaffjs/lang-en": "0.13.0",
58
- "@chaffjs/lang-ja": "0.14.0",
58
+ "@chaffjs/lang-en": "0.14.0",
59
+ "@chaffjs/lang-ja": "0.15.0",
59
60
  "mdast-util-from-markdown": "^2.0.3",
60
61
  "mdast-util-frontmatter": "^2.0.1",
61
62
  "mdast-util-gfm-table": "^2.0.0",
@@ -16,7 +16,7 @@ why:
16
16
 
17
17
  message:
18
18
  ja: 1000 語あたり {density} 個の -ly 副詞があります({limit} 個まで)
19
- en: "{density} -ly adverbs per 1000 words (limit {limit})"
19
+ en: "{density} -ly {density|adverb|adverbs} per 1000 words (limit {limit})"
20
20
 
21
21
  how_to_fix:
22
22
  ja: 副詞ごと動詞に畳んでください。"said loudly" を "shouted" に。
@@ -25,4 +25,4 @@ how_to_fix:
25
25
  # 1000 語あたりの個数。件数で数えると長い文書ほど当たる(bold-density と同じ)。
26
26
  levels: { strict: 10, normal: 15, relaxed: 25 }
27
27
 
28
- use_for: [blog, business]
28
+ use_for: [blog, business, legal, docs, academic, literature, speech]
@@ -25,4 +25,4 @@ how_to_fix:
25
25
  # 1 文に受け身がいくつまで許されるか。1 は「1 つでも指摘する」。
26
26
  levels: { strict: 1, normal: 1, relaxed: 2 }
27
27
 
28
- use_for: [business]
28
+ use_for: [business, legal, docs, academic, literature, speech]
@@ -24,7 +24,7 @@ why:
24
24
 
25
25
  message:
26
26
  ja: 「{word}」が同じ文書にそろっています({count} 種、{limit} 種から)
27
- en: '"{word}" occur together in this document ({count} signals, {limit} needed)'
27
+ en: '"{word}" {count|occurs|occur together} in this document ({count} {count|signal|signals}, {limit} needed)'
28
28
 
29
29
  how_to_fix:
30
30
  ja: 自分が書きたかったことが残っているか、通して読み直してください。個々の指摘を 1 つずつ直すより、段落ごと書き直すほうが早いことがあります。
@@ -33,4 +33,4 @@ how_to_fix:
33
33
  # 何種そろったら出すか。spec §20.2 は 3。
34
34
  levels: { strict: 2, normal: 3, relaxed: 5 }
35
35
 
36
- use_for: [blog, business]
36
+ use_for: [blog, business, legal, docs, academic, literature, speech]
@@ -16,7 +16,7 @@ why:
16
16
 
17
17
  message:
18
18
  ja: 「{word}」が揃っています(点 {density}、{limit} まで)
19
- en: '"{word}" appear together (score {density}, limit {limit})'
19
+ en: '"{word}" {count|appears|appear together} (score {density}, limit {limit})'
20
20
 
21
21
  how_to_fix:
22
22
  ja: 自分の言葉に置き換えてください。置き換えられないなら、その段落は無くても通るかもしれません。
@@ -25,4 +25,4 @@ how_to_fix:
25
25
  # 重みの合計を 10 倍した点。0.9 の言い回しが 2 つで 18。
26
26
  levels: { strict: 10, normal: 18, relaxed: 30 }
27
27
 
28
- use_for: [blog, business]
28
+ use_for: [blog, business, legal, docs, academic, literature, speech]
@@ -14,7 +14,7 @@ why:
14
14
 
15
15
  message:
16
16
  ja: このセクションは {chars} 字に太字が {bolds} 箇所あります(1000 字あたり {limit} 箇所まで)
17
- en: "{bolds} bold spans in {chars} characters (limit {limit} per 1000)"
17
+ en: "{bolds} bold {bolds|span|spans} in {chars} {chars|character|characters} (limit {limit} per 1000)"
18
18
 
19
19
  how_to_fix:
20
20
  ja: 本当に強調したい 1〜2 箇所だけ残して、ほかは普通の文にしてください。
@@ -27,4 +27,4 @@ levels:
27
27
  normal: 20
28
28
  relaxed: 40
29
29
 
30
- use_for: [blog, business, technical]
30
+ use_for: [blog, business, technical, legal, docs, academic, literature, speech]
@@ -28,4 +28,4 @@ levels:
28
28
  normal: 1
29
29
  relaxed: 2
30
30
 
31
- use_for: [blog]
31
+ use_for: [blog, legal, docs, academic, literature, speech]
@@ -16,7 +16,7 @@ why:
16
16
 
17
17
  message:
18
18
  ja: 「{word}」の節に数値もコードもリンクもありません(そういう節が {count}/{total})
19
- en: 'Section "{word}" has no number, code or link ({count} of {total} sections)'
19
+ en: 'Section "{word}" has no number, code or link ({count} of {total} {total|section|sections})'
20
20
 
21
21
  how_to_fix:
22
22
  ja: 実例を 1 つ足してください。書けないなら、その節は他の節に畳めるかもしれません。
@@ -24,4 +24,4 @@ how_to_fix:
24
24
 
25
25
  levels: { strict: 1, normal: 3, relaxed: 6 }
26
26
 
27
- use_for: [blog, business]
27
+ use_for: [blog, business, legal, docs, academic, literature, speech]
@@ -25,4 +25,4 @@ how_to_fix:
25
25
  # 少数派が何種までなら「混在」と見るか。これを超えたら混在ではなく、そういう文体。
26
26
  levels: { strict: 4, normal: 2, relaxed: 1 }
27
27
 
28
- use_for: [blog, business, technical]
28
+ use_for: [blog, business, technical, legal, docs, academic, literature, speech]
@@ -24,4 +24,4 @@ how_to_fix:
24
24
 
25
25
  levels: { strict: 2, normal: 5, relaxed: 10 }
26
26
 
27
- use_for: [business]
27
+ use_for: [business, legal, docs, academic, literature, speech]
@@ -24,4 +24,4 @@ how_to_fix:
24
24
  # 何件あれば指摘するか。1 は「1 件でもあれば」。
25
25
  levels: { strict: 1, normal: 1, relaxed: 1 }
26
26
 
27
- use_for: [business, technical, blog]
27
+ use_for: [business, technical, blog, legal, docs, academic, literature, speech]
@@ -23,4 +23,4 @@ how_to_fix:
23
23
 
24
24
  levels: { strict: 1, normal: 1, relaxed: 1 }
25
25
 
26
- use_for: [business, technical, blog]
26
+ use_for: [business, technical, blog, legal, docs, academic, literature, speech]
@@ -23,4 +23,4 @@ how_to_fix:
23
23
 
24
24
  levels: { strict: 1, normal: 1, relaxed: 1 }
25
25
 
26
- use_for: [business, technical, blog]
26
+ use_for: [business, technical, blog, legal, docs, academic, literature, speech]
@@ -25,4 +25,4 @@ how_to_fix:
25
25
 
26
26
  levels: { strict: 1, normal: 1, relaxed: 2 }
27
27
 
28
- use_for: [business]
28
+ use_for: [business, legal, docs, academic, literature, speech]
@@ -24,4 +24,4 @@ how_to_fix:
24
24
 
25
25
  levels: { strict: 1, normal: 1, relaxed: 1 }
26
26
 
27
- use_for: [blog, business, technical]
27
+ use_for: [blog, business, technical, legal, docs, academic, literature, speech]
@@ -23,4 +23,4 @@ how_to_fix:
23
23
 
24
24
  levels: { strict: 1, normal: 1, relaxed: 1 }
25
25
 
26
- use_for: [business, technical, blog]
26
+ use_for: [business, technical, blog, legal, docs, academic, literature, speech]
@@ -23,4 +23,4 @@ how_to_fix:
23
23
  # 1000 語あたりの個数。件数で数えると長い文書ほど当たる。
24
24
  levels: { strict: 3, normal: 8, relaxed: 20 }
25
25
 
26
- use_for: [blog, business, technical]
26
+ use_for: [blog, business, technical, legal, docs, academic, literature, speech]
@@ -34,4 +34,5 @@ levels:
34
34
  normal: warning
35
35
  relaxed: info
36
36
 
37
- use_for: [blog]
37
+ # メール・議事録・プレスリリースの結びは挨拶か連絡先で、判断を書く所ではない。
38
+ use_for: [blog, business/report, business/proposal]
@@ -27,4 +27,4 @@ levels:
27
27
  normal: 1
28
28
  relaxed: 3
29
29
 
30
- use_for: [blog, business, technical]
30
+ use_for: [blog, business, technical, legal, docs, academic, literature, speech]
@@ -1,8 +1,11 @@
1
1
  id: excessive-hedging
2
2
  layer: L2
3
3
  status: experimental
4
- how_to_find: hedging-density
4
+ how_to_find: hedging
5
5
  word_list: excessive-hedging
6
+ # 1 つの文の重なりを数えるときの、それだけでは逃げていない包む言い方(「という状況です」、may)と、
7
+ # 逃げの表現のうちどこで成り立つかを言うもの(「場合がある」、in some cases)。
8
+ extra_word_lists: [hedge-frame, hedge-scope]
6
9
  uses: [pos]
7
10
  severity: warning
8
11
 
@@ -11,17 +14,24 @@ name:
11
14
  en: Too much hedging
12
15
 
13
16
  why:
14
- ja: 断言を避けるほど、読み手は何が決まったのか分からなくなります。1 つなら慎重さですが、重なると誰も責任を取らない文書になります。
15
- en: The more the text avoids claiming, the less the reader can tell what was decided. One hedge is caution; many mean nobody is accountable.
17
+ ja: 断言を避けるほど、読み手は何が決まったのか分からなくなります。1 つなら慎重さですが、重なると誰も責任を取らない文書になります。chaff は 2 つの見方で探します。1 つの文に逃げを重ねたもの(「〜という状況であると考えられます」「〜かもしれないと思われます」)は、短い文書でも 1 文で指摘します。文書全体で逃げの表現が多すぎるものは、短い文書では測りません。重なりを数えるとき、鉤括弧や引用符で引いた発言の中の逃げは、話した人のものなので数えません。
18
+ en: The more the text avoids claiming, the less the reader can tell what was decided. One hedge is caution; many mean nobody is accountable. chaff looks two ways. A sentence that stacks hedges ("may possibly", "it could perhaps be argued") is reported on its own, even in a short document. Too many hedges across the whole document is measured only on longer documents. When counting hedges stacked in a sentence, a hedge inside a quotation is the speaker's, not the writer's, and is left out.
16
19
 
17
20
  message:
18
21
  ja: 「{matched}」など、逃げの表現が 1000 語あたり {density} 個あります({limit} 個まで)
19
22
  en: '"{matched}" and other hedges: {density} per 1000 words (limit {limit})'
20
23
 
24
+ # 1 つの文に重ねたもの。上の message は文書全体の密度。
25
+ messages:
26
+ stacked:
27
+ ja: この文は逃げの表現を {count} つ重ねています(「{matched}」)
28
+ en: 'This sentence stacks {count} hedges ("{matched}")'
29
+
21
30
  how_to_fix:
22
- ja: 言い切れるものは言い切ってください。言い切れないなら、何が分かれば言い切れるのかを書いてください。
23
- en: Commit where you can. Where you cannot, say what you would need to know.
31
+ ja: 言い切れるものは言い切ってください。言い切れないなら、何が分かれば言い切れるのかを書いてください。重ねた逃げは、1 つ残すか、全部外して言い切ってください。
32
+ en: Commit where you can. Where you cannot, say what you would need to know. Where hedges are stacked, keep one or drop them all and commit.
24
33
 
34
+ # 文書全体の、1000 語あたりの数の上限。1 つの文に 2 つ以上重ねたものは、どの段でも指摘する。
25
35
  levels: { strict: 3, normal: 6, relaxed: 12 }
26
36
 
27
- use_for: [business, blog, technical]
37
+ use_for: [business, blog, technical, legal, docs, academic, literature, speech]
@@ -16,7 +16,7 @@ why:
16
16
 
17
17
  message:
18
18
  ja: '"{word} is ..." の形が文書内に {count} 回あります({limit} 回まで)'
19
- en: '"{word} is ..." appears {count} times (limit {limit})'
19
+ en: '"{word} is ..." appears {count} {count|time|times} (limit {limit})'
20
20
 
21
21
  how_to_fix:
22
22
  ja: 主語を前に出してください。"There is a need to review" を "The board must review" に。
@@ -24,4 +24,4 @@ how_to_fix:
24
24
 
25
25
  levels: { strict: 1, normal: 3, relaxed: 6 }
26
26
 
27
- use_for: [blog, business]
27
+ use_for: [blog, business, legal, docs, academic, literature, speech]
@@ -27,4 +27,4 @@ levels:
27
27
  normal: 60
28
28
  relaxed: 75
29
29
 
30
- use_for: [blog, business, technical]
30
+ use_for: [blog, business, technical, legal, docs, academic, literature, speech]
@@ -25,4 +25,4 @@ how_to_fix:
25
25
 
26
26
  levels: { strict: 1, normal: 1, relaxed: 3 }
27
27
 
28
- use_for: [blog, business, technical]
28
+ use_for: [blog, business, technical, legal, docs, academic, literature, speech]
@@ -15,7 +15,7 @@ why:
15
15
 
16
16
  message:
17
17
  ja: 「{matched}」は社内でしか通じないかもしれません(そういう語が {count} 箇所)
18
- en: '"{matched}" may only be understood inside your team ({count} such words)'
18
+ en: '"{matched}" may only be understood inside your team ({count} such {count|word|words})'
19
19
 
20
20
  how_to_fix:
21
21
  ja: 初出のところで普通の言葉に言い換えるか、括弧で説明を添えてください。jargon には辞書形(握る)でも語幹(巻き取)でも書けますが、複合動詞は語幹のほうが確実です。
@@ -24,4 +24,4 @@ how_to_fix:
24
24
  # チームが並べた語なので、1 つでも指摘する。並べた時点で「使わない」と決めている。
25
25
  levels: { strict: 1, normal: 1, relaxed: 3 }
26
26
 
27
- use_for: [business, blog, technical]
27
+ use_for: [business, blog, technical, legal, docs, academic, literature, speech]