chaffjs 0.33.0 → 0.35.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 (802) hide show
  1. package/dist/api.d.ts +7 -1
  2. package/dist/api.d.ts.map +1 -1
  3. package/dist/api.js.map +1 -1
  4. package/dist/capitals-passage.d.ts +3 -0
  5. package/dist/capitals-passage.d.ts.map +1 -0
  6. package/dist/capitals-passage.js +26 -0
  7. package/dist/capitals-passage.js.map +1 -0
  8. package/dist/cli-text.d.ts.map +1 -1
  9. package/dist/cli-text.js +4 -2
  10. package/dist/cli-text.js.map +1 -1
  11. package/dist/coined-hyphen-name.d.ts +13 -0
  12. package/dist/coined-hyphen-name.d.ts.map +1 -0
  13. package/dist/coined-hyphen-name.js +21 -0
  14. package/dist/coined-hyphen-name.js.map +1 -0
  15. package/dist/commands/grade.d.ts.map +1 -1
  16. package/dist/commands/grade.js +66 -21
  17. package/dist/commands/grade.js.map +1 -1
  18. package/dist/company-kana-spelling.d.ts +6 -1
  19. package/dist/company-kana-spelling.d.ts.map +1 -1
  20. package/dist/company-kana-spelling.js +19 -2
  21. package/dist/company-kana-spelling.js.map +1 -1
  22. package/dist/company-name-ending.d.ts +7 -0
  23. package/dist/company-name-ending.d.ts.map +1 -0
  24. package/dist/company-name-ending.js +44 -0
  25. package/dist/company-name-ending.js.map +1 -0
  26. package/dist/company-names.d.ts +17 -4
  27. package/dist/company-names.d.ts.map +1 -1
  28. package/dist/company-names.js +49 -17
  29. package/dist/company-names.js.map +1 -1
  30. package/dist/custom/no-rewrite.d.ts +3 -0
  31. package/dist/custom/no-rewrite.d.ts.map +1 -0
  32. package/dist/custom/no-rewrite.js +3 -0
  33. package/dist/custom/no-rewrite.js.map +1 -0
  34. package/dist/custom/parse.d.ts.map +1 -1
  35. package/dist/custom/parse.js +14 -2
  36. package/dist/custom/parse.js.map +1 -1
  37. package/dist/detectors/acronym-context.d.ts +1 -1
  38. package/dist/detectors/acronym-context.d.ts.map +1 -1
  39. package/dist/detectors/acronym-context.js +4 -4
  40. package/dist/detectors/acronym-context.js.map +1 -1
  41. package/dist/detectors/acronym-definition.d.ts +13 -0
  42. package/dist/detectors/acronym-definition.d.ts.map +1 -0
  43. package/dist/detectors/acronym-definition.js +90 -0
  44. package/dist/detectors/acronym-definition.js.map +1 -0
  45. package/dist/detectors/acronym-lone.d.ts +13 -0
  46. package/dist/detectors/acronym-lone.d.ts.map +1 -0
  47. package/dist/detectors/acronym-lone.js +22 -0
  48. package/dist/detectors/acronym-lone.js.map +1 -0
  49. package/dist/detectors/acronym-name.d.ts +55 -0
  50. package/dist/detectors/acronym-name.d.ts.map +1 -0
  51. package/dist/detectors/acronym-name.js +75 -0
  52. package/dist/detectors/acronym-name.js.map +1 -0
  53. package/dist/detectors/age-words.d.ts +5 -0
  54. package/dist/detectors/age-words.d.ts.map +1 -0
  55. package/dist/detectors/age-words.js +8 -0
  56. package/dist/detectors/age-words.js.map +1 -0
  57. package/dist/detectors/annual-pay-mismatch.d.ts.map +1 -1
  58. package/dist/detectors/annual-pay-mismatch.js +2 -12
  59. package/dist/detectors/annual-pay-mismatch.js.map +1 -1
  60. package/dist/detectors/blank-structure.d.ts.map +1 -1
  61. package/dist/detectors/blank-structure.js +4 -3
  62. package/dist/detectors/blank-structure.js.map +1 -1
  63. package/dist/detectors/capitalised-term.d.ts +14 -2
  64. package/dist/detectors/capitalised-term.d.ts.map +1 -1
  65. package/dist/detectors/capitalised-term.js +115 -4
  66. package/dist/detectors/capitalised-term.js.map +1 -1
  67. package/dist/detectors/caps-caption.d.ts +11 -0
  68. package/dist/detectors/caps-caption.d.ts.map +1 -0
  69. package/dist/detectors/caps-caption.js +51 -0
  70. package/dist/detectors/caps-caption.js.map +1 -0
  71. package/dist/detectors/char-shape.d.ts.map +1 -1
  72. package/dist/detectors/char-shape.js +47 -18
  73. package/dist/detectors/char-shape.js.map +1 -1
  74. package/dist/detectors/clause-shape.d.ts +1 -1
  75. package/dist/detectors/clause-shape.d.ts.map +1 -1
  76. package/dist/detectors/clause-shape.js +9 -4
  77. package/dist/detectors/clause-shape.js.map +1 -1
  78. package/dist/detectors/closing-balance-mismatch.d.ts.map +1 -1
  79. package/dist/detectors/closing-balance-mismatch.js +1 -0
  80. package/dist/detectors/closing-balance-mismatch.js.map +1 -1
  81. package/dist/detectors/code-fences.d.ts +5 -0
  82. package/dist/detectors/code-fences.d.ts.map +1 -1
  83. package/dist/detectors/code-fences.js +9 -0
  84. package/dist/detectors/code-fences.js.map +1 -1
  85. package/dist/detectors/concrete-evidence.d.ts +13 -1
  86. package/dist/detectors/concrete-evidence.d.ts.map +1 -1
  87. package/dist/detectors/concrete-evidence.js +59 -0
  88. package/dist/detectors/concrete-evidence.js.map +1 -1
  89. package/dist/detectors/condition-toki.d.ts +16 -0
  90. package/dist/detectors/condition-toki.d.ts.map +1 -0
  91. package/dist/detectors/condition-toki.js +42 -0
  92. package/dist/detectors/condition-toki.js.map +1 -0
  93. package/dist/detectors/conjugated-entry.d.ts +17 -0
  94. package/dist/detectors/conjugated-entry.d.ts.map +1 -0
  95. package/dist/detectors/conjugated-entry.js +50 -0
  96. package/dist/detectors/conjugated-entry.js.map +1 -0
  97. package/dist/detectors/content-morphemes.d.ts +2 -0
  98. package/dist/detectors/content-morphemes.d.ts.map +1 -1
  99. package/dist/detectors/content-morphemes.js +1 -1
  100. package/dist/detectors/content-morphemes.js.map +1 -1
  101. package/dist/detectors/contraction-minority.d.ts +11 -0
  102. package/dist/detectors/contraction-minority.d.ts.map +1 -0
  103. package/dist/detectors/contraction-minority.js +10 -0
  104. package/dist/detectors/contraction-minority.js.map +1 -0
  105. package/dist/detectors/counter-edge.d.ts +5 -0
  106. package/dist/detectors/counter-edge.d.ts.map +1 -1
  107. package/dist/detectors/counter-edge.js +23 -0
  108. package/dist/detectors/counter-edge.js.map +1 -1
  109. package/dist/detectors/cross-facts.d.ts.map +1 -1
  110. package/dist/detectors/cross-facts.js +2 -1
  111. package/dist/detectors/cross-facts.js.map +1 -1
  112. package/dist/detectors/custom.d.ts.map +1 -1
  113. package/dist/detectors/custom.js +8 -2
  114. package/dist/detectors/custom.js.map +1 -1
  115. package/dist/detectors/date-any-year.d.ts +6 -3
  116. package/dist/detectors/date-any-year.d.ts.map +1 -1
  117. package/dist/detectors/date-any-year.js +47 -10
  118. package/dist/detectors/date-any-year.js.map +1 -1
  119. package/dist/detectors/date-heading-year.d.ts +18 -0
  120. package/dist/detectors/date-heading-year.d.ts.map +1 -0
  121. package/dist/detectors/date-heading-year.js +38 -0
  122. package/dist/detectors/date-heading-year.js.map +1 -0
  123. package/dist/detectors/date-year.d.ts +12 -2
  124. package/dist/detectors/date-year.d.ts.map +1 -1
  125. package/dist/detectors/date-year.js +31 -6
  126. package/dist/detectors/date-year.js.map +1 -1
  127. package/dist/detectors/defined-term-form.d.ts.map +1 -1
  128. package/dist/detectors/defined-term-form.js +26 -5
  129. package/dist/detectors/defined-term-form.js.map +1 -1
  130. package/dist/detectors/document-shape.d.ts.map +1 -1
  131. package/dist/detectors/document-shape.js +6 -0
  132. package/dist/detectors/document-shape.js.map +1 -1
  133. package/dist/detectors/due-date.d.ts.map +1 -1
  134. package/dist/detectors/due-date.js +18 -2
  135. package/dist/detectors/due-date.js.map +1 -1
  136. package/dist/detectors/en-shape.d.ts.map +1 -1
  137. package/dist/detectors/en-shape.js +5 -1
  138. package/dist/detectors/en-shape.js.map +1 -1
  139. package/dist/detectors/fact-consistency.d.ts.map +1 -1
  140. package/dist/detectors/fact-consistency.js +15 -15
  141. package/dist/detectors/fact-consistency.js.map +1 -1
  142. package/dist/detectors/form-line.d.ts +9 -0
  143. package/dist/detectors/form-line.d.ts.map +1 -0
  144. package/dist/detectors/form-line.js +36 -0
  145. package/dist/detectors/form-line.js.map +1 -0
  146. package/dist/detectors/formula-amount.d.ts.map +1 -1
  147. package/dist/detectors/formula-amount.js +2 -12
  148. package/dist/detectors/formula-amount.js.map +1 -1
  149. package/dist/detectors/gram-passages.d.ts +11 -0
  150. package/dist/detectors/gram-passages.d.ts.map +1 -0
  151. package/dist/detectors/gram-passages.js +26 -0
  152. package/dist/detectors/gram-passages.js.map +1 -0
  153. package/dist/detectors/heading-claim.d.ts +14 -0
  154. package/dist/detectors/heading-claim.d.ts.map +1 -0
  155. package/dist/detectors/heading-claim.js +49 -0
  156. package/dist/detectors/heading-claim.js.map +1 -0
  157. package/dist/detectors/heading-echo.d.ts.map +1 -1
  158. package/dist/detectors/heading-echo.js +29 -1
  159. package/dist/detectors/heading-echo.js.map +1 -1
  160. package/dist/detectors/heading-end-mark.d.ts +8 -3
  161. package/dist/detectors/heading-end-mark.d.ts.map +1 -1
  162. package/dist/detectors/heading-end-mark.js +18 -8
  163. package/dist/detectors/heading-end-mark.js.map +1 -1
  164. package/dist/detectors/heading-names.d.ts +7 -0
  165. package/dist/detectors/heading-names.d.ts.map +1 -0
  166. package/dist/detectors/heading-names.js +24 -0
  167. package/dist/detectors/heading-names.js.map +1 -0
  168. package/dist/detectors/heading-numbering.d.ts.map +1 -1
  169. package/dist/detectors/heading-numbering.js +7 -2
  170. package/dist/detectors/heading-numbering.js.map +1 -1
  171. package/dist/detectors/inch-mark.d.ts +10 -0
  172. package/dist/detectors/inch-mark.d.ts.map +1 -0
  173. package/dist/detectors/inch-mark.js +48 -0
  174. package/dist/detectors/inch-mark.js.map +1 -0
  175. package/dist/detectors/installment-total-mismatch.d.ts.map +1 -1
  176. package/dist/detectors/installment-total-mismatch.js +2 -12
  177. package/dist/detectors/installment-total-mismatch.js.map +1 -1
  178. package/dist/detectors/lexicon.d.ts +0 -1
  179. package/dist/detectors/lexicon.d.ts.map +1 -1
  180. package/dist/detectors/lexicon.js +29 -23
  181. package/dist/detectors/lexicon.js.map +1 -1
  182. package/dist/detectors/list-parallel.d.ts +5 -2
  183. package/dist/detectors/list-parallel.d.ts.map +1 -1
  184. package/dist/detectors/list-parallel.js +45 -7
  185. package/dist/detectors/list-parallel.js.map +1 -1
  186. package/dist/detectors/mark-shape.d.ts +6 -3
  187. package/dist/detectors/mark-shape.d.ts.map +1 -1
  188. package/dist/detectors/mark-shape.js +12 -6
  189. package/dist/detectors/mark-shape.js.map +1 -1
  190. package/dist/detectors/name-variant-apart.d.ts +27 -0
  191. package/dist/detectors/name-variant-apart.d.ts.map +1 -0
  192. package/dist/detectors/name-variant-apart.js +51 -0
  193. package/dist/detectors/name-variant-apart.js.map +1 -0
  194. package/dist/detectors/name-variant.d.ts.map +1 -1
  195. package/dist/detectors/name-variant.js +51 -17
  196. package/dist/detectors/name-variant.js.map +1 -1
  197. package/dist/detectors/number-unit.d.ts +10 -0
  198. package/dist/detectors/number-unit.d.ts.map +1 -1
  199. package/dist/detectors/number-unit.js +28 -8
  200. package/dist/detectors/number-unit.js.map +1 -1
  201. package/dist/detectors/numeral-word.d.ts +15 -0
  202. package/dist/detectors/numeral-word.d.ts.map +1 -0
  203. package/dist/detectors/numeral-word.js +26 -0
  204. package/dist/detectors/numeral-word.js.map +1 -0
  205. package/dist/detectors/organisation-run.d.ts +14 -0
  206. package/dist/detectors/organisation-run.d.ts.map +1 -0
  207. package/dist/detectors/organisation-run.js +73 -0
  208. package/dist/detectors/organisation-run.js.map +1 -0
  209. package/dist/detectors/orthographic-variant.d.ts.map +1 -1
  210. package/dist/detectors/orthographic-variant.js +13 -5
  211. package/dist/detectors/orthographic-variant.js.map +1 -1
  212. package/dist/detectors/orthography.d.ts.map +1 -1
  213. package/dist/detectors/orthography.js +16 -7
  214. package/dist/detectors/orthography.js.map +1 -1
  215. package/dist/detectors/outline-label.d.ts +14 -0
  216. package/dist/detectors/outline-label.d.ts.map +1 -0
  217. package/dist/detectors/outline-label.js +32 -0
  218. package/dist/detectors/outline-label.js.map +1 -0
  219. package/dist/detectors/page-marker.d.ts +6 -0
  220. package/dist/detectors/page-marker.d.ts.map +1 -0
  221. package/dist/detectors/page-marker.js +19 -0
  222. package/dist/detectors/page-marker.js.map +1 -0
  223. package/dist/detectors/parallel-definition.d.ts +16 -0
  224. package/dist/detectors/parallel-definition.d.ts.map +1 -0
  225. package/dist/detectors/parallel-definition.js +51 -0
  226. package/dist/detectors/parallel-definition.js.map +1 -0
  227. package/dist/detectors/per-unit-words.d.ts +7 -0
  228. package/dist/detectors/per-unit-words.d.ts.map +1 -0
  229. package/dist/detectors/per-unit-words.js +17 -0
  230. package/dist/detectors/per-unit-words.js.map +1 -0
  231. package/dist/detectors/period-multiple-mismatch.d.ts.map +1 -1
  232. package/dist/detectors/period-multiple-mismatch.js +2 -12
  233. package/dist/detectors/period-multiple-mismatch.js.map +1 -1
  234. package/dist/detectors/reference-number-variant.d.ts.map +1 -1
  235. package/dist/detectors/reference-number-variant.js +21 -3
  236. package/dist/detectors/reference-number-variant.js.map +1 -1
  237. package/dist/detectors/reference-text.d.ts.map +1 -1
  238. package/dist/detectors/reference-text.js +1 -0
  239. package/dist/detectors/reference-text.js.map +1 -1
  240. package/dist/detectors/registry/condition-toki.d.ts +3 -0
  241. package/dist/detectors/registry/condition-toki.d.ts.map +1 -0
  242. package/dist/detectors/registry/condition-toki.js +3 -0
  243. package/dist/detectors/registry/condition-toki.js.map +1 -0
  244. package/dist/detectors/registry/unfilled-placeholder.d.ts.map +1 -1
  245. package/dist/detectors/registry/unfilled-placeholder.js +2 -2
  246. package/dist/detectors/registry/unfilled-placeholder.js.map +1 -1
  247. package/dist/detectors/registry/vague-density.js +1 -1
  248. package/dist/detectors/registry/vague-density.js.map +1 -1
  249. package/dist/detectors/rent-multiple-mismatch.d.ts.map +1 -1
  250. package/dist/detectors/rent-multiple-mismatch.js +2 -12
  251. package/dist/detectors/rent-multiple-mismatch.js.map +1 -1
  252. package/dist/detectors/request-owner.d.ts +6 -2
  253. package/dist/detectors/request-owner.d.ts.map +1 -1
  254. package/dist/detectors/request-owner.js +57 -7
  255. package/dist/detectors/request-owner.js.map +1 -1
  256. package/dist/detectors/requirement-smell.d.ts.map +1 -1
  257. package/dist/detectors/requirement-smell.js +10 -2
  258. package/dist/detectors/requirement-smell.js.map +1 -1
  259. package/dist/detectors/row-sentence-amounts.d.ts.map +1 -1
  260. package/dist/detectors/row-sentence-amounts.js +5 -10
  261. package/dist/detectors/row-sentence-amounts.js.map +1 -1
  262. package/dist/detectors/sentence-length.d.ts.map +1 -1
  263. package/dist/detectors/sentence-length.js +24 -16
  264. package/dist/detectors/sentence-length.js.map +1 -1
  265. package/dist/detectors/sentence-rhythm.d.ts.map +1 -1
  266. package/dist/detectors/sentence-rhythm.js +6 -3
  267. package/dist/detectors/sentence-rhythm.js.map +1 -1
  268. package/dist/detectors/series-label.d.ts +2 -1
  269. package/dist/detectors/series-label.d.ts.map +1 -1
  270. package/dist/detectors/series-label.js +10 -4
  271. package/dist/detectors/series-label.js.map +1 -1
  272. package/dist/detectors/signals.d.ts +4 -0
  273. package/dist/detectors/signals.d.ts.map +1 -1
  274. package/dist/detectors/signals.js +95 -36
  275. package/dist/detectors/signals.js.map +1 -1
  276. package/dist/detectors/stated-amounts.d.ts +4 -0
  277. package/dist/detectors/stated-amounts.d.ts.map +1 -0
  278. package/dist/detectors/stated-amounts.js +12 -0
  279. package/dist/detectors/stated-amounts.js.map +1 -0
  280. package/dist/detectors/step-time-sum.d.ts.map +1 -1
  281. package/dist/detectors/step-time-sum.js +2 -1
  282. package/dist/detectors/step-time-sum.js.map +1 -1
  283. package/dist/detectors/structure-tree.d.ts.map +1 -1
  284. package/dist/detectors/structure-tree.js +11 -7
  285. package/dist/detectors/structure-tree.js.map +1 -1
  286. package/dist/detectors/team.d.ts.map +1 -1
  287. package/dist/detectors/team.js +10 -6
  288. package/dist/detectors/team.js.map +1 -1
  289. package/dist/detectors/template-sections.d.ts +14 -0
  290. package/dist/detectors/template-sections.d.ts.map +1 -0
  291. package/dist/detectors/template-sections.js +25 -0
  292. package/dist/detectors/template-sections.js.map +1 -0
  293. package/dist/detectors/time-order.d.ts.map +1 -1
  294. package/dist/detectors/time-order.js +17 -13
  295. package/dist/detectors/time-order.js.map +1 -1
  296. package/dist/detectors/titled-run.d.ts +22 -0
  297. package/dist/detectors/titled-run.d.ts.map +1 -0
  298. package/dist/detectors/titled-run.js +34 -0
  299. package/dist/detectors/titled-run.js.map +1 -0
  300. package/dist/detectors/unbalanced-bracket.d.ts.map +1 -1
  301. package/dist/detectors/unbalanced-bracket.js +4 -0
  302. package/dist/detectors/unbalanced-bracket.js.map +1 -1
  303. package/dist/detectors/undefined-term.d.ts.map +1 -1
  304. package/dist/detectors/undefined-term.js +8 -0
  305. package/dist/detectors/undefined-term.js.map +1 -1
  306. package/dist/detectors/unfilled-placeholder.d.ts +4 -0
  307. package/dist/detectors/unfilled-placeholder.d.ts.map +1 -0
  308. package/dist/detectors/unfilled-placeholder.js +9 -0
  309. package/dist/detectors/unfilled-placeholder.js.map +1 -0
  310. package/dist/detectors/unknown-word.d.ts +4 -1
  311. package/dist/detectors/unknown-word.d.ts.map +1 -1
  312. package/dist/detectors/unknown-word.js +18 -2
  313. package/dist/detectors/unknown-word.js.map +1 -1
  314. package/dist/detectors/use-interval.d.ts +1 -0
  315. package/dist/detectors/use-interval.d.ts.map +1 -1
  316. package/dist/detectors/use-interval.js +15 -10
  317. package/dist/detectors/use-interval.js.map +1 -1
  318. package/dist/detectors/use-maximum.d.ts.map +1 -1
  319. package/dist/detectors/use-maximum.js +3 -1
  320. package/dist/detectors/use-maximum.js.map +1 -1
  321. package/dist/detectors/vague-density.d.ts +5 -0
  322. package/dist/detectors/vague-density.d.ts.map +1 -0
  323. package/dist/detectors/vague-density.js +52 -0
  324. package/dist/detectors/vague-density.js.map +1 -0
  325. package/dist/extension/document-view.d.ts +2 -2
  326. package/dist/extension/document-view.d.ts.map +1 -1
  327. package/dist/extension/document-view.js +17 -8
  328. package/dist/extension/document-view.js.map +1 -1
  329. package/dist/extension/entry-genres.d.ts +5 -0
  330. package/dist/extension/entry-genres.d.ts.map +1 -0
  331. package/dist/extension/entry-genres.js +13 -0
  332. package/dist/extension/entry-genres.js.map +1 -0
  333. package/dist/extension/module-detector.d.ts.map +1 -1
  334. package/dist/extension/module-detector.js +4 -4
  335. package/dist/extension/module-detector.js.map +1 -1
  336. package/dist/extension/plugin-parse.d.ts +1 -1
  337. package/dist/extension/plugin-parse.d.ts.map +1 -1
  338. package/dist/extension/plugin-parse.js +24 -7
  339. package/dist/extension/plugin-parse.js.map +1 -1
  340. package/dist/extension/problem-text.d.ts.map +1 -1
  341. package/dist/extension/problem-text.js +2 -0
  342. package/dist/extension/problem-text.js.map +1 -1
  343. package/dist/facts/age-values.d.ts.map +1 -1
  344. package/dist/facts/age-values.js +20 -2
  345. package/dist/facts/age-values.js.map +1 -1
  346. package/dist/facts/column-units.d.ts +31 -0
  347. package/dist/facts/column-units.d.ts.map +1 -0
  348. package/dist/facts/column-units.js +37 -0
  349. package/dist/facts/column-units.js.map +1 -0
  350. package/dist/facts/fact-scope.d.ts +10 -1
  351. package/dist/facts/fact-scope.d.ts.map +1 -1
  352. package/dist/facts/fact-scope.js +34 -3
  353. package/dist/facts/fact-scope.js.map +1 -1
  354. package/dist/facts/fact-values.d.ts +4 -0
  355. package/dist/facts/fact-values.d.ts.map +1 -1
  356. package/dist/facts/fact-values.js +3 -1
  357. package/dist/facts/fact-values.js.map +1 -1
  358. package/dist/facts/labelled-facts.d.ts +10 -0
  359. package/dist/facts/labelled-facts.d.ts.map +1 -1
  360. package/dist/facts/labelled-facts.js +6 -1
  361. package/dist/facts/labelled-facts.js.map +1 -1
  362. package/dist/facts/per-unit.d.ts +36 -0
  363. package/dist/facts/per-unit.d.ts.map +1 -0
  364. package/dist/facts/per-unit.js +56 -0
  365. package/dist/facts/per-unit.js.map +1 -0
  366. package/dist/facts/row-sentence-amounts.d.ts +3 -12
  367. package/dist/facts/row-sentence-amounts.d.ts.map +1 -1
  368. package/dist/facts/row-sentence-amounts.js +1 -15
  369. package/dist/facts/row-sentence-amounts.js.map +1 -1
  370. package/dist/facts/table-facts.d.ts +13 -3
  371. package/dist/facts/table-facts.d.ts.map +1 -1
  372. package/dist/facts/table-facts.js +35 -13
  373. package/dist/facts/table-facts.js.map +1 -1
  374. package/dist/facts/term-values.d.ts +13 -1
  375. package/dist/facts/term-values.d.ts.map +1 -1
  376. package/dist/facts/term-values.js +71 -12
  377. package/dist/facts/term-values.js.map +1 -1
  378. package/dist/grade/baseline.d.ts +4 -2
  379. package/dist/grade/baseline.d.ts.map +1 -1
  380. package/dist/grade/baseline.js +13 -11
  381. package/dist/grade/baseline.js.map +1 -1
  382. package/dist/grade/expect-read.d.ts +16 -0
  383. package/dist/grade/expect-read.d.ts.map +1 -0
  384. package/dist/grade/expect-read.js +52 -0
  385. package/dist/grade/expect-read.js.map +1 -0
  386. package/dist/grade/expect.d.ts +50 -0
  387. package/dist/grade/expect.d.ts.map +1 -0
  388. package/dist/grade/expect.js +53 -0
  389. package/dist/grade/expect.js.map +1 -0
  390. package/dist/grade/grade-item.d.ts +1 -1
  391. package/dist/grade/grade-item.d.ts.map +1 -1
  392. package/dist/grade/grade-item.js +13 -3
  393. package/dist/grade/grade-item.js.map +1 -1
  394. package/dist/grade/item.d.ts +9 -1
  395. package/dist/grade/item.d.ts.map +1 -1
  396. package/dist/grade/item.js +32 -7
  397. package/dist/grade/item.js.map +1 -1
  398. package/dist/grade/result.d.ts +5 -0
  399. package/dist/grade/result.d.ts.map +1 -1
  400. package/dist/grade/results-read.d.ts.map +1 -1
  401. package/dist/grade/results-read.js +4 -2
  402. package/dist/grade/results-read.js.map +1 -1
  403. package/dist/grade/rubric-file.d.ts +23 -0
  404. package/dist/grade/rubric-file.d.ts.map +1 -0
  405. package/dist/grade/rubric-file.js +35 -0
  406. package/dist/grade/rubric-file.js.map +1 -0
  407. package/dist/grade/rubric.d.ts +2 -0
  408. package/dist/grade/rubric.d.ts.map +1 -1
  409. package/dist/grade/rubric.js +75 -47
  410. package/dist/grade/rubric.js.map +1 -1
  411. package/dist/grade/setup.d.ts +2 -1
  412. package/dist/grade/setup.d.ts.map +1 -1
  413. package/dist/grade/setup.js +2 -2
  414. package/dist/grade/setup.js.map +1 -1
  415. package/dist/grade/stamp.d.ts +2 -0
  416. package/dist/grade/stamp.d.ts.map +1 -1
  417. package/dist/grade/stamp.js +8 -2
  418. package/dist/grade/stamp.js.map +1 -1
  419. package/dist/grade/task-rubric.d.ts +16 -0
  420. package/dist/grade/task-rubric.d.ts.map +1 -0
  421. package/dist/grade/task-rubric.js +34 -0
  422. package/dist/grade/task-rubric.js.map +1 -0
  423. package/dist/grade/text.d.ts +5 -1
  424. package/dist/grade/text.d.ts.map +1 -1
  425. package/dist/grade/text.js +16 -4
  426. package/dist/grade/text.js.map +1 -1
  427. package/dist/grade-api.d.ts +9 -2
  428. package/dist/grade-api.d.ts.map +1 -1
  429. package/dist/grade-api.js +31 -15
  430. package/dist/grade-api.js.map +1 -1
  431. package/dist/heading-numbering.d.ts +5 -2
  432. package/dist/heading-numbering.d.ts.map +1 -1
  433. package/dist/heading-numbering.js +27 -6
  434. package/dist/heading-numbering.js.map +1 -1
  435. package/dist/name-char-reading.d.ts +5 -0
  436. package/dist/name-char-reading.d.ts.map +1 -1
  437. package/dist/name-char-reading.js +15 -0
  438. package/dist/name-char-reading.js.map +1 -1
  439. package/dist/name-end-letter.d.ts +24 -0
  440. package/dist/name-end-letter.d.ts.map +1 -0
  441. package/dist/name-end-letter.js +45 -0
  442. package/dist/name-end-letter.js.map +1 -0
  443. package/dist/name-given-before.d.ts +15 -0
  444. package/dist/name-given-before.d.ts.map +1 -0
  445. package/dist/name-given-before.js +30 -0
  446. package/dist/name-given-before.js.map +1 -0
  447. package/dist/name-neighbours.d.ts.map +1 -1
  448. package/dist/name-neighbours.js +2 -1
  449. package/dist/name-neighbours.js.map +1 -1
  450. package/dist/name-separator.d.ts +6 -0
  451. package/dist/name-separator.d.ts.map +1 -1
  452. package/dist/name-separator.js +80 -0
  453. package/dist/name-separator.js.map +1 -1
  454. package/dist/name-variants.d.ts +8 -3
  455. package/dist/name-variants.d.ts.map +1 -1
  456. package/dist/name-variants.js +40 -12
  457. package/dist/name-variants.js.map +1 -1
  458. package/dist/name-word-order.d.ts +9 -5
  459. package/dist/name-word-order.d.ts.map +1 -1
  460. package/dist/name-word-order.js +47 -15
  461. package/dist/name-word-order.js.map +1 -1
  462. package/dist/nominal-stem.d.ts +13 -0
  463. package/dist/nominal-stem.d.ts.map +1 -0
  464. package/dist/nominal-stem.js +32 -0
  465. package/dist/nominal-stem.js.map +1 -0
  466. package/dist/number-name.d.ts.map +1 -1
  467. package/dist/number-name.js +11 -2
  468. package/dist/number-name.js.map +1 -1
  469. package/dist/profile/cue-lines.d.ts +6 -0
  470. package/dist/profile/cue-lines.d.ts.map +1 -0
  471. package/dist/profile/cue-lines.js +13 -0
  472. package/dist/profile/cue-lines.js.map +1 -0
  473. package/dist/profile/parse.d.ts +1 -1
  474. package/dist/profile/parse.d.ts.map +1 -1
  475. package/dist/profile/parse.js +3 -2
  476. package/dist/profile/parse.js.map +1 -1
  477. package/dist/reference-numbers.d.ts +2 -0
  478. package/dist/reference-numbers.d.ts.map +1 -1
  479. package/dist/reference-numbers.js +1 -1
  480. package/dist/reference-numbers.js.map +1 -1
  481. package/dist/sentence-load.d.ts +2 -1
  482. package/dist/sentence-load.d.ts.map +1 -1
  483. package/dist/sentence-load.js +6 -2
  484. package/dist/sentence-load.js.map +1 -1
  485. package/dist/spaced-person-name.d.ts.map +1 -1
  486. package/dist/spaced-person-name.js +26 -1
  487. package/dist/spaced-person-name.js.map +1 -1
  488. package/dist/spacing-code.d.ts.map +1 -1
  489. package/dist/spacing-code.js +10 -1
  490. package/dist/spacing-code.js.map +1 -1
  491. package/dist/spacing-minority.d.ts +7 -0
  492. package/dist/spacing-minority.d.ts.map +1 -1
  493. package/dist/spacing-minority.js +14 -0
  494. package/dist/spacing-minority.js.map +1 -1
  495. package/dist/structure/cited-document-section.d.ts +7 -0
  496. package/dist/structure/cited-document-section.d.ts.map +1 -0
  497. package/dist/structure/cited-document-section.js +33 -0
  498. package/dist/structure/cited-document-section.js.map +1 -0
  499. package/dist/structure/closing-balance.d.ts +9 -0
  500. package/dist/structure/closing-balance.d.ts.map +1 -1
  501. package/dist/structure/closing-balance.js +34 -7
  502. package/dist/structure/closing-balance.js.map +1 -1
  503. package/dist/structure/definition-use.d.ts.map +1 -1
  504. package/dist/structure/definition-use.js +20 -1
  505. package/dist/structure/definition-use.js.map +1 -1
  506. package/dist/structure/document-context.d.ts +2 -0
  507. package/dist/structure/document-context.d.ts.map +1 -0
  508. package/dist/structure/document-context.js +42 -0
  509. package/dist/structure/document-context.js.map +1 -0
  510. package/dist/structure/fenced-lines.d.ts +7 -0
  511. package/dist/structure/fenced-lines.d.ts.map +1 -0
  512. package/dist/structure/fenced-lines.js +27 -0
  513. package/dist/structure/fenced-lines.js.map +1 -0
  514. package/dist/structure/html-text-blocks.d.ts +8 -0
  515. package/dist/structure/html-text-blocks.d.ts.map +1 -0
  516. package/dist/structure/html-text-blocks.js +47 -0
  517. package/dist/structure/html-text-blocks.js.map +1 -0
  518. package/dist/structure/issues.d.ts +1 -1
  519. package/dist/structure/issues.d.ts.map +1 -1
  520. package/dist/structure/issues.js +19 -4
  521. package/dist/structure/issues.js.map +1 -1
  522. package/dist/structure/labelled-date-order.d.ts +34 -9
  523. package/dist/structure/labelled-date-order.d.ts.map +1 -1
  524. package/dist/structure/labelled-date-order.js +60 -15
  525. package/dist/structure/labelled-date-order.js.map +1 -1
  526. package/dist/structure/labelled-order.d.ts +10 -1
  527. package/dist/structure/labelled-order.d.ts.map +1 -1
  528. package/dist/structure/labelled-order.js +18 -6
  529. package/dist/structure/labelled-order.js.map +1 -1
  530. package/dist/structure/line-amount-label.d.ts.map +1 -1
  531. package/dist/structure/line-amount-label.js +2 -1
  532. package/dist/structure/line-amount-label.js.map +1 -1
  533. package/dist/structure/line-amount.d.ts +0 -5
  534. package/dist/structure/line-amount.d.ts.map +1 -1
  535. package/dist/structure/line-amount.js +1 -10
  536. package/dist/structure/line-amount.js.map +1 -1
  537. package/dist/structure/list-numbering.d.ts +20 -4
  538. package/dist/structure/list-numbering.d.ts.map +1 -1
  539. package/dist/structure/list-numbering.js +65 -9
  540. package/dist/structure/list-numbering.js.map +1 -1
  541. package/dist/structure/listed-paragraph.d.ts +16 -0
  542. package/dist/structure/listed-paragraph.d.ts.map +1 -0
  543. package/dist/structure/listed-paragraph.js +37 -0
  544. package/dist/structure/listed-paragraph.js.map +1 -0
  545. package/dist/structure/numbering.d.ts +3 -2
  546. package/dist/structure/numbering.d.ts.map +1 -1
  547. package/dist/structure/numbering.js +31 -6
  548. package/dist/structure/numbering.js.map +1 -1
  549. package/dist/structure/prose-total.d.ts +8 -0
  550. package/dist/structure/prose-total.d.ts.map +1 -1
  551. package/dist/structure/prose-total.js +70 -2
  552. package/dist/structure/prose-total.js.map +1 -1
  553. package/dist/structure/reference-text.d.ts +9 -1
  554. package/dist/structure/reference-text.d.ts.map +1 -1
  555. package/dist/structure/reference-text.js +21 -3
  556. package/dist/structure/reference-text.js.map +1 -1
  557. package/dist/structure/runs.d.ts.map +1 -1
  558. package/dist/structure/runs.js +9 -1
  559. package/dist/structure/runs.js.map +1 -1
  560. package/dist/structure/section-names.d.ts +12 -0
  561. package/dist/structure/section-names.d.ts.map +1 -0
  562. package/dist/structure/section-names.js +26 -0
  563. package/dist/structure/section-names.js.map +1 -0
  564. package/dist/structure/signed-date-line.d.ts +15 -0
  565. package/dist/structure/signed-date-line.d.ts.map +1 -0
  566. package/dist/structure/signed-date-line.js +68 -0
  567. package/dist/structure/signed-date-line.js.map +1 -0
  568. package/dist/structure/tax.d.ts.map +1 -1
  569. package/dist/structure/tax.js +5 -3
  570. package/dist/structure/tax.js.map +1 -1
  571. package/dist/structure/total-line.d.ts.map +1 -1
  572. package/dist/structure/total-line.js +10 -6
  573. package/dist/structure/total-line.js.map +1 -1
  574. package/dist/structure/total.d.ts +2 -0
  575. package/dist/structure/total.d.ts.map +1 -1
  576. package/dist/structure/total.js +34 -3
  577. package/dist/structure/total.js.map +1 -1
  578. package/dist/structure/versioned-label.d.ts +16 -0
  579. package/dist/structure/versioned-label.d.ts.map +1 -0
  580. package/dist/structure/versioned-label.js +48 -0
  581. package/dist/structure/versioned-label.js.map +1 -0
  582. package/dist/structure/written-headings.d.ts +31 -0
  583. package/dist/structure/written-headings.d.ts.map +1 -0
  584. package/dist/structure/written-headings.js +119 -0
  585. package/dist/structure/written-headings.js.map +1 -0
  586. package/dist/structure/written-resolve.d.ts +12 -0
  587. package/dist/structure/written-resolve.d.ts.map +1 -0
  588. package/dist/structure/written-resolve.js +49 -0
  589. package/dist/structure/written-resolve.js.map +1 -0
  590. package/dist/subject-codes.d.ts +21 -0
  591. package/dist/subject-codes.d.ts.map +1 -0
  592. package/dist/subject-codes.js +79 -0
  593. package/dist/subject-codes.js.map +1 -0
  594. package/dist/unlabelled-references.d.ts +6 -2
  595. package/dist/unlabelled-references.d.ts.map +1 -1
  596. package/dist/unlabelled-references.js +11 -10
  597. package/dist/unlabelled-references.js.map +1 -1
  598. package/genres.yaml +17 -0
  599. package/package.json +3 -3
  600. package/profiles/listing.yaml +1 -1
  601. package/rules/all-caps-shouting.yaml +2 -2
  602. package/rules/closing-balance-mismatch.yaml +3 -3
  603. package/rules/concrete-evidence-density.yaml +2 -2
  604. package/rules/contraction-consistency.yaml +13 -13
  605. package/rules/dangling-reference.yaml +2 -2
  606. package/rules/date-without-year.yaml +2 -2
  607. package/rules/defined-name-repeated.yaml +2 -2
  608. package/rules/due-before-issue.yaml +9 -5
  609. package/rules/fact-conflict.yaml +2 -2
  610. package/rules/heading-echo.yaml +2 -2
  611. package/rules/heading-end-punctuation-mix.yaml +2 -2
  612. package/rules/heading-numbering-mix.yaml +2 -2
  613. package/rules/internal-jargon.yaml +2 -2
  614. package/rules/latin-spacing.yaml +4 -4
  615. package/rules/list-item-form-mix.yaml +1 -1
  616. package/rules/max-kanji-continuous.yaml +5 -3
  617. package/rules/max-sentence-length.yaml +3 -2
  618. package/rules/name-variant.yaml +5 -2
  619. package/rules/ngram-repetition.yaml +2 -2
  620. package/rules/no-lead.yaml +2 -2
  621. package/rules/number-without-unit.yaml +2 -2
  622. package/rules/numbering-gap.yaml +2 -2
  623. package/rules/orthographic-variant.yaml +2 -2
  624. package/rules/reference-number-variant.yaml +3 -3
  625. package/rules/reference-title-mismatch.yaml +2 -2
  626. package/rules/repeated-sentence-ending.yaml +3 -2
  627. package/rules/request-without-deadline.yaml +2 -2
  628. package/rules/requirement-smell.yaml +2 -2
  629. package/rules/sentence-rhythm.yaml +2 -2
  630. package/rules/title-case-consistency.yaml +2 -2
  631. package/rules/toki-as-condition.yaml +71 -0
  632. package/rules/total-mismatch.yaml +4 -4
  633. package/rules/unbalanced-bracket.yaml +2 -2
  634. package/rules/undefined-acronym.yaml +11 -2
  635. package/rules/undefined-term.yaml +2 -2
  636. package/rules/unfilled-placeholder.yaml +2 -2
  637. package/rules/unknown-word.yaml +2 -2
  638. package/rules/use-before-definition.yaml +2 -2
  639. package/rules/vague-word-density.yaml +2 -2
  640. package/src/api.ts +11 -2
  641. package/src/capitals-passage.ts +31 -0
  642. package/src/cli-text.ts +4 -2
  643. package/src/coined-hyphen-name.ts +27 -0
  644. package/src/commands/grade.ts +75 -23
  645. package/src/company-kana-spelling.ts +22 -2
  646. package/src/company-name-ending.ts +50 -0
  647. package/src/company-names.ts +76 -20
  648. package/src/custom/no-rewrite.ts +2 -0
  649. package/src/custom/parse.ts +18 -2
  650. package/src/detectors/acronym-context.ts +5 -6
  651. package/src/detectors/acronym-definition.ts +123 -0
  652. package/src/detectors/acronym-lone.ts +26 -0
  653. package/src/detectors/acronym-name.ts +117 -0
  654. package/src/detectors/age-words.ts +12 -0
  655. package/src/detectors/annual-pay-mismatch.ts +3 -18
  656. package/src/detectors/blank-structure.ts +4 -3
  657. package/src/detectors/capitalised-term.ts +154 -4
  658. package/src/detectors/caps-caption.ts +61 -0
  659. package/src/detectors/char-shape.ts +74 -22
  660. package/src/detectors/clause-shape.ts +14 -4
  661. package/src/detectors/closing-balance-mismatch.ts +1 -0
  662. package/src/detectors/code-fences.ts +10 -0
  663. package/src/detectors/concrete-evidence.ts +77 -1
  664. package/src/detectors/condition-toki.ts +60 -0
  665. package/src/detectors/conjugated-entry.ts +53 -0
  666. package/src/detectors/content-morphemes.ts +2 -1
  667. package/src/detectors/contraction-minority.ts +11 -0
  668. package/src/detectors/counter-edge.ts +23 -0
  669. package/src/detectors/cross-facts.ts +2 -1
  670. package/src/detectors/custom.ts +9 -2
  671. package/src/detectors/date-any-year.ts +56 -10
  672. package/src/detectors/date-heading-year.ts +55 -0
  673. package/src/detectors/date-year.ts +54 -9
  674. package/src/detectors/defined-term-form.ts +26 -5
  675. package/src/detectors/document-shape.ts +8 -0
  676. package/src/detectors/due-date.ts +26 -7
  677. package/src/detectors/en-shape.ts +5 -1
  678. package/src/detectors/fact-consistency.ts +16 -19
  679. package/src/detectors/form-line.ts +47 -0
  680. package/src/detectors/formula-amount.ts +2 -18
  681. package/src/detectors/gram-passages.ts +36 -0
  682. package/src/detectors/heading-claim.ts +76 -0
  683. package/src/detectors/heading-echo.ts +32 -1
  684. package/src/detectors/heading-end-mark.ts +23 -10
  685. package/src/detectors/heading-names.ts +31 -0
  686. package/src/detectors/heading-numbering.ts +7 -2
  687. package/src/detectors/inch-mark.ts +49 -0
  688. package/src/detectors/installment-total-mismatch.ts +3 -18
  689. package/src/detectors/lexicon.ts +32 -21
  690. package/src/detectors/list-parallel.ts +46 -7
  691. package/src/detectors/mark-shape.ts +12 -6
  692. package/src/detectors/name-variant-apart.ts +63 -0
  693. package/src/detectors/name-variant.ts +73 -18
  694. package/src/detectors/number-unit.ts +35 -9
  695. package/src/detectors/numeral-word.ts +33 -0
  696. package/src/detectors/organisation-run.ts +86 -0
  697. package/src/detectors/orthographic-variant.ts +22 -6
  698. package/src/detectors/orthography.ts +17 -8
  699. package/src/detectors/outline-label.ts +48 -0
  700. package/src/detectors/page-marker.ts +26 -0
  701. package/src/detectors/parallel-definition.ts +64 -0
  702. package/src/detectors/per-unit-words.ts +24 -0
  703. package/src/detectors/period-multiple-mismatch.ts +2 -18
  704. package/src/detectors/reference-number-variant.ts +27 -5
  705. package/src/detectors/reference-text.ts +1 -0
  706. package/src/detectors/registry/condition-toki.ts +4 -0
  707. package/src/detectors/registry/unfilled-placeholder.ts +2 -2
  708. package/src/detectors/registry/vague-density.ts +1 -1
  709. package/src/detectors/rent-multiple-mismatch.ts +2 -18
  710. package/src/detectors/request-owner.ts +71 -8
  711. package/src/detectors/requirement-smell.ts +15 -2
  712. package/src/detectors/row-sentence-amounts.ts +5 -20
  713. package/src/detectors/sentence-length.ts +14 -6
  714. package/src/detectors/sentence-rhythm.ts +8 -4
  715. package/src/detectors/series-label.ts +13 -4
  716. package/src/detectors/signals.ts +94 -26
  717. package/src/detectors/stated-amounts.ts +20 -0
  718. package/src/detectors/step-time-sum.ts +2 -1
  719. package/src/detectors/structure-tree.ts +13 -8
  720. package/src/detectors/team.ts +13 -7
  721. package/src/detectors/template-sections.ts +37 -0
  722. package/src/detectors/time-order.ts +6 -3
  723. package/src/detectors/titled-run.ts +43 -0
  724. package/src/detectors/unbalanced-bracket.ts +3 -0
  725. package/src/detectors/undefined-term.ts +8 -0
  726. package/src/detectors/unfilled-placeholder.ts +10 -0
  727. package/src/detectors/unknown-word.ts +20 -2
  728. package/src/detectors/use-interval.ts +8 -4
  729. package/src/detectors/use-maximum.ts +3 -1
  730. package/src/detectors/vague-density.ts +68 -0
  731. package/src/extension/document-view.ts +18 -9
  732. package/src/extension/entry-genres.ts +15 -0
  733. package/src/extension/module-detector.ts +9 -4
  734. package/src/extension/plugin-parse.ts +29 -7
  735. package/src/extension/problem-text.ts +4 -0
  736. package/src/facts/age-values.ts +24 -2
  737. package/src/facts/column-units.ts +67 -0
  738. package/src/facts/fact-scope.ts +53 -4
  739. package/src/facts/fact-values.ts +11 -1
  740. package/src/facts/labelled-facts.ts +16 -2
  741. package/src/facts/per-unit.ts +105 -0
  742. package/src/facts/row-sentence-amounts.ts +4 -26
  743. package/src/facts/table-facts.ts +50 -10
  744. package/src/facts/term-values.ts +94 -13
  745. package/src/grade/baseline.ts +20 -12
  746. package/src/grade/expect-read.ts +65 -0
  747. package/src/grade/expect.ts +74 -0
  748. package/src/grade/grade-item.ts +14 -3
  749. package/src/grade/item.ts +48 -8
  750. package/src/grade/result.ts +5 -0
  751. package/src/grade/results-read.ts +7 -2
  752. package/src/grade/rubric-file.ts +46 -0
  753. package/src/grade/rubric.ts +77 -47
  754. package/src/grade/setup.ts +3 -3
  755. package/src/grade/stamp.ts +10 -2
  756. package/src/grade/task-rubric.ts +39 -0
  757. package/src/grade/text.ts +27 -5
  758. package/src/grade-api.ts +38 -16
  759. package/src/heading-numbering.ts +35 -8
  760. package/src/name-char-reading.ts +16 -0
  761. package/src/name-end-letter.ts +61 -0
  762. package/src/name-given-before.ts +40 -0
  763. package/src/name-neighbours.ts +2 -1
  764. package/src/name-separator.ts +93 -0
  765. package/src/name-variants.ts +69 -18
  766. package/src/name-word-order.ts +62 -17
  767. package/src/nominal-stem.ts +36 -0
  768. package/src/number-name.ts +12 -3
  769. package/src/profile/cue-lines.ts +14 -0
  770. package/src/profile/parse.ts +3 -2
  771. package/src/reference-numbers.ts +1 -1
  772. package/src/sentence-load.ts +7 -2
  773. package/src/spaced-person-name.ts +27 -2
  774. package/src/spacing-code.ts +13 -2
  775. package/src/spacing-minority.ts +17 -0
  776. package/src/structure/cited-document-section.ts +42 -0
  777. package/src/structure/closing-balance.ts +46 -8
  778. package/src/structure/definition-use.ts +24 -1
  779. package/src/structure/document-context.ts +46 -0
  780. package/src/structure/fenced-lines.ts +28 -0
  781. package/src/structure/html-text-blocks.ts +45 -0
  782. package/src/structure/issues.ts +19 -4
  783. package/src/structure/labelled-date-order.ts +108 -21
  784. package/src/structure/labelled-order.ts +33 -13
  785. package/src/structure/line-amount-label.ts +2 -1
  786. package/src/structure/line-amount.ts +1 -11
  787. package/src/structure/list-numbering.ts +100 -11
  788. package/src/structure/listed-paragraph.ts +45 -0
  789. package/src/structure/numbering.ts +48 -19
  790. package/src/structure/prose-total.ts +81 -2
  791. package/src/structure/reference-text.ts +25 -3
  792. package/src/structure/runs.ts +10 -1
  793. package/src/structure/section-names.ts +32 -0
  794. package/src/structure/signed-date-line.ts +78 -0
  795. package/src/structure/tax.ts +6 -3
  796. package/src/structure/total-line.ts +12 -6
  797. package/src/structure/total.ts +42 -3
  798. package/src/structure/versioned-label.ts +52 -0
  799. package/src/structure/written-headings.ts +137 -0
  800. package/src/structure/written-resolve.ts +57 -0
  801. package/src/subject-codes.ts +105 -0
  802. package/src/unlabelled-references.ts +24 -16
@@ -34,7 +34,7 @@ levels: { strict: error, normal: warning, relaxed: warning }
34
34
  options:
35
35
  listed_kinds:
36
36
  kind: words
37
- default: [item]
37
+ default: [item, model]
38
38
  about:
39
39
  ja: 文書が多くを並べる番号の種類(reference-label の group)。この種類の、語の後ろや表にある番号どうしは比べず、語の無い番号だけを比べる
40
40
  en: Kinds of number a document lists many of (reference-label groups). Two labelled or tabled numbers of such a kind are never compared; only one with no label is
@@ -77,5 +77,5 @@ example:
77
77
  When you call, please give your booking number, MN-48215.
78
78
 
79
79
  not_flagged:
80
- ja: 「予約番号」「受付番号」「予約確認番号」「お問い合わせ番号」「社員番号」「学籍番号」「発注番号」「見積番号」「請求書番号」「患者番号」「契約番号」「登録番号」「口座番号」「証券番号」のような語のすぐ後ろ(間は空白と「:」「、」や開き括弧だけ)にある、数字を4つ以上含む英数字の並びだけを番号と見ます。発注番号は取引先の番号を書き写すこともありますが、同じ種類の語の番号どうしで隣り合う二文字だけが入れ違ったものしか指さないので、別の注文の番号は指しません。「原契約番号」「基本契約番号」「旧契約番号」「変更契約番号」「親契約番号」は別の契約の番号を引く語なので、文書自身の「契約番号」とは比べません。「登録番号」「受講番号」は参加者の登録の番号、「申込番号」は申込みの番号として、互いに比べません。「振込先口座番号」「振込元口座番号」は振込の相手の口座の番号を書く語なので、口座自身の「口座番号」とは比べません。「契約者番号」は契約者その人の番号で、証券番号とは見ません。語の無い番号(下に書く品番の形のものを除く)、種類の違う番号(学籍番号と社員番号、予約番号と受付番号、請求書番号と注文番号、見積番号と注文番号や請求書番号、登録番号と申込番号)、一文字だけ違う番号、離れた文字の入れ違い、二か所以上入れ違った番号は指しません。自動車のナンバー(ひばり野 330 ね 48-15)の形に合う並びは、語が「登録番号」でも自動車のナンバーとして読みます。ナンバーだけは、文書が一台の車のことを書いているとき(その車のナンバーを「登録番号:」のような語と番号だけの行に一つだけ書き、ほかのナンバーは一つだけで、その語が文の初めにあるとき。「代車の登録番号」のように語の前に語があれば別の車と見ます)に限って、地名・分類番号・かなが同じで一連番号が一文字だけ違うものも指します。「ナンバー」だけの語や英語の「Registration」だけの語は、ナンバーの語として読みません。「品番」「商品コード」「品目コード」は商品の番号の語です。表の行や列の見出しにこの語を書いた升の品番も、語の後ろの品番と同じに読みます。語の無い品番(「GP-0521の替芯」)は、英字と「-」と数字4つ以上の形(GP-0521)のときだけ、語の後ろか表にある品番のちょうど一つと隣り合う二文字だけが入れ違っていれば指します。その書き方の品番が文書のどこかで語の後ろか表にあれば、別の商品の品番と見て指しません(カタログの表に並ぶ AB-1234 と AB-1243 は二つの商品です)。語の後ろや表にある品番どうしも、別の商品の品番として比べません(この扱いをする種類は listed_kinds で決めます)。二つ以上の品番のどれとも読めるもの、英字や「-」の無い番号(48251)も指しません。「会員番号」「会員ID」の会員の番号と、「お客様番号」の番号は、別の番号になり得るので比べません。語のすぐ後ろの番号を「HM 5520 8137」のように空白一つずつで区切って書いたときは、続く並びがどれも4文字以上の大文字と数字で数字を含む間を一つの番号と読み、行の終わりや、語(「の方」「2名」)の前で止めます。
81
- en: "Only letters and digits right after a label (booking number, reservation number, confirmation number, reference number, employee number, student number, PO number, quote or estimate number, invoice number, patient number, contract or agreement number, registration number, account number, policy number), with nothing but spaces, a colon, a comma or an opening bracket between, are read, and only when they hold four digits or more. A PO number may be the buyer's, copied from another document, but only two numbers of one kind that differ by two neighbours swapped are reported, so a different order's number is not. An original, master, former, amended or parent contract number (and an amendment number) cites another contract, so it is never compared with the document's own contract number. A registration number labels an attendee's registration and an application number an application, so the two are never compared. A payee's, beneficiary's, payer's or sender's account number labels the other side of a transfer, so it is never compared with the account's own account number; a policyholder number is not read as a policy number. Unlabelled codes (but for item codes, below), numbers of different kinds (a student number and an employee number, a booking number and an order number, an invoice number and an order number, a quote number and an order or invoice number, a registration number and an application number), numbers that differ in one character, swaps of characters that are not neighbours and numbers with more than one swap are not reported. A bare quote is not read as a label, since it is also a verb (quote your PO number). A plate number, number plate or licence plate is a vehicle's and is never compared with a registration number; a bare Registration label is not read as a plate, since an attendee's registration is written so too. An item code, item no., SKU or product code labels an item; a code in a table under such a label, in its row or its column, is read as if written after it. A code with no label (Refills for GP-0521) is reported only in the shape letters, a hyphen and four digits or more, and only when it is exactly one labelled or tabled code with two neighbours swapped. When the document labels or tables that writing itself anywhere, it is another item and is not reported (a catalog's AB-1234 and AB-1243 are two items), and two labelled or tabled item codes are never compared with each other (listed_kinds names the kinds read so); nor is a code two labelled codes swap to, or a number with no letters or hyphen (48251). A member number or member ID and a customer number may be different numbers, so they are never compared. A number written in groups one space apart (HM 5520 8137) is read as one while each further group is four or more capitals and digits holding a digit, stopping at the line's end or before a word or a short count (expires, 100 copies)."
80
+ ja: 「予約番号」「受付番号」「予約確認番号」「お問い合わせ番号」「社員番号」「学籍番号」「発注番号」「見積番号」「請求書番号」「患者番号」「契約番号」「登録番号」「口座番号」「証券番号」のような語のすぐ後ろ(間は空白と「:」「、」や開き括弧だけ)にある、数字を4つ以上含む英数字の並びだけを番号と見ます。発注番号は取引先の番号を書き写すこともありますが、同じ種類の語の番号どうしで隣り合う二文字だけが入れ違ったものしか指さないので、別の注文の番号は指しません。「原契約番号」「基本契約番号」「旧契約番号」「変更契約番号」「親契約番号」は別の契約の番号を引く語なので、文書自身の「契約番号」とは比べません。「登録番号」「受講番号」は参加者の登録の番号、「申込番号」は申込みの番号として、互いに比べません。「振込先口座番号」「振込元口座番号」は振込の相手の口座の番号を書く語なので、口座自身の「口座番号」とは比べません。「契約者番号」は契約者その人の番号で、証券番号とは見ません。語の無い番号(下に書く品番の形のものを除く)、種類の違う番号(学籍番号と社員番号、予約番号と受付番号、請求書番号と注文番号、見積番号と注文番号や請求書番号、登録番号と申込番号)、一文字だけ違う番号、離れた文字の入れ違い、二か所以上入れ違った番号は指しません。自動車のナンバー(ひばり野 330 ね 48-15)の形に合う並びは、語が「登録番号」でも自動車のナンバーとして読みます。ナンバーだけは、文書が一台の車のことを書いているとき(その車のナンバーを「登録番号:」のような語と番号だけの行に一つだけ書き、ほかのナンバーは一つだけで、その語が文の初めにあるとき。「代車の登録番号」のように語の前に語があれば別の車と見ます)に限って、地名・分類番号・かなが同じで一連番号が一文字だけ違うものも指します。「ナンバー」だけの語や英語の「Registration」だけの語は、ナンバーの語として読みません。「品番」「商品コード」「品目コード」は商品の番号の語です。表の行や列の見出しにこの語を書いた升の品番も、語の後ろの品番と同じに読みます。語の無い品番(「GP-0521の替芯」)は、英字と「-」と数字4つ以上の形(GP-0521)のときだけ、語の後ろか表にある品番のちょうど一つと隣り合う二文字だけが入れ違っていれば指します。その書き方の品番が文書のどこかで語の後ろか表にあれば、別の商品の品番と見て指しません(カタログの表に並ぶ AB-1234 と AB-1243 は二つの商品です)。語の後ろや表にある品番どうしも、別の商品の品番として比べません(この扱いをする種類は listed_kinds で決めます)。二つ以上の品番のどれとも読めるもの、英字や「-」の無い番号(48251)も指しません。「会員番号」「会員ID」の会員の番号と、「お客様番号」の番号は、別の番号になり得るので比べません。語のすぐ後ろの番号を「HM 5520 8137」のように空白一つずつで区切って書いたときは、続く並びがどれも4文字以上の大文字と数字で数字を含む間を一つの番号と読み、行の終わりや、語(「の方」「2名」)の前で止めます。「型番」は製品の型番の語で、品番と同じく、語の後ろや表にある型番どうしは比べません。製品の文書(回収のお知らせや保証書)が自分の製品として名指す番号(題名にある番号、「型番:」「商品コード:」のような語と番号だけの行の番号、表で型番や品番の語を書いた升の番号)がちょうど一つのときに限り、「-」の前に英字が二つ以上あり、数字が二つ以上の短い番号(NH-805、FT-38)も読み、文書に一度だけ書いた、その番号の隣り合う二文字が入れ違った番号(NH-850)を指します。そう名指す番号が二つ以上ある文書(カタログ)、表にある番号、二度以上書いた番号、その番号と同じ行にある番号(「NH-805 と NH-850」)、「予約番号」のような別の種類の語の後ろの番号、英字一つの番号(A-12)は指しません。
81
+ en: "Only letters and digits right after a label (booking number, reservation number, confirmation number, reference number, employee number, student number, PO number, quote or estimate number, invoice number, patient number, contract or agreement number, registration number, account number, policy number), with nothing but spaces, a colon, a comma or an opening bracket between, are read, and only when they hold four digits or more. A PO number may be the buyer's, copied from another document, but only two numbers of one kind that differ by two neighbours swapped are reported, so a different order's number is not. An original, master, former, amended or parent contract number (and an amendment number) cites another contract, so it is never compared with the document's own contract number. A registration number labels an attendee's registration and an application number an application, so the two are never compared. A payee's, beneficiary's, payer's or sender's account number labels the other side of a transfer, so it is never compared with the account's own account number; a policyholder number is not read as a policy number. Unlabelled codes (but for item codes, below), numbers of different kinds (a student number and an employee number, a booking number and an order number, an invoice number and an order number, a quote number and an order or invoice number, a registration number and an application number), numbers that differ in one character, swaps of characters that are not neighbours and numbers with more than one swap are not reported. A bare quote is not read as a label, since it is also a verb (quote your PO number). A plate number, number plate or licence plate is a vehicle's and is never compared with a registration number; a bare Registration label is not read as a plate, since an attendee's registration is written so too. An item code, item no., SKU or product code labels an item; a code in a table under such a label, in its row or its column, is read as if written after it. A code with no label (Refills for GP-0521) is reported only in the shape letters, a hyphen and four digits or more, and only when it is exactly one labelled or tabled code with two neighbours swapped. When the document labels or tables that writing itself anywhere, it is another item and is not reported (a catalog's AB-1234 and AB-1243 are two items), and two labelled or tabled item codes are never compared with each other (listed_kinds names the kinds read so); nor is a code two labelled codes swap to, or a number with no letters or hyphen (48251). A member number or member ID and a customer number may be different numbers, so they are never compared. A number written in groups one space apart (HM 5520 8137) is read as one while each further group is four or more capitals and digits holding a digit, stopping at the line's end or before a word or a short count (expires, 100 copies). A model, model number or model no. labels a product's model, and, as with item codes, two labelled or tabled models are never compared. When a product document (a recall, a warranty) names exactly one code as its own (in its title, on a line holding only a model or item label and the code, as Model: SH-710, or in a table under such a label), a shorter code is read too (two letters or more before a hyphen, and two digits or more: SH-710, FT-38), and a code written once that is that code with two neighbours swapped (SH-701) is reported. Not when the document names two codes so (a catalog), nor a code in a table, one written twice or more, one on a line that also names the document's code (the SH-710 replaces the SH-701), one after a label of another kind (booking number), or one with a single letter (A-12)."
@@ -74,8 +74,8 @@ example:
74
74
  The fee is monthly.
75
75
 
76
76
  not_flagged:
77
- ja: 参照先が見出しを持たないとき、参照先が一つに決まらないとき、他の文書の条(民法第709条)、括弧の中が数字を含むか「前述」「参照」のような語のときは見ません。
78
- en: References whose target has no heading or cannot be told apart, references to another document, and brackets holding a number or a word like "above" or "see" are left alone.
77
+ ja: 参照先が見出しを持たないとき、参照先が一つに決まらないとき、他の文書の条(民法第709条)、括弧の中が数字を含むか「前述」「参照」のような語のとき、句点で終わる断り(「第七項を除く。」)のときは見ません。
78
+ en: References whose target has no heading or cannot be told apart, references to another document, brackets holding a number or a word like "above" or "see", and brackets closed by a Japanese full stop (a note on the scope, 「第七項を除く。」) are left alone.
79
79
  rewrite:
80
80
  depth: light
81
81
  ja:
@@ -2,6 +2,7 @@ id: repeated-sentence-ending
2
2
  layer: L3
3
3
  status: stable
4
4
  how_to_find: ending-run
5
+ word_list: parallel-definition
5
6
  requires: [pos]
6
7
  languages: [ja]
7
8
  severity: info
@@ -40,8 +41,8 @@ example:
40
41
  この機能は必要で、設定も簡単です。費用はかかりません。
41
42
 
42
43
  not_flagged:
43
- ja: 段落をまたいだ文は続きと見ません。助動詞で終わらない文(体言止め、言い切りの動詞)は比べず、そこで続きが切れます。動詞が違えば(読みました、書きました)同じ文末とは見ません。
44
- en: Sentences in different paragraphs are not a run. A sentence that does not end with an auxiliary (a noun, a bare verb) is not compared and breaks the run. Different verbs (読みました, 書きました) are different endings.
44
+ ja: 段落をまたいだ文は続きと見ません。助動詞で終わらない文(体言止め、言い切りの動詞)は比べず、そこで続きが切れます。動詞が違えば(読みました、書きました)同じ文末とは見ません。違う語を同じ型で定義する文の並び(台風は〜を指します。ハリケーンは〜を指します。)は、型をそろえたものなので指しません。
45
+ en: Sentences in different paragraphs are not a run. A sentence that does not end with an auxiliary (a noun, a bare verb) is not compared and breaks the run. Different verbs (読みました, 書きました) are different endings. Sentences that each define a different term in the same frame (台風は〜を指します。ハリケーンは〜を指します。) share their ending on purpose and are not reported.
45
46
  level_meaning:
46
47
  ja: 同じ文末の文が {limit} 文続くまで
47
48
  en: up to {limit} sentences in a row with the same ending
@@ -60,8 +60,8 @@ example:
60
60
  I have no other questions.
61
61
 
62
62
  not_flagged:
63
- ja: 確認・返信・提出のように、済んだかどうかが後で分かる動作を頼む文だけを見ます。「ご了承ください」のような心構えの依頼と、「ご不明な点があれば、ご連絡ください」のような条件付きの申し出と、「ご質問はメールでお送りください」のような質問を受け付ける申し出は見ません。期限か担当が、その文か次の文にあれば指しません。ビジネスの文書でだけ動きます。
64
- en: Only requests for an action whose completion can be checked (review, reply, send) are read. Courtesy requests, conditional offers ("If you have questions, let me know") and open offers ("Please send any questions to me") are not. A deadline or owner in the same or the next sentence is enough. Business documents only.
63
+ ja: 確認・返信・提出のように、済んだかどうかが後で分かる動作を頼む文だけを見ます。「ご了承ください」のような心構えの依頼、「ご不明な点があれば、ご連絡ください」のような条件付きの申し出、「ご質問はメールでお送りください」のような質問を受け付ける申し出、「ご相談ください」「お越しください」のような誘い、連絡先の行(「電話:」)と同じ文の依頼は見ません。期限か担当が、その文か次の文にあれば指しません。「ご提出いただく前に」「送信後、」のように、いつするかを依頼の文が言っていれば期限と読みます。見出しが期限を言っていれば(「見積提出期限:…」「【随時受付】」)、その下の依頼はその期限を受け継ぎます。ビジネスの文書でだけ動きます。
64
+ en: Only requests for an action whose completion can be checked (review, reply, send) are read. Courtesy requests, conditional offers ("If you have questions, let me know"), open offers ("Please send any questions to me"), invitations ("Please come and register") and a request on a contact line (a "Fax" or "Phone" label and its number) are not. A deadline or owner in the same or the next sentence is enough; so is a timing in the request itself ("after you pay"), or a heading above it that names the deadline. Business documents only.
65
65
  rewrite:
66
66
  depth: light
67
67
  ja:
@@ -74,5 +74,5 @@ example:
74
74
  config: { genre: technical/spec }
75
75
 
76
76
  not_flagged:
77
- ja: 要求の文でない文(説明や背景)、法令、ブログやビジネス文書は見ません。語彙表にない言い方は指しません。文書が定めた名前の「等」(以下「委託先等」という、銀行等(…をいう。)、定義の号の頭の語)と、監査等委員会のように後ろへ語が続く「等」は、列挙を閉じているので指しません。
78
- en: Sentences that state no requirement (background, explanation), statutes, and blogs and business documents are not checked. Phrases not on chaff's lists are not reported. An open-ended word inside a name the document defines (a quoted term, or one defined in the brackets after it) is not reported.
77
+ ja: 要求の文でない文(説明や背景)、法令、ブログやビジネス文書は見ません。語彙表にない言い方は指しません。文書が定めた名前の「等」(以下「委託先等」という、銀行等(…をいう。)、定義の号の頭の語)と、監査等委員会のように後ろへ語が続く「等」は、列挙を閉じているので指しません。英語の as soon as possible は、同じ文に日数の期限(no later than two days after)があれば、期限が決まっているので指しません。
78
+ en: Sentences that state no requirement (background, explanation), statutes, and blogs and business documents are not checked. Phrases not on chaff's lists are not reported. An open-ended word inside a name the document defines (a quoted term, or one defined in the brackets after it) is not reported. "As soon as possible" followed in the same sentence by a limit in numbers ("but in any event no later than two days after") is bounded, and not reported.
@@ -55,8 +55,8 @@ example:
55
55
  Today we look at the new tool. Open the settings. The gear icon at the top right opens a list of everything you can change, so pick the option you want there and switch it on. Then save. That is the first part done. Next, invite the rest of the team from the page on the left.
56
56
 
57
57
  not_flagged:
58
- ja: 文が 8 文より少ない文書は、ばらつきが当てにならないので測りません。
59
- en: A document with fewer than 8 sentences is not measured, because the spread means little.
58
+ ja: 箇条書きの項目は数えません(揃えて書くのが正しい形です)。地の文が 8 文より少ない文書は、ばらつきが当てにならないので測りません。
59
+ en: List items are not counted, since a list is written alike on purpose. Prose of fewer than 8 sentences is not measured, because the spread means little.
60
60
  level_meaning:
61
61
  ja: 文の長さのばらつきが {limit}% 未満なら指摘
62
62
  en: reported when sentence length varies by less than {limit}%
@@ -10,8 +10,8 @@ name:
10
10
  en: Heading capitalisation is inconsistent
11
11
 
12
12
  why:
13
- ja: Title Case と sentence case のどちらが正しいかは決めません。1 つの文書で混ざっていると、見出しの階層が変わったように見えます。文書の題名(先頭にある深さ 1 の見出しが 1 つだけのとき)は名前なので比べません。節の見出しが同数に割れたときだけ、題名の流儀に合わせます。頭の番号の札(Section 3. / Day 1:)と、曜日・月の名(どちらの流儀でも大文字)は、どちらの流儀の証拠にも数えません。
14
- en: Neither Title Case nor sentence case is wrong. Mixed within one document, the headings look like they change level. The document's title (a single top-level heading that opens it) is a name and is not compared; when the section headings split evenly, the title's style decides. A leading label (Section 3., Day 1:) and the names of weekdays and months, capitalised in either style, count as evidence for neither.
13
+ ja: Title Case と sentence case のどちらが正しいかは決めません。1 つの文書で混ざっていると、見出しの階層が変わったように見えます。文書の題名(先頭にある深さ 1 の見出しが 1 つだけのとき)は名前なので比べません。節の見出しが同数に割れたときだけ、題名の流儀に合わせます。頭の番号の札(Section 3. / Day 1:)と、曜日・月の名と、本文が文の途中で大文字で書く名前(どれもどちらの流儀でも大文字)は、どちらの流儀の証拠にも数えません。
14
+ en: Neither Title Case nor sentence case is wrong. Mixed within one document, the headings look like they change level. The document's title (a single top-level heading that opens it) is a name and is not compared; when the section headings split evenly, the title's style decides. A leading label (Section 3., Day 1:), the names of weekdays and months, and the names the body itself capitalises mid-sentence, all capitalised in either style, count as evidence for neither.
15
15
 
16
16
  message:
17
17
  ja: この見出しだけ他と大文字化の流儀が違います(文書の中で {count} 個)
@@ -0,0 +1,71 @@
1
+ id: toki-as-condition
2
+ layer: L3
3
+ status: stable
4
+ how_to_find: condition-toki
5
+ word_list: condition-toki
6
+ extra_word_lists: [condition-follower]
7
+ requires: [pos]
8
+ languages: [ja]
9
+ severity: info
10
+
11
+ name:
12
+ ja: 条件を言う「時」
13
+ en: 時 written for a condition (法令用語の「とき」)
14
+
15
+ why:
16
+ ja: 法令の文では、「時」は時点(相続開始の時から)、「とき」は条件(認定を受けたときは)を言います。「認定を受けた時は」と書くと、読み手は「受けた時点で」の意味か「受けた場合に」の意味かを考えます。契約書や規程は法令の書き方にそろえるので、同じ使い分けをします。動詞や助動詞で終わる節の後ろの「時」に、「は」「には」「も」が続くときだけ指します。
17
+ en: Japanese legal drafting writes 時 for a point in time (相続開始の時から, "from the time the succession opens") and とき for a condition (認定を受けたときは, "if the approval is given"). With 認定を受けた時は the reader has to decide whether a moment or a condition is meant. Contracts and internal rules follow the statutes' usage. chaff reports 時 only after a clause that ends in a verb or an auxiliary and before は, には or も.
18
+
19
+ message:
20
+ ja: 条件を言うなら「{matched}」は「{preferred}」と書きます
21
+ en: 'For a condition, legal Japanese writes "{matched}" as "{preferred}"'
22
+
23
+ how_to_fix:
24
+ ja: 条件なら「とき」にしてください(認定を受けた時は → 認定を受けたときは)。時点を言うなら「時から」「時に」のように書けば、時点と読めます。
25
+ en: For a condition, write とき (認定を受けた時は → 認定を受けたときは). For a point in time, write 時から or 時に so that it reads as one.
26
+
27
+ placeholders:
28
+ matched:
29
+ ja: 見つけた語
30
+ en: the word found
31
+ preferred:
32
+ ja: 条件を言う書き方
33
+ en: the word for a condition
34
+
35
+ levels: { strict: warning, normal: info, relaxed: info }
36
+
37
+ use_for: [legal, docs, academic, literature, speech]
38
+ off_for:
39
+ docs: "The 時 / とき split is a convention of legal drafting: outside it, 時は for a condition is not a slip."
40
+ academic: "The 時 / とき split is a convention of legal drafting: outside it, 時は for a condition is not a slip."
41
+ literature: "The 時 / とき split is a convention of legal drafting: outside it, 時は for a condition is not a slip."
42
+ speech: "The 時 / とき split is a convention of legal drafting: outside it, 時は for a condition is not a slip."
43
+
44
+ group: wording
45
+ summary:
46
+ ja: 「認定を受けた時は」のように、条件を「とき」でなく「時」で書いた所
47
+ en: 時 written for a condition (受けた時は) where legal Japanese writes とき
48
+ example:
49
+ ja:
50
+ config: { genre: legal/contract }
51
+ before: |
52
+ 第5条 乙は、許可の取消しを受けた時は、直ちに甲に通知しなければならない。
53
+ after: |
54
+ 第5条 乙は、許可の取消しを受けたときは、直ちに甲に通知しなければならない。
55
+
56
+ not_flagged:
57
+ ja: 時点を言う「時」(相続開始の時から、死亡した時に、契約の終了の時まで)、名詞や「その」「ある」の後ろの「時」(事故の時は、その時は)、「時効」「時間」「同時」「随時」「臨時」「当時」「時点」「時期」のような語、鉤括弧で引いた中は指しません。法務のジャンルだけで動きます。
58
+ en: 時 for a point in time (相続開始の時から, 死亡した時に, 契約の終了の時まで), 時 after a noun or after その and ある (事故の時は, その時は), words such as 時効, 時間, 同時, 随時, 臨時, 当時, 時点 and 時期, and anything quoted in 「」 are not reported. Only the legal genres run this rule.
59
+ rewrite:
60
+ depth: light
61
+ ja:
62
+ direction: 条件を言う「時」を「とき」に替えてください。替えるのはその一語だけです。
63
+ pairs:
64
+ - before: 乙は、許可の取消しを受けた時は、直ちに甲に通知しなければならない。
65
+ after: 乙は、許可の取消しを受けたときは、直ちに甲に通知しなければならない。
66
+ - before: 支払期日を過ぎる時には、年三パーセントの遅延損害金を支払う。
67
+ after: 支払期日を過ぎるときには、年三パーセントの遅延損害金を支払う。
68
+ keep:
69
+ - 条の番号と中身
70
+ avoid:
71
+ - 時点を言う「時」(時から、時まで、時に)まで替える
@@ -10,8 +10,8 @@ name:
10
10
  en: A total that is not the sum of its items
11
11
 
12
12
  why:
13
- ja: 見積や請求の「合計」が、上に並べた金額の和と合わないと、読み手はどちらが正しいのかを計算し直すことになります。行を足したり消したりしたあとに、合計だけ直し忘れると起きます。箇条書きか表で、合計の語(合計・小計)で始まる行を、同じ単位で同じ列の金額の和と比べます。表の最初の列の見出しか、合計の行が数を書いた列の見出しが名指す語を付けた合計(見出しが「控除項目」の表の「控除合計」、「単位数」の列の「修得単位合計」)も合計の行と読みます。合計が足す期間を頭に付けた合計(年間合計、年計、通年合計)も合計の行と読みます。見出しが「項目」の表でも、最後の行の差引合計・控除合計は、上に合計のような行が無く金額の列が一つなら合計の行と読みます。契約書のように一つの文に書いた合計(「保守費60,000円、運用費30,000円とし、合計100,000円とする」「月額150,000円(内訳:…)」)も、その文に並べた同じ単位の金額の和と比べます。小計のあとの総計のように、足し方が何通りかあるときは、どの足し方でも合わないときだけ指します。
14
- en: When the total of a quote or an invoice is not the sum of the amounts listed above it, the reader has to add them up again to find out which is right. It happens when a line is added or removed and the total is not updated. In a list or a table, a line starting with a total word (Total, Subtotal) is compared with the sum of the amounts in the same unit and column above it. A total with a word that the header of the table's first column, or of the column the total holds its number in, names ("Total deductions" under "Deduction", "Total credits earned" in the "Credits" column) is read as a total line too, and so is a total naming the span it covers ("Total for the year", "Year total", "Annual total"). Under a header that names nothing ("Item"), a "Total deductions" on the table's last row is read too, when no row above it is a total or a gross or net amount and the table has one column of amounts. A total written in a sentence, as contracts do ("$6,000 for hosting and $3,000 for support, for a total of $9,000", "$8 per month, made up of …"), is compared with the amounts in the same unit listed in that sentence. When there is more than one way to add them up, such as a grand total after a subtotal and tax, it is pointed out only when none of them matches.
13
+ ja: 見積や請求の「合計」が、上に並べた金額の和と合わないと、読み手はどちらが正しいのかを計算し直すことになります。行を足したり消したりしたあとに、合計だけ直し忘れると起きます。箇条書きか表で、合計の語(合計・小計)で始まる行を、同じ単位で同じ列の金額の和と比べます。表の最初の列の見出しか、合計の行が数を書いた列の見出しが名指す語を付けた合計(見出しが「控除項目」の表の「控除合計」、「単位数」の列の「修得単位合計」)も合計の行と読みます。合計が足す期間を頭に付けた合計(年間合計、年計、通年合計)も合計の行と読みます。見出しが「項目」の表でも、最後の行の差引合計・控除合計は、上に合計のような行が無く金額の列が一つなら合計の行と読みます。契約書のように一つの文に書いた合計(「保守費60,000円、運用費30,000円とし、合計100,000円とする」「月額150,000円(内訳:…)」「総額12,000円:設計5,000円、開発6,000円」)も、その文に並べた同じ単位の金額の和と比べます。合計で終わる文の次の文が「内訳は」で始まるときは、その文の金額と比べます。小計のあとの総計のように、足し方が何通りかあるときは、どの足し方でも合わないときだけ指します。
14
+ en: When the total of a quote or an invoice is not the sum of the amounts listed above it, the reader has to add them up again to find out which is right. It happens when a line is added or removed and the total is not updated. In a list or a table, a line starting with a total word (Total, Subtotal) is compared with the sum of the amounts in the same unit and column above it. A total with a word that the header of the table's first column, or of the column the total holds its number in, names ("Total deductions" under "Deduction", "Total credits earned" in the "Credits" column) is read as a total line too, and so is a total naming the span it covers ("Total for the year", "Year total", "Annual total"). Under a header that names nothing ("Item"), a "Total deductions" on the table's last row is read too, when no row above it is a total or a gross or net amount and the table has one column of amounts. A total written in a sentence, as contracts do ("$6,000 for hosting and $3,000 for support, for a total of $9,000", "$8 per month, made up of …", "a total of $12,000 — $5,000 for design and $6,000 for development"), is compared with the amounts in the same unit listed in that sentence, and with the amounts of the next sentence when it opens with a breakdown phrase ("This consists of …"). When there is more than one way to add them up, such as a grand total after a subtotal and tax, it is pointed out only when none of them matches.
15
15
 
16
16
  message:
17
17
  ja: 合計「{written}」が、内訳の金額の和({sum})と合いません
@@ -61,5 +61,5 @@ example:
61
61
  | Total | $8,000 |
62
62
 
63
63
  not_flagged:
64
- ja: 単位や列の違う金額は足しません。合計の語に表の見出しが名指さない語を付けた行(見出しが「項目」の表の「消費税合計」)は、別の種類の合計かもしれないので比べません。差引合計・控除合計も、表の最後の行でないとき、上に合計の行や総支給額・支給合計の行があるとき、金額の列が二つ以上あるときは比べず、下から続けた行の和か、その上の行の和からそれを引いた額と合えば指しません。面積のように、上の行の和とは限らない量の合計(面積合計)も比べません。前の期間の合計(前年合計)は読まず、期間を付けた合計が内訳の和を一年に直した額(ちょうど4倍・12倍・52倍。月額の内訳に年間合計)なら比べません。重さ・容量・長さ(mg、g、mL、L、cm、km)は、列のどの行も同じ種類の量なら換算して足します(500mg と 0.5g は 1g)。何あたりかを書いた量(300mg/錠)、目安の量(約300mg)、範囲(300〜400mg)がある列は足しません。足し方が何通りもあるとき(小計と税のあとの総計など)は、どれとも合わないときだけ指します。文の中では、合計の語(合計・総額)のすぐ後ろの金額か内訳の語(内訳は)のすぐ前の金額だけを合計と読み、内訳の金額が二つ以上あるときだけ比べます。並びの一部(単価や上限など、合計の語から離れた金額を除いた並び)の和か、一つを引いた額(値引き)と合えば指しません。
65
- en: Amounts in another unit or column are not added. A total with a word the table's header does not name ("Total tax" under "Item") is not compared, as it may be a total of another kind, nor is a total of a quantity that need not be the sum of the rows (Total area). Under such a header, "Total deductions" is not compared when it is not the last row, when a total or a gross or net amount (Gross pay) is above it, or when the table has two columns of amounts; it is not reported when it matches the last few rows, or the rows above those less them. A total for another span ("Prior-year total") is not read, and a total naming its span that is the items scaled to a year (exactly 4, 12 or 52 times their sum, as monthly items under an annual total) is not compared. Mass, volume and length (mg, g, mL, L, cm, km) are converted and added when every row of the column is the same kind of measure (500 mg and 0.5 g make 1 g); a column with an amount per something (300 mg/tablet), a rough amount (about 300 mg) or a range (300-400 mg) is not added. Where there is more than one way to add them up, it is reported only when none matches. In a sentence, only the amount right after a total phrase (a total of) or right before a breakdown phrase (made up of) is read as a total, and only when two or more items in its unit are listed. It is not reported when the items nearest the phrase add up to it, or when it matches with one item taken away (a discount).
64
+ ja: 単位や列の違う金額は足しません。合計の語に表の見出しが名指さない語を付けた行(見出しが「項目」の表の「消費税合計」)は、別の種類の合計かもしれないので比べません。差引合計・控除合計も、表の最後の行でないとき、上に合計の行や総支給額・支給合計の行があるとき、金額の列が二つ以上あるときは比べず、下から続けた行の和か、その上の行の和からそれを引いた額と合えば指しません。面積のように、上の行の和とは限らない量の合計(面積合計)も比べません。前の期間の合計(前年合計)は読まず、期間を付けた合計が内訳の和を一年に直した額(ちょうど4倍・12倍・52倍。月額の内訳に年間合計)なら比べません。重さ・容量・長さ(mg、g、mL、L、cm、km)は、列のどの行も同じ種類の量なら換算して足します(500mg と 0.5g は 1g)。何あたりかを書いた量(300mg/錠)、目安の量(約300mg)、範囲(300〜400mg)がある列は足しません。足し方が何通りもあるとき(小計と税のあとの総計など)は、どれとも合わないときだけ指します。文の中では、合計の語(合計・総額)のすぐ後ろの金額か内訳の語(内訳は)のすぐ前の金額だけを合計と読み、内訳の金額が二つ以上あるときだけ比べます。並びの一部(単価や上限など、合計の語から離れた金額を除いた並び)の和か、一つを引いた額(値引き)と合えば指しません。合計のすぐ後ろの「:」から続く内訳は、「うち」「または」「最大」のように内訳のすべてとは限らない語があるとき、ほかの単位の金額や割合を並べたときは比べません。
65
+ en: Amounts in another unit or column are not added. A total with a word the table's header does not name ("Total tax" under "Item") is not compared, as it may be a total of another kind, nor is a total of a quantity that need not be the sum of the rows (Total area). Under such a header, "Total deductions" is not compared when it is not the last row, when a total or a gross or net amount (Gross pay) is above it, or when the table has two columns of amounts; it is not reported when it matches the last few rows, or the rows above those less them. A total for another span ("Prior-year total") is not read, and a total naming its span that is the items scaled to a year (exactly 4, 12 or 52 times their sum, as monthly items under an annual total) is not compared. Mass, volume and length (mg, g, mL, L, cm, km) are converted and added when every row of the column is the same kind of measure (500 mg and 0.5 g make 1 g); a column with an amount per something (300 mg/tablet), a rough amount (about 300 mg) or a range (300-400 mg) is not added. Where there is more than one way to add them up, it is reported only when none matches. In a sentence, only the amount right after a total phrase (a total of) or right before a breakdown phrase (made up of) is read as a total, and only when two or more items in its unit are listed. It is not reported when the items nearest the phrase add up to it, or when it matches with one item taken away (a discount). Items after a colon or a dash right after a total are not compared when "including", "or" or "up to" shows they may not be every item, when one of them is in another unit, or when they are percentages.
@@ -52,5 +52,5 @@ example:
52
52
  The plan (see below) is ready.
53
53
 
54
54
  not_flagged:
55
- ja: 行の頭や空白の後ろの「1)」「a)」「事例)」のような三文字までの番号の印、数の後ろの「)」、行の頭でも使う番号の印を括弧の中に書いたもの(「以下、事例5)まで同じ。」)、コードと URL は数えません。段落をまたいで閉じる括弧と、次の段落を同じ引用符で始める台詞も指しません。
56
- en: Labels of up to three characters such as "1)" or "a)" at the start of a line or after a space, a ")" right after a number, a numbered label also used at the start of a line, written inside an aside ("(see the notes; A3) and more)"), code and URLs are not counted. A bracket closed in a later paragraph, and a quotation carried into a paragraph that opens with the same mark, are not reported.
55
+ ja: 行の頭や空白の後ろの「1)」「a)」「事例)」のような三文字までの番号の印、数の後ろの「)」、行の頭でも使う番号の印を括弧の中に書いたもの(「以下、事例5)まで同じ。」)、コードと URL は数えません。段落をまたいで閉じる括弧と、次の段落を同じ引用符で始める台詞も指しません。小数と単位の間の引用符はインチの印(.015 “Hg)として数えません。
56
+ en: Labels of up to three characters such as "1)" or "a)" at the start of a line or after a space, a ")" right after a number, a numbered label also used at the start of a line, written inside an aside ("(see the notes; A3) and more)"), code and URLs are not counted. A bracket closed in a later paragraph, and a quotation carried into a paragraph that opens with the same mark, are not reported. A curly quote between a decimal number and a unit is an inch mark (".015 “Hg") and is not counted.
@@ -7,6 +7,7 @@ extra_word_lists:
7
7
  [
8
8
  definition-marker,
9
9
  definition-verb,
10
+ definition-statement,
10
11
  meridiem,
11
12
  time-zone,
12
13
  currency-code,
@@ -19,6 +20,14 @@ extra_word_lists:
19
20
  date-time-unit,
20
21
  http-method,
21
22
  reference-list-heading,
23
+ legal-form,
24
+ citation-series,
25
+ carrier-name,
26
+ name-prefix,
27
+ street-suffix,
28
+ tax-code,
29
+ capital-phrase,
30
+ name-determiner,
22
31
  ]
23
32
  uses: [pos]
24
33
  severity: info
@@ -70,5 +79,5 @@ not_flagged:
70
79
  ja: 誰でも知っている略語(URL、PDF など)と、前後の括弧で説明した略語は指しません。
71
80
  en: Common acronyms (URL, PDF) and acronyms spelled out in brackets next to them are not reported.
72
81
  level_meaning:
73
- ja: 説明のない略語が {limit} 種類あれば指摘
74
- en: reported once {limit} different acronyms go unexplained
82
+ ja: 説明のない略語が {limit} 種類あれば指摘。文書が自分で略語を {limit} 個展開していれば、1 つの抜けから指摘
83
+ en: reported once {limit} different acronyms go unexplained, or from the first one when the document itself spells out {limit} others
@@ -69,8 +69,8 @@ example:
69
69
  1. The Supplier shall provide the hosting services (the "Services") to the Customer.
70
70
 
71
71
  not_flagged:
72
- ja: 文書が「本」を付けた語を一つも定義していなければ見ません。定義した語とその言い換え(本件業務、defined-term-form が見ます)、定義した語で始まる語(本サービス上)、この文書やその一部を指す語(本条、本項、本書、本契約、本利用規約、本サイト)、どこかでかぎ括弧に入れた語(定義の書き方を chaff が読めなかったもの)、一語の言葉(本人、本日、本社)は見ません。同じ語は最初の一か所だけ指します。英語は、大文字は法令・組織・方針の名前(the Federal Trade Commission Act、Acceptable Use Policies)にも使うので、狭く読みます。"X" means や (the "X") の形の定義が二つ未満の文書は見ません。文の頭や記号の後ろの語、小文字の名詞の前に付けた語(the Premium plan)、名前の一覧(proper-name-word、地名、曜日と月、会社の形、当事者の役割)の語を含むもの、条の参照(Section 4、Schedule A)、見出し・リンク・太字・HTML の要素・表・箇条書きの見出しの中、どこかで引用符か太字に入れた語、定義した語を含むもの(大文字小文字を問いません)、文書のどこかで小文字でも書いた語(your Account と your account。普通の語か画面の名前)は見ません。法令・判決・特許は見ません。契約書・規約のジャンルで見ます。
73
- en: "A document that defines no term with the prefix is not read. Defined terms and their other-prefix forms (本件業務, which defined-term-form reads), terms that start with a defined term (本サービス上), the document's names for itself and its parts (本条, 本項, 本書, 本契約, 本利用規約, 本サイト), terms set in quotes anywhere (a definition chaff could not read), and single words (本人, 本日, 本社) are not reported. Each term is reported once, at its first use. English is read narrowly, since capitals also name laws, organisations and policies (the Federal Trade Commission Act, Acceptable Use Policies): a document with fewer than two definitions written with a defining word (“X” means, (the “X”)) is not read; and a word at the start of a sentence or after a mark, a modifier of a lower-case noun (the Premium plan), a run holding a word of the name lists (proper-name-word, places, weekdays and months, company forms, party roles), a reference to a part (Section 4, Schedule A), anything inside a heading, a link, bold, an HTML element, a table or a list item's label, a word set in quotes or bold anywhere, a run holding a defined term in any case, and a word the document also writes in lower case (your Account and your account: an ordinary word or a screen's name) are not reported. Statutes, court decisions and patents are not read; the contract genre runs this rule."
72
+ ja: 文書が「本」を付けた語を一つも定義していなければ見ません。定義した語とその言い換え(本件業務、defined-term-form が見ます)、定義した語で始まる語(本サービス上)、この文書やその一部を指す語(本条、本項、本書、本契約、本利用規約、本サイト)、どこかでかぎ括弧に入れた語(定義の書き方を chaff が読めなかったもの)、一語の言葉(本人、本日、本社)は見ません。同じ語は最初の一か所だけ指します。英語は、大文字は法令・組織・方針の名前(the Federal Trade Commission Act、Acceptable Use Policies)にも使うので、狭く読みます。"X" means や (the "X") の形の定義が二つ未満の文書は見ません。文の頭や記号の後ろの語、小文字の名詞の前に付けた語(the Premium plan)、名前の一覧(proper-name-word、地名、曜日と月、会社の形、当事者の役割)の語を含むもの、条の参照(Section 4、Schedule A)、前後の語から名前と分かるもの(後ろに番号が付く Proposition 65、長い名前の頭 Post Holdings, Inc. や Canton, Ohio や the Federal Food, Drug, and Cosmetic Act、直後の括弧で定義するもの Certificate of Analysis (“COA”) や the Closing (as defined in the Merger Agreement)、文書が定義した略語の頭文字になるもの “IRS” means the Internal Revenue Service、当事者の立場 Citibank, N.A., as Administrative Agent)、見出し・リンク・太字・HTML の要素・表・箇条書きの見出し・条の頭の見出し(5.8 No Representation or Warranty.)の中、どこかで引用符か太字に入れた語、定義した語を含むもの(大文字小文字を問いません)、文書のどこかで小文字でも書いた語(your Account と your account。普通の語か画面の名前)は見ません。法令・判決・特許は見ません。契約書・規約のジャンルで見ます。
73
+ en: "A document that defines no term with the prefix is not read. Defined terms and their other-prefix forms (本件業務, which defined-term-form reads), terms that start with a defined term (本サービス上), the document's names for itself and its parts (本条, 本項, 本書, 本契約, 本利用規約, 本サイト), terms set in quotes anywhere (a definition chaff could not read), and single words (本人, 本日, 本社) are not reported. Each term is reported once, at its first use. English is read narrowly, since capitals also name laws, organisations and policies (the Federal Trade Commission Act, Acceptable Use Policies): a document with fewer than two definitions written with a defining word (“X” means, (the “X”)) is not read; and a word at the start of a sentence or after a mark, a modifier of a lower-case noun (the Premium plan), a run holding a word of the name lists (proper-name-word, places, weekdays and months, company forms, party roles), a reference to a part (Section 4, Schedule A), a name shown by the words around it (a number after it: Proposition 65; a longer name it starts: Post Holdings, Inc., Canton, Ohio, the Federal Food, Drug, and Cosmetic Act; brackets right after it that define it: Certificate of Analysis (“COA”), the Closing (as defined in the Merger Agreement); initials that spell a term the document defines: “IRS” means the Internal Revenue Service; a party's capacity: Citibank, N.A., as Administrative Agent), anything inside a heading, a link, bold, an HTML element, a table, a list item's label or a clause's run-in caption (5.8 No Representation or Warranty.), a word set in quotes or bold anywhere, a run holding a defined term in any case, and a word the document also writes in lower case (your Account and your account: an ordinary word or a screen's name) are not reported. Statutes, court decisions and patents are not read; the contract genre runs this rule."
74
74
  rewrite:
75
75
  depth: light
76
76
  ja:
@@ -43,5 +43,5 @@ example:
43
43
  We can meet on Friday 9 October to go through the quote.
44
44
 
45
45
  not_flagged:
46
- ja: "例として置いた「○○」、Markdown のリンク、脚注の番号、チェック欄とチェックリストの項目(- [ ] TODO: …)、値が続く見出しの札(【氏名】山田)、コードとコードのコメント(// TODO)、文の中の「未定」(日程は未定です)は指しません。"
47
- en: 'Markdown links and reference definitions, footnote numbers, checkboxes and checklist items ("- [ ] TODO: …"), a label its value follows ("[Date]: 2024-04-01"), code and code comments ("// TODO"), and "TBD" inside a sentence ("the date is TBD") are not reported.'
46
+ ja: "例として置いた「○○」、Markdown のリンク、脚注の番号、チェック欄とチェックリストの項目(- [ ] TODO: …)、値が続く見出しの札(【氏名】山田)、コードとコードのコメント(// TODO)、文の中の「未定」(日程は未定です)、見出しが雛形と言う節(「## 雛形」「# 記入例」)の中の空欄は指しません。"
47
+ en: 'Markdown links and reference definitions, footnote numbers, checkboxes and checklist items ("- [ ] TODO: …"), a label its value follows ("[Date]: 2024-04-01"), code and code comments ("// TODO"), "TBD" inside a sentence ("the date is TBD"), and blanks under a heading that names a template ("## Template", "# Sample letter") are not reported.'
@@ -47,8 +47,8 @@ example:
47
47
  The report is attached to this email.
48
48
 
49
49
  not_flagged:
50
- ja: 大文字を含む語、四字より短い語、コード・URL・メールアドレスの中の語、強調や角括弧で頭の字を分けた語の残り(**G**lobally の lobally、[e]xpressions の xpressions)、文書で二度以上使う語、一字違いの辞書の語が無い語、chaff.yaml の names に並べた語、語彙表 known-misspelling が別に言う語は指しません。
51
- en: Words with a capital letter, words shorter than four letters, words in code, URLs and email addresses, the rest of a word whose first letter is set apart by emphasis or brackets (lobally in **G**lobally, xpressions in [e]xpressions), words used twice or more in the document, words with no dictionary word one letter away, words listed under names in chaff.yaml, and the misspellings known-misspelling reports are not reported.
50
+ ja: 大文字を含む語、四字より短い語、コード・URL・メールアドレスの中の語、強調や角括弧で頭の字を分けた語の残り(**G**lobally の lobally、[e]xpressions の xpressions)、文書で二度以上使う語、一字違いの辞書の語が無い語、chaff.yaml の names に並べた語、語彙表 known-misspelling が別に言う語は指しません。同じ文書がコード(`tidyq check` やコードの区画)にも書いた語も、その文書の名前なので指しません。
51
+ en: Words with a capital letter, words shorter than four letters, words in code, URLs and email addresses, the rest of a word whose first letter is set apart by emphasis or brackets (lobally in **G**lobally, xpressions in [e]xpressions), words used twice or more in the document, words with no dictionary word one letter away, words listed under names in chaff.yaml, and the misspellings known-misspelling reports are not reported. Nor is a word the document also writes in code (`tidyq check`, a code block), since it is a name the document uses.
52
52
  rewrite:
53
53
  depth: light
54
54
  en:
@@ -50,8 +50,8 @@ example:
50
50
  This agreement is between Harbour Ltd (the "Seller") and Hill Ltd (the "Buyer"). The Seller ships within five days.
51
51
 
52
52
  not_flagged:
53
- ja: 定義の条(「X」とは…をいう)で定義した語は、前で使っても言いません。定義の条は文書の頭にも終わりにも置く書き方があるためです。規約やポリシーの丁寧な形(以下「X」といいます)も、法令の形と同じに読みます。見出しの行(章・節の行、条の前の「(買主の義務)」のような見出し)の語と、漢字で終わる語にさらに漢字が続く長い語(「監査委員会」の「監査委員」)と、定義の括弧の前の長い名前をそのまま書いた所(「…作成の手引き(以下「手引き」という。)」より前の「…作成の手引き」)は、使った所に数えません。最初の一か所だけを指します。
54
- en: Terms defined in a definitions clause ("X" means ...) are not checked, since a definitions clause may come first or last. A heading line (a chapter or section line, or the caption above an article) does not count as a use, nor does a longer word that runs on in kanji past a term ending in kanji, nor an earlier copy of the long name written just before the definition's bracket. The polite Japanese form (以下「X」といいます) is read like the statute form. Only the first early use is pointed at.
53
+ ja: 定義の条(「X」とは…をいう)で定義した語は、前で使っても言いません。定義の条は文書の頭にも終わりにも置く書き方があるためです。規約やポリシーの丁寧な形(以下「X」といいます)も、法令の形と同じに読みます。見出しの行(章・節の行、条の前の「(買主の義務)」のような見出し)の語と、漢字で終わる語にさらに漢字が続く長い語(「監査委員会」の「監査委員」)と、定義の括弧の前の長い名前をそのまま書いた所(「…作成の手引き(以下「手引き」という。)」より前の「…作成の手引き」)は、使った所に数えません。最初の一か所だけを指します。別の語を定義する括弧の前の名前の中(This Services Agreement (this "Agreement") の Services、本サービス利用契約(以下「本契約」という。)の本サービス)も、使った所に数えません。
54
+ en: Terms defined in a definitions clause ("X" means ...) are not checked, since a definitions clause may come first or last. A heading line (a chapter or section line, or the caption above an article) does not count as a use, nor does a longer word that runs on in kanji past a term ending in kanji, nor an earlier copy of the long name written just before the definition's bracket. The polite Japanese form (以下「X」といいます) is read like the statute form. Only the first early use is pointed at. A word inside the name written right before another term's defining bracket (Services in This Services Agreement (this "Agreement")) is not a use either.
55
55
  rewrite:
56
56
  depth: structure
57
57
  ja:
@@ -53,8 +53,8 @@ example:
53
53
  Report an incident within 30 minutes and notify the affected teams. Record it in the incident log and fix the cause by the next working day.
54
54
 
55
55
  not_flagged:
56
- ja: 文書の長さに対して少ないものは指しません。短すぎる文書も測りません。要求の文の中の「可能な限り」「必要に応じて」は、要求の書き方として requirement-smell も見ます。
57
- en: A few vague words for the document's length are not reported, and very short documents are not measured. Inside a requirement, requirement-smell also reads "where possible" and "as needed".
56
+ ja: 文書の長さに対して少ないものは指しません。短すぎる文書も測りません。指すのは語のある文ごとに一度で、長い言い方の中の語(in a timely manner の timely)は一つと数えます。英語の法務の文書では、法律や慣行が意味を決めている言い方(reasonable、best efforts、from time to time)の中の語は数えません。要求の文の中の「可能な限り」「必要に応じて」は、要求の書き方として requirement-smell も見ます。
57
+ en: 'A few vague words for the document''s length are not reported, and very short documents are not measured. Each sentence is reported once, and a word inside a longer phrase ("timely" in "in a timely manner") counts once. In legal documents, a word inside a term that law and practice define ("reasonable", "best efforts", "from time to time") is not counted. Inside a requirement, requirement-smell also reads "where possible" and "as needed".'
58
58
  level_meaning:
59
59
  ja: 1000 字あたりあいまいな語 {limit} 個まで
60
60
  en: up to {limit} vague words per 1000 words
package/src/api.ts CHANGED
@@ -31,8 +31,17 @@ export type Section = { readonly depth: number; readonly heading: string; readon
31
31
  /** One bulleted or numbered list, with the length of each item in characters. */
32
32
  export type List = { readonly span: Span; readonly itemLengths: readonly number[] };
33
33
 
34
- /** One entry of a word list. instead_of is another way to write the same thing, for rules that check a document is consistent. */
35
- export type LexiconEntry = { readonly pattern: string; readonly instead_of?: string };
34
+ /**
35
+ * One entry of a word list. instead_of is another way to write the same thing, for rules that check a document is
36
+ * consistent; rewrite, how to rewrite this phrase. genres: the genres or groups it holds in (legal, blog/tech); without
37
+ * them, every genre. options.lexicon and doc.lexicons hold only the entries for the document's genre.
38
+ */
39
+ export type LexiconEntry = {
40
+ readonly pattern: string;
41
+ readonly instead_of?: string;
42
+ readonly rewrite?: string;
43
+ readonly genres?: readonly string[];
44
+ };
36
45
 
37
46
  export type Lexicon = readonly LexiconEntry[];
38
47
 
@@ -0,0 +1,31 @@
1
+ // A word set in capitals because the passage around it is (a disclaimer, a heading or a running header in capitals): eGAIN in
2
+ // "eGAIN AND ITS SUPPLIERS MAKE NO WARRANTY" is the passage's capitals, not another spelling of eGain.
3
+
4
+ /** Words read on each side of the span, in its sentence and on its line. */
5
+ const NEIGHBOURS = 3;
6
+ /** Words, the span's own included, that make a passage rather than one word in capitals. */
7
+ const MIN_PASSAGE_WORDS = 3;
8
+ /** How far to look on each side (UTF-16 units): three words, however long, fit. */
9
+ const WINDOW = 200;
10
+ const WORD = /\p{Script=Latin}[\p{Script=Latin}\p{N}'’]*/gu;
11
+ const LOWER = /\p{Ll}/u;
12
+ /** The end of a sentence or a line: the passage does not run across it ("7. Warranty. THE SYSTEMS ARE …"). */
13
+ const STOP = /[.!?;:]\s|\n/gu;
14
+
15
+ /** A word in capitals after its first letter (WARRANTY, eGAIN, eGAIN'S). */
16
+ const isCapitalsWord = (word: string): boolean => !LOWER.test([...word].slice(1).join(""));
17
+
18
+ /** The Latin words of two letters or more: a one-letter word (a, I) says nothing about the passage. */
19
+ const wordsIn = (text: string): string[] => [...text.matchAll(WORD)].map((match) => match[0]).filter((word) => [...word].length >= 2);
20
+
21
+ const afterLastStop = (text: string): string => text.slice(Math.max(0, ...[...text.matchAll(STOP)].map((match) => match.index + match[0].length)));
22
+
23
+ const beforeFirstStop = (text: string): string => text.slice(0, [...text.matchAll(STOP)][0]?.index ?? text.length);
24
+
25
+ /** Whether the words of text[start, end) and up to three words on each side of it, in its sentence, are all in capitals, three or more of them. */
26
+ export const isInCapitalsPassage = (text: string, start: number, end: number): boolean => {
27
+ const before = wordsIn(afterLastStop(text.slice(Math.max(0, start - WINDOW), start))).slice(-NEIGHBOURS);
28
+ const after = wordsIn(beforeFirstStop(text.slice(end, end + WINDOW))).slice(0, NEIGHBOURS);
29
+ const words = [...before, ...wordsIn(text.slice(start, end)), ...after];
30
+ return words.length >= MIN_PASSAGE_WORDS && words.every(isCapitalsWord);
31
+ };
package/src/cli-text.ts CHANGED
@@ -49,9 +49,10 @@ const USAGE_JA = `chaff — 文章の読みにくいところを見つけます
49
49
  chaff ai-score <file>... [--format text|json] [--json] [--compact]
50
50
  AI らしさの簡易判定(低・中・高)。生成文に多い目印を、同じジャンルの人の文書と比べる(書いたのが AI かは判定しない)
51
51
  --json は --format json と同じ。--compact はファイルごとに 1 行
52
- chaff grade <items.jsonl> [--out <results.jsonl>] [--baseline <前の results.jsonl>] [--allow-stamp-mismatch]
52
+ chaff grade <items.jsonl> [--rubric <rubric.yaml|.json>] [--out <results.jsonl>] [--baseline <前の results.jsonl>] [--allow-stamp-mismatch]
53
53
  [--variant-key <欄>] [--format text|json|markdown] [--json] [--compact]
54
54
  AI の出力を JSONL でまとめて採点する(指摘の率・事実・引用・合否。何も送らない)
55
+ --rubric はその回だけ chaff.yaml の grade: の代わりにそのファイル(grade: と同じ形の YAML か JSON)で採点する
55
56
  --allow-stamp-mismatch はルールか設定が前の回と違っても比べる(そのことを先に出す)
56
57
  --variant-key は variant の欄の代わりにその欄で出力を分けて並べる。--json は --format json と同じ。markdown は PR のコメント向け
57
58
  chaff fix-plan <file> [--depth light|structure|register] [--json]
@@ -108,9 +109,10 @@ const USAGE_EN = `chaff — finds what makes writing hard to read. It never rewr
108
109
  chaff ai-score <file>... [--format text|json] [--json] [--compact]
109
110
  quick AI-likeness score (low, medium, high): signs common in generated text against human documents of the genre (not a verdict on who wrote it)
110
111
  --json is --format json; --compact prints one line per file
111
- chaff grade <items.jsonl> [--out <results.jsonl>] [--baseline <earlier results.jsonl>] [--allow-stamp-mismatch]
112
+ chaff grade <items.jsonl> [--rubric <rubric.yaml|.json>] [--out <results.jsonl>] [--baseline <earlier results.jsonl>] [--allow-stamp-mismatch]
112
113
  [--variant-key <field>] [--format text|json|markdown] [--json] [--compact]
113
114
  grade a JSONL file of model outputs (finding rates, facts, quotations, pass or fail; sends nothing)
115
+ --rubric grades by that file (YAML or JSON, shaped like grade:) instead of chaff.yaml's grade: for this run
114
116
  --allow-stamp-mismatch compares with the baseline even when its rules or settings differ, saying so first
115
117
  --variant-key splits the outputs by that field instead of variant; --json is --format json; markdown is for a PR comment
116
118
  chaff fix-plan <file> [--depth light|structure|register] [--json]
@@ -0,0 +1,27 @@
1
+ // A name coined from pieces joined by hyphens (Medi-Cal, the name of a programme): the pieces after the first are capitalised
2
+ // and one of them is not a word. Closed up, its letters spell an ordinary word (medical), which is another word and not another
3
+ // spelling of the name.
4
+
5
+ const CAPITALISED = /^\p{Lu}\p{Ll}+$/u;
6
+
7
+ /** Whether a hyphenated word is a coined name. isWord says whether a lower-case word is in the language's dictionary. */
8
+ export const isCoinedName = (word: string, isWord: (word: string) => boolean): boolean => {
9
+ const later = word.split("-").slice(1);
10
+ return later.length > 0 && later.every((part) => CAPITALISED.test(part)) && later.some((part) => !isWord(part.toLowerCase()));
11
+ };
12
+
13
+ const UPPER = /\p{Lu}/u;
14
+
15
+ /**
16
+ * The words without the coined names whose key the document otherwise writes only in small letters (Medi-Cal beside medical).
17
+ * Beside a spelling with capitals of its own (Wi-Fi beside WiFi) the coined name is still a spelling of that name. spelling is the
18
+ * word with the first letter of each part in small letters.
19
+ */
20
+ export const withoutCoinedNames = <Word extends { readonly key: string; readonly spelling: string; readonly shown?: string }>(
21
+ words: readonly Word[],
22
+ isWord: (word: string) => boolean,
23
+ ): Word[] => {
24
+ const isCoined = (word: Word): boolean => isCoinedName(word.shown ?? word.spelling, isWord);
25
+ const capitalKeys = new Set(words.filter((word) => !isCoined(word) && UPPER.test(word.spelling)).map((word) => word.key));
26
+ return words.filter((word) => !isCoined(word) || capitalKeys.has(word.key));
27
+ };