chaffjs 0.35.0 → 0.37.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 (823) hide show
  1. package/README.ja.md +12 -0
  2. package/README.md +15 -0
  3. package/dist/announced-count.d.ts +2 -0
  4. package/dist/announced-count.d.ts.map +1 -1
  5. package/dist/announced-count.js +29 -7
  6. package/dist/announced-count.js.map +1 -1
  7. package/dist/chronology-rows.d.ts +9 -0
  8. package/dist/chronology-rows.d.ts.map +1 -0
  9. package/dist/chronology-rows.js +79 -0
  10. package/dist/chronology-rows.js.map +1 -0
  11. package/dist/company-name-run.d.ts +8 -0
  12. package/dist/company-name-run.d.ts.map +1 -0
  13. package/dist/company-name-run.js +30 -0
  14. package/dist/company-name-run.js.map +1 -0
  15. package/dist/compound-head.d.ts +7 -0
  16. package/dist/compound-head.d.ts.map +1 -0
  17. package/dist/compound-head.js +19 -0
  18. package/dist/compound-head.js.map +1 -0
  19. package/dist/date-format.d.ts +8 -3
  20. package/dist/date-format.d.ts.map +1 -1
  21. package/dist/date-format.js +36 -3
  22. package/dist/date-format.js.map +1 -1
  23. package/dist/derived/count-per-period.d.ts +23 -0
  24. package/dist/derived/count-per-period.d.ts.map +1 -0
  25. package/dist/derived/count-per-period.js +14 -0
  26. package/dist/derived/count-per-period.js.map +1 -0
  27. package/dist/detectors/acronym-context.d.ts +4 -0
  28. package/dist/detectors/acronym-context.d.ts.map +1 -1
  29. package/dist/detectors/acronym-context.js +29 -1
  30. package/dist/detectors/acronym-context.js.map +1 -1
  31. package/dist/detectors/acronym-expansion.d.ts +5 -1
  32. package/dist/detectors/acronym-expansion.d.ts.map +1 -1
  33. package/dist/detectors/acronym-expansion.js +42 -3
  34. package/dist/detectors/acronym-expansion.js.map +1 -1
  35. package/dist/detectors/acronym-known.d.ts +19 -0
  36. package/dist/detectors/acronym-known.d.ts.map +1 -0
  37. package/dist/detectors/acronym-known.js +32 -0
  38. package/dist/detectors/acronym-known.js.map +1 -0
  39. package/dist/detectors/acronym-link.d.ts +19 -0
  40. package/dist/detectors/acronym-link.d.ts.map +1 -0
  41. package/dist/detectors/acronym-link.js +65 -0
  42. package/dist/detectors/acronym-link.js.map +1 -0
  43. package/dist/detectors/acronym-mention.d.ts +5 -0
  44. package/dist/detectors/acronym-mention.d.ts.map +1 -0
  45. package/dist/detectors/acronym-mention.js +34 -0
  46. package/dist/detectors/acronym-mention.js.map +1 -0
  47. package/dist/detectors/acronym-name.d.ts +8 -1
  48. package/dist/detectors/acronym-name.d.ts.map +1 -1
  49. package/dist/detectors/acronym-name.js +25 -6
  50. package/dist/detectors/acronym-name.js.map +1 -1
  51. package/dist/detectors/addressee-edge.d.ts +13 -0
  52. package/dist/detectors/addressee-edge.d.ts.map +1 -0
  53. package/dist/detectors/addressee-edge.js +13 -0
  54. package/dist/detectors/addressee-edge.js.map +1 -0
  55. package/dist/detectors/addressee-title-edge.d.ts +21 -0
  56. package/dist/detectors/addressee-title-edge.d.ts.map +1 -0
  57. package/dist/detectors/addressee-title-edge.js +22 -0
  58. package/dist/detectors/addressee-title-edge.js.map +1 -0
  59. package/dist/detectors/announced-count.d.ts.map +1 -1
  60. package/dist/detectors/announced-count.js +1 -0
  61. package/dist/detectors/announced-count.js.map +1 -1
  62. package/dist/detectors/bare-comparative.d.ts +4 -0
  63. package/dist/detectors/bare-comparative.d.ts.map +1 -1
  64. package/dist/detectors/bare-comparative.js +28 -3
  65. package/dist/detectors/bare-comparative.js.map +1 -1
  66. package/dist/detectors/blank-structure.d.ts +7 -1
  67. package/dist/detectors/blank-structure.d.ts.map +1 -1
  68. package/dist/detectors/blank-structure.js +13 -8
  69. package/dist/detectors/blank-structure.js.map +1 -1
  70. package/dist/detectors/bracket-specified.d.ts +6 -0
  71. package/dist/detectors/bracket-specified.d.ts.map +1 -0
  72. package/dist/detectors/bracket-specified.js +23 -0
  73. package/dist/detectors/bracket-specified.js.map +1 -0
  74. package/dist/detectors/broken-link.d.ts +6 -0
  75. package/dist/detectors/broken-link.d.ts.map +1 -1
  76. package/dist/detectors/broken-link.js +23 -2
  77. package/dist/detectors/broken-link.js.map +1 -1
  78. package/dist/detectors/capitalised-term.d.ts +4 -0
  79. package/dist/detectors/capitalised-term.d.ts.map +1 -1
  80. package/dist/detectors/capitalised-term.js +18 -1
  81. package/dist/detectors/capitalised-term.js.map +1 -1
  82. package/dist/detectors/caps-caption.d.ts +17 -6
  83. package/dist/detectors/caps-caption.d.ts.map +1 -1
  84. package/dist/detectors/caps-caption.js +65 -0
  85. package/dist/detectors/caps-caption.js.map +1 -1
  86. package/dist/detectors/caps-phrase.d.ts +6 -0
  87. package/dist/detectors/caps-phrase.d.ts.map +1 -0
  88. package/dist/detectors/caps-phrase.js +16 -0
  89. package/dist/detectors/caps-phrase.js.map +1 -0
  90. package/dist/detectors/char-shape.d.ts +1 -0
  91. package/dist/detectors/char-shape.d.ts.map +1 -1
  92. package/dist/detectors/char-shape.js +56 -20
  93. package/dist/detectors/char-shape.js.map +1 -1
  94. package/dist/detectors/citation-sentence.d.ts +8 -0
  95. package/dist/detectors/citation-sentence.d.ts.map +1 -0
  96. package/dist/detectors/citation-sentence.js +40 -0
  97. package/dist/detectors/citation-sentence.js.map +1 -0
  98. package/dist/detectors/cited-title.d.ts +3 -2
  99. package/dist/detectors/cited-title.d.ts.map +1 -1
  100. package/dist/detectors/cited-title.js +14 -3
  101. package/dist/detectors/cited-title.js.map +1 -1
  102. package/dist/detectors/contraction-mention.d.ts +3 -0
  103. package/dist/detectors/contraction-mention.d.ts.map +1 -0
  104. package/dist/detectors/contraction-mention.js +22 -0
  105. package/dist/detectors/contraction-mention.js.map +1 -0
  106. package/dist/detectors/counter-edge.d.ts +2 -1
  107. package/dist/detectors/counter-edge.d.ts.map +1 -1
  108. package/dist/detectors/counter-edge.js +17 -2
  109. package/dist/detectors/counter-edge.js.map +1 -1
  110. package/dist/detectors/dash-break.d.ts +7 -0
  111. package/dist/detectors/dash-break.d.ts.map +1 -0
  112. package/dist/detectors/dash-break.js +30 -0
  113. package/dist/detectors/dash-break.js.map +1 -0
  114. package/dist/detectors/date-any-year.d.ts +7 -3
  115. package/dist/detectors/date-any-year.d.ts.map +1 -1
  116. package/dist/detectors/date-any-year.js +30 -8
  117. package/dist/detectors/date-any-year.js.map +1 -1
  118. package/dist/detectors/date-format.d.ts.map +1 -1
  119. package/dist/detectors/date-format.js +2 -1
  120. package/dist/detectors/date-format.js.map +1 -1
  121. package/dist/detectors/date-year.d.ts +9 -3
  122. package/dist/detectors/date-year.d.ts.map +1 -1
  123. package/dist/detectors/date-year.js +45 -9
  124. package/dist/detectors/date-year.js.map +1 -1
  125. package/dist/detectors/deadline-unit.d.ts +20 -0
  126. package/dist/detectors/deadline-unit.d.ts.map +1 -0
  127. package/dist/detectors/deadline-unit.js +19 -0
  128. package/dist/detectors/deadline-unit.js.map +1 -0
  129. package/dist/detectors/defined-term-form.d.ts.map +1 -1
  130. package/dist/detectors/defined-term-form.js +33 -7
  131. package/dist/detectors/defined-term-form.js.map +1 -1
  132. package/dist/detectors/definition-use.d.ts.map +1 -1
  133. package/dist/detectors/definition-use.js +14 -6
  134. package/dist/detectors/definition-use.js.map +1 -1
  135. package/dist/detectors/derived-numbers.d.ts.map +1 -1
  136. package/dist/detectors/derived-numbers.js +17 -4
  137. package/dist/detectors/derived-numbers.js.map +1 -1
  138. package/dist/detectors/document-shape.d.ts +5 -0
  139. package/dist/detectors/document-shape.d.ts.map +1 -1
  140. package/dist/detectors/document-shape.js +15 -1
  141. package/dist/detectors/document-shape.js.map +1 -1
  142. package/dist/detectors/doubled-across-aside.d.ts +9 -0
  143. package/dist/detectors/doubled-across-aside.d.ts.map +1 -0
  144. package/dist/detectors/doubled-across-aside.js +27 -0
  145. package/dist/detectors/doubled-across-aside.js.map +1 -0
  146. package/dist/detectors/doubled-punctuation.d.ts +3 -3
  147. package/dist/detectors/doubled-punctuation.d.ts.map +1 -1
  148. package/dist/detectors/doubled-punctuation.js +23 -4
  149. package/dist/detectors/doubled-punctuation.js.map +1 -1
  150. package/dist/detectors/doubled-word.d.ts.map +1 -1
  151. package/dist/detectors/doubled-word.js +2 -1
  152. package/dist/detectors/doubled-word.js.map +1 -1
  153. package/dist/detectors/duplicate-heading.d.ts +1 -0
  154. package/dist/detectors/duplicate-heading.d.ts.map +1 -1
  155. package/dist/detectors/duplicate-heading.js +25 -3
  156. package/dist/detectors/duplicate-heading.js.map +1 -1
  157. package/dist/detectors/ellipsis.d.ts.map +1 -1
  158. package/dist/detectors/ellipsis.js +13 -1
  159. package/dist/detectors/ellipsis.js.map +1 -1
  160. package/dist/detectors/email-letter.d.ts +40 -3
  161. package/dist/detectors/email-letter.d.ts.map +1 -1
  162. package/dist/detectors/email-letter.js +110 -17
  163. package/dist/detectors/email-letter.js.map +1 -1
  164. package/dist/detectors/field-label.d.ts +7 -0
  165. package/dist/detectors/field-label.d.ts.map +1 -0
  166. package/dist/detectors/field-label.js +23 -0
  167. package/dist/detectors/field-label.js.map +1 -0
  168. package/dist/detectors/footnote-mismatch.d.ts +6 -1
  169. package/dist/detectors/footnote-mismatch.d.ts.map +1 -1
  170. package/dist/detectors/footnote-mismatch.js +28 -7
  171. package/dist/detectors/footnote-mismatch.js.map +1 -1
  172. package/dist/detectors/fullwidth-alnum.d.ts.map +1 -1
  173. package/dist/detectors/fullwidth-alnum.js +7 -1
  174. package/dist/detectors/fullwidth-alnum.js.map +1 -1
  175. package/dist/detectors/graded-step.d.ts +20 -0
  176. package/dist/detectors/graded-step.d.ts.map +1 -0
  177. package/dist/detectors/graded-step.js +33 -0
  178. package/dist/detectors/graded-step.js.map +1 -0
  179. package/dist/detectors/gram-openers.d.ts +9 -0
  180. package/dist/detectors/gram-openers.d.ts.map +1 -0
  181. package/dist/detectors/gram-openers.js +40 -0
  182. package/dist/detectors/gram-openers.js.map +1 -0
  183. package/dist/detectors/gram-place.d.ts +3 -1
  184. package/dist/detectors/gram-place.d.ts.map +1 -1
  185. package/dist/detectors/gram-place.js +8 -0
  186. package/dist/detectors/gram-place.js.map +1 -1
  187. package/dist/detectors/gram-predicate.d.ts.map +1 -1
  188. package/dist/detectors/gram-predicate.js +37 -3
  189. package/dist/detectors/gram-predicate.js.map +1 -1
  190. package/dist/detectors/heading-echo.d.ts.map +1 -1
  191. package/dist/detectors/heading-echo.js +28 -2
  192. package/dist/detectors/heading-echo.js.map +1 -1
  193. package/dist/detectors/heading-record-rhythm.d.ts +9 -0
  194. package/dist/detectors/heading-record-rhythm.d.ts.map +1 -0
  195. package/dist/detectors/heading-record-rhythm.js +57 -0
  196. package/dist/detectors/heading-record-rhythm.js.map +1 -0
  197. package/dist/detectors/ime-residue.d.ts +1 -1
  198. package/dist/detectors/ime-residue.d.ts.map +1 -1
  199. package/dist/detectors/ime-residue.js +4 -3
  200. package/dist/detectors/ime-residue.js.map +1 -1
  201. package/dist/detectors/kanji-compound-slip.d.ts +3 -0
  202. package/dist/detectors/kanji-compound-slip.d.ts.map +1 -0
  203. package/dist/detectors/kanji-compound-slip.js +50 -0
  204. package/dist/detectors/kanji-compound-slip.js.map +1 -0
  205. package/dist/detectors/kutoten-consistency.d.ts +10 -2
  206. package/dist/detectors/kutoten-consistency.d.ts.map +1 -1
  207. package/dist/detectors/kutoten-consistency.js +83 -12
  208. package/dist/detectors/kutoten-consistency.js.map +1 -1
  209. package/dist/detectors/lexicon.d.ts.map +1 -1
  210. package/dist/detectors/lexicon.js +13 -4
  211. package/dist/detectors/lexicon.js.map +1 -1
  212. package/dist/detectors/link-shape.d.ts.map +1 -1
  213. package/dist/detectors/link-shape.js +9 -3
  214. package/dist/detectors/link-shape.js.map +1 -1
  215. package/dist/detectors/list-item-ending.d.ts +18 -0
  216. package/dist/detectors/list-item-ending.d.ts.map +1 -0
  217. package/dist/detectors/list-item-ending.js +35 -0
  218. package/dist/detectors/list-item-ending.js.map +1 -0
  219. package/dist/detectors/list-parallel.d.ts +18 -5
  220. package/dist/detectors/list-parallel.d.ts.map +1 -1
  221. package/dist/detectors/list-parallel.js +116 -36
  222. package/dist/detectors/list-parallel.js.map +1 -1
  223. package/dist/detectors/list-sentence.d.ts +4 -0
  224. package/dist/detectors/list-sentence.d.ts.map +1 -1
  225. package/dist/detectors/list-sentence.js +1 -1
  226. package/dist/detectors/list-sentence.js.map +1 -1
  227. package/dist/detectors/mark-shape.d.ts +13 -4
  228. package/dist/detectors/mark-shape.d.ts.map +1 -1
  229. package/dist/detectors/mark-shape.js +73 -10
  230. package/dist/detectors/mark-shape.js.map +1 -1
  231. package/dist/detectors/mentioned-phrase.d.ts +9 -0
  232. package/dist/detectors/mentioned-phrase.d.ts.map +1 -0
  233. package/dist/detectors/mentioned-phrase.js +25 -0
  234. package/dist/detectors/mentioned-phrase.js.map +1 -0
  235. package/dist/detectors/middle-dot.d.ts +2 -2
  236. package/dist/detectors/middle-dot.d.ts.map +1 -1
  237. package/dist/detectors/middle-dot.js +4 -2
  238. package/dist/detectors/middle-dot.js.map +1 -1
  239. package/dist/detectors/modal-conflict.d.ts.map +1 -1
  240. package/dist/detectors/modal-conflict.js +5 -2
  241. package/dist/detectors/modal-conflict.js.map +1 -1
  242. package/dist/detectors/name-variant.d.ts.map +1 -1
  243. package/dist/detectors/name-variant.js +6 -0
  244. package/dist/detectors/name-variant.js.map +1 -1
  245. package/dist/detectors/notice-paragraph.d.ts +9 -0
  246. package/dist/detectors/notice-paragraph.d.ts.map +1 -0
  247. package/dist/detectors/notice-paragraph.js +21 -0
  248. package/dist/detectors/notice-paragraph.js.map +1 -0
  249. package/dist/detectors/number-style.d.ts.map +1 -1
  250. package/dist/detectors/number-style.js +15 -2
  251. package/dist/detectors/number-style.js.map +1 -1
  252. package/dist/detectors/number-unit.d.ts.map +1 -1
  253. package/dist/detectors/number-unit.js +24 -1
  254. package/dist/detectors/number-unit.js.map +1 -1
  255. package/dist/detectors/numeral-opener.d.ts +6 -0
  256. package/dist/detectors/numeral-opener.d.ts.map +1 -1
  257. package/dist/detectors/numeral-opener.js +24 -1
  258. package/dist/detectors/numeral-opener.js.map +1 -1
  259. package/dist/detectors/obligation-without-deadline.d.ts +5 -1
  260. package/dist/detectors/obligation-without-deadline.d.ts.map +1 -1
  261. package/dist/detectors/obligation-without-deadline.js +44 -23
  262. package/dist/detectors/obligation-without-deadline.js.map +1 -1
  263. package/dist/detectors/open-end-class.d.ts +16 -0
  264. package/dist/detectors/open-end-class.d.ts.map +1 -0
  265. package/dist/detectors/open-end-class.js +65 -0
  266. package/dist/detectors/open-end-class.js.map +1 -0
  267. package/dist/detectors/open-end-condition.d.ts +7 -0
  268. package/dist/detectors/open-end-condition.d.ts.map +1 -0
  269. package/dist/detectors/open-end-condition.js +35 -0
  270. package/dist/detectors/open-end-condition.js.map +1 -0
  271. package/dist/detectors/open-end-names.d.ts +9 -3
  272. package/dist/detectors/open-end-names.d.ts.map +1 -1
  273. package/dist/detectors/open-end-names.js +5 -2
  274. package/dist/detectors/open-end-names.js.map +1 -1
  275. package/dist/detectors/open-end-question.d.ts +15 -0
  276. package/dist/detectors/open-end-question.d.ts.map +1 -0
  277. package/dist/detectors/open-end-question.js +37 -0
  278. package/dist/detectors/open-end-question.js.map +1 -0
  279. package/dist/detectors/open-end-scope.d.ts +16 -0
  280. package/dist/detectors/open-end-scope.d.ts.map +1 -0
  281. package/dist/detectors/open-end-scope.js +47 -0
  282. package/dist/detectors/open-end-scope.js.map +1 -0
  283. package/dist/detectors/opening-date.d.ts +10 -0
  284. package/dist/detectors/opening-date.d.ts.map +1 -0
  285. package/dist/detectors/opening-date.js +33 -0
  286. package/dist/detectors/opening-date.js.map +1 -0
  287. package/dist/detectors/ordinary-phrase.d.ts +20 -0
  288. package/dist/detectors/ordinary-phrase.d.ts.map +1 -0
  289. package/dist/detectors/ordinary-phrase.js +54 -0
  290. package/dist/detectors/ordinary-phrase.js.map +1 -0
  291. package/dist/detectors/organisation-run.d.ts +5 -7
  292. package/dist/detectors/organisation-run.d.ts.map +1 -1
  293. package/dist/detectors/organisation-run.js +10 -0
  294. package/dist/detectors/organisation-run.js.map +1 -1
  295. package/dist/detectors/orthographic-variant.d.ts.map +1 -1
  296. package/dist/detectors/orthographic-variant.js +85 -20
  297. package/dist/detectors/orthographic-variant.js.map +1 -1
  298. package/dist/detectors/orthography.d.ts.map +1 -1
  299. package/dist/detectors/orthography.js +9 -2
  300. package/dist/detectors/orthography.js.map +1 -1
  301. package/dist/detectors/oxford-comma.d.ts.map +1 -1
  302. package/dist/detectors/oxford-comma.js +70 -3
  303. package/dist/detectors/oxford-comma.js.map +1 -1
  304. package/dist/detectors/person-consistency.d.ts +2 -1
  305. package/dist/detectors/person-consistency.d.ts.map +1 -1
  306. package/dist/detectors/person-consistency.js +5 -3
  307. package/dist/detectors/person-consistency.js.map +1 -1
  308. package/dist/detectors/phrase-match.d.ts +2 -0
  309. package/dist/detectors/phrase-match.d.ts.map +1 -1
  310. package/dist/detectors/phrase-match.js +11 -4
  311. package/dist/detectors/phrase-match.js.map +1 -1
  312. package/dist/detectors/placeholder-text.d.ts.map +1 -1
  313. package/dist/detectors/placeholder-text.js +18 -3
  314. package/dist/detectors/placeholder-text.js.map +1 -1
  315. package/dist/detectors/placeholder.d.ts +3 -1
  316. package/dist/detectors/placeholder.d.ts.map +1 -1
  317. package/dist/detectors/placeholder.js +8 -3
  318. package/dist/detectors/placeholder.js.map +1 -1
  319. package/dist/detectors/postcode-end.d.ts +3 -0
  320. package/dist/detectors/postcode-end.d.ts.map +1 -0
  321. package/dist/detectors/postcode-end.js +15 -0
  322. package/dist/detectors/postcode-end.js.map +1 -0
  323. package/dist/detectors/prose-total-words.d.ts +5 -0
  324. package/dist/detectors/prose-total-words.d.ts.map +1 -0
  325. package/dist/detectors/prose-total-words.js +14 -0
  326. package/dist/detectors/prose-total-words.js.map +1 -0
  327. package/dist/detectors/range-notation.d.ts +2 -2
  328. package/dist/detectors/range-notation.d.ts.map +1 -1
  329. package/dist/detectors/range-notation.js +18 -7
  330. package/dist/detectors/range-notation.js.map +1 -1
  331. package/dist/detectors/registry/kanji-compound-slip.d.ts +3 -0
  332. package/dist/detectors/registry/kanji-compound-slip.d.ts.map +1 -0
  333. package/dist/detectors/registry/kanji-compound-slip.js +3 -0
  334. package/dist/detectors/registry/kanji-compound-slip.js.map +1 -0
  335. package/dist/detectors/registry/phrase-in-use.d.ts +3 -0
  336. package/dist/detectors/registry/phrase-in-use.d.ts.map +1 -0
  337. package/dist/detectors/registry/phrase-in-use.js +3 -0
  338. package/dist/detectors/registry/phrase-in-use.js.map +1 -0
  339. package/dist/detectors/requirement-smell.d.ts.map +1 -1
  340. package/dist/detectors/requirement-smell.js +35 -7
  341. package/dist/detectors/requirement-smell.js.map +1 -1
  342. package/dist/detectors/scaled-figure-unit.d.ts +28 -0
  343. package/dist/detectors/scaled-figure-unit.d.ts.map +1 -0
  344. package/dist/detectors/scaled-figure-unit.js +78 -0
  345. package/dist/detectors/scaled-figure-unit.js.map +1 -0
  346. package/dist/detectors/sentence-counts.d.ts +12 -2
  347. package/dist/detectors/sentence-counts.d.ts.map +1 -1
  348. package/dist/detectors/sentence-counts.js +52 -11
  349. package/dist/detectors/sentence-counts.js.map +1 -1
  350. package/dist/detectors/sentence-ending.d.ts +2 -0
  351. package/dist/detectors/sentence-ending.d.ts.map +1 -1
  352. package/dist/detectors/sentence-ending.js +10 -3
  353. package/dist/detectors/sentence-ending.js.map +1 -1
  354. package/dist/detectors/sentence-length.d.ts.map +1 -1
  355. package/dist/detectors/sentence-length.js +13 -4
  356. package/dist/detectors/sentence-length.js.map +1 -1
  357. package/dist/detectors/sentence-load.d.ts +4 -1
  358. package/dist/detectors/sentence-load.d.ts.map +1 -1
  359. package/dist/detectors/sentence-load.js +9 -2
  360. package/dist/detectors/sentence-load.js.map +1 -1
  361. package/dist/detectors/signals.d.ts.map +1 -1
  362. package/dist/detectors/signals.js +44 -52
  363. package/dist/detectors/signals.js.map +1 -1
  364. package/dist/detectors/structure-tree.d.ts.map +1 -1
  365. package/dist/detectors/structure-tree.js +14 -13
  366. package/dist/detectors/structure-tree.js.map +1 -1
  367. package/dist/detectors/structure.d.ts.map +1 -1
  368. package/dist/detectors/structure.js +2 -1
  369. package/dist/detectors/structure.js.map +1 -1
  370. package/dist/detectors/subject-name-line.d.ts +8 -0
  371. package/dist/detectors/subject-name-line.d.ts.map +1 -0
  372. package/dist/detectors/subject-name-line.js +53 -0
  373. package/dist/detectors/subject-name-line.js.map +1 -0
  374. package/dist/detectors/superlative-name.d.ts +5 -0
  375. package/dist/detectors/superlative-name.d.ts.map +1 -1
  376. package/dist/detectors/superlative-name.js +9 -0
  377. package/dist/detectors/superlative-name.js.map +1 -1
  378. package/dist/detectors/table-header.d.ts.map +1 -1
  379. package/dist/detectors/table-header.js +13 -1
  380. package/dist/detectors/table-header.js.map +1 -1
  381. package/dist/detectors/technical-docs.d.ts.map +1 -1
  382. package/dist/detectors/technical-docs.js +4 -1
  383. package/dist/detectors/technical-docs.js.map +1 -1
  384. package/dist/detectors/term-mention-sentence.d.ts +4 -0
  385. package/dist/detectors/term-mention-sentence.d.ts.map +1 -0
  386. package/dist/detectors/term-mention-sentence.js +28 -0
  387. package/dist/detectors/term-mention-sentence.js.map +1 -0
  388. package/dist/detectors/titled-run.d.ts +2 -1
  389. package/dist/detectors/titled-run.d.ts.map +1 -1
  390. package/dist/detectors/titled-run.js +9 -4
  391. package/dist/detectors/titled-run.js.map +1 -1
  392. package/dist/detectors/token-shape.d.ts.map +1 -1
  393. package/dist/detectors/token-shape.js +15 -5
  394. package/dist/detectors/token-shape.js.map +1 -1
  395. package/dist/detectors/undefined-term.d.ts.map +1 -1
  396. package/dist/detectors/undefined-term.js +5 -0
  397. package/dist/detectors/undefined-term.js.map +1 -1
  398. package/dist/detectors/unknown-word.d.ts +4 -1
  399. package/dist/detectors/unknown-word.d.ts.map +1 -1
  400. package/dist/detectors/unknown-word.js +1 -1
  401. package/dist/detectors/unknown-word.js.map +1 -1
  402. package/dist/detectors/vague-density.d.ts +5 -2
  403. package/dist/detectors/vague-density.d.ts.map +1 -1
  404. package/dist/detectors/vague-density.js +17 -4
  405. package/dist/detectors/vague-density.js.map +1 -1
  406. package/dist/document-paragraphs.d.ts +4 -0
  407. package/dist/document-paragraphs.d.ts.map +1 -0
  408. package/dist/document-paragraphs.js +24 -0
  409. package/dist/document-paragraphs.js.map +1 -0
  410. package/dist/document.d.ts.map +1 -1
  411. package/dist/document.js +2 -19
  412. package/dist/document.js.map +1 -1
  413. package/dist/figure-references.d.ts +3 -0
  414. package/dist/figure-references.d.ts.map +1 -1
  415. package/dist/figure-references.js +6 -2
  416. package/dist/figure-references.js.map +1 -1
  417. package/dist/format-template.d.ts +3 -0
  418. package/dist/format-template.d.ts.map +1 -0
  419. package/dist/format-template.js +13 -0
  420. package/dist/format-template.js.map +1 -0
  421. package/dist/formula-brackets.d.ts +7 -0
  422. package/dist/formula-brackets.d.ts.map +1 -0
  423. package/dist/formula-brackets.js +29 -0
  424. package/dist/formula-brackets.js.map +1 -0
  425. package/dist/html/html-markdown.d.ts.map +1 -1
  426. package/dist/html/html-markdown.js +2 -1
  427. package/dist/html/html-markdown.js.map +1 -1
  428. package/dist/html/html-site-chrome.d.ts +5 -0
  429. package/dist/html/html-site-chrome.d.ts.map +1 -0
  430. package/dist/html/html-site-chrome.js +56 -0
  431. package/dist/html/html-site-chrome.js.map +1 -0
  432. package/dist/joined-view.d.ts.map +1 -1
  433. package/dist/joined-view.js +1 -0
  434. package/dist/joined-view.js.map +1 -1
  435. package/dist/kanji-compound-slip.d.ts +32 -0
  436. package/dist/kanji-compound-slip.d.ts.map +1 -0
  437. package/dist/kanji-compound-slip.js +63 -0
  438. package/dist/kanji-compound-slip.js.map +1 -0
  439. package/dist/latin-company-form.d.ts +6 -0
  440. package/dist/latin-company-form.d.ts.map +1 -0
  441. package/dist/latin-company-form.js +32 -0
  442. package/dist/latin-company-form.js.map +1 -0
  443. package/dist/latin-word-boundary.d.ts +20 -0
  444. package/dist/latin-word-boundary.d.ts.map +1 -0
  445. package/dist/latin-word-boundary.js +57 -0
  446. package/dist/latin-word-boundary.js.map +1 -0
  447. package/dist/leading-label.d.ts +4 -0
  448. package/dist/leading-label.d.ts.map +1 -0
  449. package/dist/leading-label.js +14 -0
  450. package/dist/leading-label.js.map +1 -0
  451. package/dist/lexicon-genres.d.ts +2 -0
  452. package/dist/lexicon-genres.d.ts.map +1 -1
  453. package/dist/lexicon-genres.js +1 -1
  454. package/dist/lexicon-genres.js.map +1 -1
  455. package/dist/link-shape.d.ts +6 -0
  456. package/dist/link-shape.d.ts.map +1 -1
  457. package/dist/link-shape.js +27 -0
  458. package/dist/link-shape.js.map +1 -1
  459. package/dist/link-title.d.ts +4 -0
  460. package/dist/link-title.d.ts.map +1 -0
  461. package/dist/link-title.js +33 -0
  462. package/dist/link-title.js.map +1 -0
  463. package/dist/list-item-paragraphs.d.ts +15 -0
  464. package/dist/list-item-paragraphs.d.ts.map +1 -0
  465. package/dist/list-item-paragraphs.js +19 -0
  466. package/dist/list-item-paragraphs.js.map +1 -0
  467. package/dist/literal-quote.d.ts +12 -0
  468. package/dist/literal-quote.d.ts.map +1 -0
  469. package/dist/literal-quote.js +43 -0
  470. package/dist/literal-quote.js.map +1 -0
  471. package/dist/nado-closed-list.d.ts.map +1 -1
  472. package/dist/nado-closed-list.js +39 -5
  473. package/dist/nado-closed-list.js.map +1 -1
  474. package/dist/name-misspelt-usual.d.ts +5 -0
  475. package/dist/name-misspelt-usual.d.ts.map +1 -0
  476. package/dist/name-misspelt-usual.js +19 -0
  477. package/dist/name-misspelt-usual.js.map +1 -0
  478. package/dist/name-separator.d.ts.map +1 -1
  479. package/dist/name-separator.js +25 -2
  480. package/dist/name-separator.js.map +1 -1
  481. package/dist/nominal-stem.d.ts +14 -1
  482. package/dist/nominal-stem.d.ts.map +1 -1
  483. package/dist/nominal-stem.js +42 -4
  484. package/dist/nominal-stem.js.map +1 -1
  485. package/dist/notice-header.d.ts +19 -0
  486. package/dist/notice-header.d.ts.map +1 -0
  487. package/dist/notice-header.js +31 -0
  488. package/dist/notice-header.js.map +1 -0
  489. package/dist/person-forms.d.ts +8 -0
  490. package/dist/person-forms.d.ts.map +1 -1
  491. package/dist/person-forms.js +12 -0
  492. package/dist/person-forms.js.map +1 -1
  493. package/dist/plugin.d.ts +5 -0
  494. package/dist/plugin.d.ts.map +1 -1
  495. package/dist/preamble-paragraphs.d.ts +3 -2
  496. package/dist/preamble-paragraphs.d.ts.map +1 -1
  497. package/dist/preamble-paragraphs.js +8 -2
  498. package/dist/preamble-paragraphs.js.map +1 -1
  499. package/dist/sentence-load.d.ts +2 -1
  500. package/dist/sentence-load.d.ts.map +1 -1
  501. package/dist/sentence-load.js +11 -3
  502. package/dist/sentence-load.js.map +1 -1
  503. package/dist/spacing-code.d.ts +1 -0
  504. package/dist/spacing-code.d.ts.map +1 -1
  505. package/dist/spacing-code.js +4 -1
  506. package/dist/spacing-code.js.map +1 -1
  507. package/dist/split-noun.d.ts +10 -0
  508. package/dist/split-noun.d.ts.map +1 -0
  509. package/dist/split-noun.js +50 -0
  510. package/dist/split-noun.js.map +1 -0
  511. package/dist/structure/attached-parts.d.ts +12 -0
  512. package/dist/structure/attached-parts.d.ts.map +1 -0
  513. package/dist/structure/attached-parts.js +44 -0
  514. package/dist/structure/attached-parts.js.map +1 -0
  515. package/dist/structure/build.d.ts.map +1 -1
  516. package/dist/structure/build.js +7 -4
  517. package/dist/structure/build.js.map +1 -1
  518. package/dist/structure/contents-lines.d.ts +7 -0
  519. package/dist/structure/contents-lines.d.ts.map +1 -0
  520. package/dist/structure/contents-lines.js +51 -0
  521. package/dist/structure/contents-lines.js.map +1 -0
  522. package/dist/structure/defining-names.d.ts +37 -0
  523. package/dist/structure/defining-names.d.ts.map +1 -0
  524. package/dist/structure/defining-names.js +122 -0
  525. package/dist/structure/defining-names.js.map +1 -0
  526. package/dist/structure/definition-use.d.ts +8 -4
  527. package/dist/structure/definition-use.d.ts.map +1 -1
  528. package/dist/structure/definition-use.js +123 -38
  529. package/dist/structure/definition-use.js.map +1 -1
  530. package/dist/structure/gerund-phrase.d.ts +8 -0
  531. package/dist/structure/gerund-phrase.d.ts.map +1 -0
  532. package/dist/structure/gerund-phrase.js +30 -0
  533. package/dist/structure/gerund-phrase.js.map +1 -0
  534. package/dist/structure/issues.d.ts +4 -1
  535. package/dist/structure/issues.d.ts.map +1 -1
  536. package/dist/structure/issues.js +5 -2
  537. package/dist/structure/issues.js.map +1 -1
  538. package/dist/structure/list-lead-in.d.ts +19 -0
  539. package/dist/structure/list-lead-in.d.ts.map +1 -0
  540. package/dist/structure/list-lead-in.js +85 -0
  541. package/dist/structure/list-lead-in.js.map +1 -0
  542. package/dist/structure/modal-conflict.d.ts +7 -2
  543. package/dist/structure/modal-conflict.d.ts.map +1 -1
  544. package/dist/structure/modal-conflict.js +36 -7
  545. package/dist/structure/modal-conflict.js.map +1 -1
  546. package/dist/structure/negated-act.d.ts +17 -0
  547. package/dist/structure/negated-act.d.ts.map +1 -0
  548. package/dist/structure/negated-act.js +32 -0
  549. package/dist/structure/negated-act.js.map +1 -0
  550. package/dist/structure/numbering.d.ts +3 -1
  551. package/dist/structure/numbering.d.ts.map +1 -1
  552. package/dist/structure/numbering.js +20 -8
  553. package/dist/structure/numbering.js.map +1 -1
  554. package/dist/structure/prose-total.d.ts +4 -0
  555. package/dist/structure/prose-total.d.ts.map +1 -1
  556. package/dist/structure/prose-total.js +16 -6
  557. package/dist/structure/prose-total.js.map +1 -1
  558. package/dist/structure/repeated-number.d.ts +24 -0
  559. package/dist/structure/repeated-number.d.ts.map +1 -0
  560. package/dist/structure/repeated-number.js +89 -0
  561. package/dist/structure/repeated-number.js.map +1 -0
  562. package/dist/structure/rounded-amount.d.ts +8 -0
  563. package/dist/structure/rounded-amount.d.ts.map +1 -0
  564. package/dist/structure/rounded-amount.js +48 -0
  565. package/dist/structure/rounded-amount.js.map +1 -0
  566. package/dist/structure/side-step.d.ts +8 -0
  567. package/dist/structure/side-step.d.ts.map +1 -0
  568. package/dist/structure/side-step.js +21 -0
  569. package/dist/structure/side-step.js.map +1 -0
  570. package/dist/structure/spanned-label-blank.d.ts +8 -0
  571. package/dist/structure/spanned-label-blank.d.ts.map +1 -0
  572. package/dist/structure/spanned-label-blank.js +37 -0
  573. package/dist/structure/spanned-label-blank.js.map +1 -0
  574. package/dist/structure/universal.d.ts +10 -4
  575. package/dist/structure/universal.d.ts.map +1 -1
  576. package/dist/structure/universal.js +26 -7
  577. package/dist/structure/universal.js.map +1 -1
  578. package/dist/structure/unspaced-heading.d.ts +10 -0
  579. package/dist/structure/unspaced-heading.d.ts.map +1 -0
  580. package/dist/structure/unspaced-heading.js +24 -0
  581. package/dist/structure/unspaced-heading.js.map +1 -0
  582. package/dist/structure/written-list-path.d.ts +10 -0
  583. package/dist/structure/written-list-path.d.ts.map +1 -0
  584. package/dist/structure/written-list-path.js +37 -0
  585. package/dist/structure/written-list-path.js.map +1 -0
  586. package/dist/structure/written-resolve.d.ts +1 -1
  587. package/dist/structure/written-resolve.d.ts.map +1 -1
  588. package/dist/structure/written-resolve.js +15 -9
  589. package/dist/structure/written-resolve.js.map +1 -1
  590. package/dist/title-line.d.ts +23 -0
  591. package/dist/title-line.d.ts.map +1 -0
  592. package/dist/title-line.js +28 -0
  593. package/dist/title-line.js.map +1 -0
  594. package/dist/topic-clause.d.ts +7 -0
  595. package/dist/topic-clause.d.ts.map +1 -0
  596. package/dist/topic-clause.js +87 -0
  597. package/dist/topic-clause.js.map +1 -0
  598. package/dist/uncounted-particles.d.ts +18 -0
  599. package/dist/uncounted-particles.d.ts.map +1 -0
  600. package/dist/uncounted-particles.js +47 -0
  601. package/dist/uncounted-particles.js.map +1 -0
  602. package/package.json +3 -3
  603. package/rules/adversative-ga-repeat.yaml +1 -0
  604. package/rules/all-caps-shouting.yaml +2 -2
  605. package/rules/announced-count-mismatch.yaml +2 -2
  606. package/rules/bare-url-mix.yaml +2 -2
  607. package/rules/bracket-nesting.yaml +2 -2
  608. package/rules/bracket-width-consistency.yaml +2 -2
  609. package/rules/broken-link.yaml +2 -2
  610. package/rules/cliche.yaml +4 -3
  611. package/rules/code-fence-language-mix.yaml +2 -2
  612. package/rules/comparative-without-baseline.yaml +2 -2
  613. package/rules/concrete-evidence-density.yaml +1 -0
  614. package/rules/contraction-consistency.yaml +2 -2
  615. package/rules/dangling-figure-reference.yaml +2 -2
  616. package/rules/date-without-year.yaml +10 -2
  617. package/rules/defined-term-form.yaml +2 -2
  618. package/rules/doubled-punctuation.yaml +4 -4
  619. package/rules/doubled-word.yaml +2 -2
  620. package/rules/duplicate-definition.yaml +2 -2
  621. package/rules/duplicate-heading.yaml +2 -2
  622. package/rules/duration-mismatch.yaml +2 -2
  623. package/rules/email-greeting-closing.yaml +2 -2
  624. package/rules/email-subject-length.yaml +2 -2
  625. package/rules/empty-table-cell.yaml +2 -2
  626. package/rules/footnote-mismatch.yaml +2 -2
  627. package/rules/fullwidth-alnum-consistency.yaml +2 -2
  628. package/rules/heading-echo.yaml +2 -2
  629. package/rules/ime-residue.yaml +2 -2
  630. package/rules/kanji-compound-slip.yaml +67 -0
  631. package/rules/kutoten-consistency.yaml +4 -4
  632. package/rules/latin-spacing.yaml +2 -2
  633. package/rules/list-item-form-mix.yaml +2 -2
  634. package/rules/max-kanji-continuous.yaml +6 -4
  635. package/rules/max-sentence-length.yaml +2 -2
  636. package/rules/modal-conflict.yaml +1 -0
  637. package/rules/nado-closed-list.yaml +2 -2
  638. package/rules/ngram-repetition.yaml +2 -2
  639. package/rules/no-doubled-joshi.yaml +2 -2
  640. package/rules/no-mixed-desumasu.yaml +3 -3
  641. package/rules/no-nakaguro-parallel.yaml +2 -0
  642. package/rules/number-without-unit.yaml +9 -4
  643. package/rules/numbering-gap.yaml +7 -2
  644. package/rules/numeral-sentence-start.yaml +2 -2
  645. package/rules/obligation-without-deadline.yaml +2 -2
  646. package/rules/orthographic-variant.yaml +2 -2
  647. package/rules/oxford-comma-consistency.yaml +3 -3
  648. package/rules/preamble-length.yaml +3 -2
  649. package/rules/range-notation-consistency.yaml +2 -2
  650. package/rules/requirement-smell.yaml +3 -3
  651. package/rules/table-header-variant.yaml +2 -2
  652. package/rules/teki-overuse.yaml +3 -2
  653. package/rules/title-length.yaml +2 -2
  654. package/rules/topic-predicate-distance.yaml +2 -2
  655. package/rules/total-mismatch.yaml +2 -2
  656. package/rules/translationese-density.yaml +2 -2
  657. package/rules/undefined-acronym.yaml +5 -2
  658. package/rules/undefined-term.yaml +2 -2
  659. package/rules/unfilled-placeholder.yaml +4 -4
  660. package/rules/unqualified-superlative.yaml +1 -1
  661. package/rules/unused-definition.yaml +2 -2
  662. package/rules/use-before-definition.yaml +2 -2
  663. package/rules/vague-word-density.yaml +2 -2
  664. package/skills/chaff/SKILL.md +7 -1
  665. package/src/announced-count.ts +35 -8
  666. package/src/chronology-rows.ts +86 -0
  667. package/src/company-name-run.ts +37 -0
  668. package/src/compound-head.ts +25 -0
  669. package/src/date-format.ts +43 -4
  670. package/src/derived/count-per-period.ts +28 -0
  671. package/src/detectors/acronym-context.ts +30 -1
  672. package/src/detectors/acronym-expansion.ts +54 -6
  673. package/src/detectors/acronym-known.ts +40 -0
  674. package/src/detectors/acronym-link.ts +75 -0
  675. package/src/detectors/acronym-mention.ts +44 -0
  676. package/src/detectors/acronym-name.ts +29 -6
  677. package/src/detectors/addressee-edge.ts +16 -0
  678. package/src/detectors/addressee-title-edge.ts +39 -0
  679. package/src/detectors/announced-count.ts +1 -0
  680. package/src/detectors/bare-comparative.ts +44 -3
  681. package/src/detectors/blank-structure.ts +21 -10
  682. package/src/detectors/bracket-specified.ts +25 -0
  683. package/src/detectors/broken-link.ts +26 -2
  684. package/src/detectors/capitalised-term.ts +26 -2
  685. package/src/detectors/caps-caption.ts +76 -0
  686. package/src/detectors/caps-phrase.ts +17 -0
  687. package/src/detectors/char-shape.ts +73 -14
  688. package/src/detectors/citation-sentence.ts +44 -0
  689. package/src/detectors/cited-title.ts +15 -3
  690. package/src/detectors/contraction-mention.ts +24 -0
  691. package/src/detectors/counter-edge.ts +17 -2
  692. package/src/detectors/dash-break.ts +45 -0
  693. package/src/detectors/date-any-year.ts +34 -9
  694. package/src/detectors/date-format.ts +2 -1
  695. package/src/detectors/date-year.ts +64 -16
  696. package/src/detectors/deadline-unit.ts +40 -0
  697. package/src/detectors/defined-term-form.ts +32 -12
  698. package/src/detectors/definition-use.ts +17 -9
  699. package/src/detectors/derived-numbers.ts +19 -4
  700. package/src/detectors/document-shape.ts +20 -1
  701. package/src/detectors/doubled-across-aside.ts +36 -0
  702. package/src/detectors/doubled-punctuation.ts +28 -7
  703. package/src/detectors/doubled-word.ts +2 -1
  704. package/src/detectors/duplicate-heading.ts +26 -3
  705. package/src/detectors/ellipsis.ts +16 -1
  706. package/src/detectors/email-letter.ts +142 -23
  707. package/src/detectors/field-label.ts +25 -0
  708. package/src/detectors/footnote-mismatch.ts +39 -7
  709. package/src/detectors/fullwidth-alnum.ts +9 -1
  710. package/src/detectors/graded-step.ts +52 -0
  711. package/src/detectors/gram-openers.ts +50 -0
  712. package/src/detectors/gram-place.ts +10 -1
  713. package/src/detectors/gram-predicate.ts +43 -3
  714. package/src/detectors/heading-echo.ts +31 -3
  715. package/src/detectors/heading-record-rhythm.ts +57 -0
  716. package/src/detectors/ime-residue.ts +4 -3
  717. package/src/detectors/kanji-compound-slip.ts +61 -0
  718. package/src/detectors/kutoten-consistency.ts +102 -14
  719. package/src/detectors/lexicon.ts +18 -5
  720. package/src/detectors/link-shape.ts +10 -3
  721. package/src/detectors/list-item-ending.ts +51 -0
  722. package/src/detectors/list-parallel.ts +158 -33
  723. package/src/detectors/list-sentence.ts +5 -1
  724. package/src/detectors/mark-shape.ts +89 -10
  725. package/src/detectors/mentioned-phrase.ts +38 -0
  726. package/src/detectors/middle-dot.ts +7 -2
  727. package/src/detectors/modal-conflict.ts +5 -2
  728. package/src/detectors/name-variant.ts +6 -0
  729. package/src/detectors/notice-paragraph.ts +33 -0
  730. package/src/detectors/number-style.ts +14 -2
  731. package/src/detectors/number-unit.ts +28 -1
  732. package/src/detectors/numeral-opener.ts +27 -1
  733. package/src/detectors/obligation-without-deadline.ts +29 -4
  734. package/src/detectors/open-end-class.ts +78 -0
  735. package/src/detectors/open-end-condition.ts +40 -0
  736. package/src/detectors/open-end-names.ts +9 -3
  737. package/src/detectors/open-end-question.ts +50 -0
  738. package/src/detectors/open-end-scope.ts +62 -0
  739. package/src/detectors/opening-date.ts +47 -0
  740. package/src/detectors/ordinary-phrase.ts +62 -0
  741. package/src/detectors/organisation-run.ts +18 -2
  742. package/src/detectors/orthographic-variant.ts +124 -25
  743. package/src/detectors/orthography.ts +15 -2
  744. package/src/detectors/oxford-comma.ts +74 -3
  745. package/src/detectors/person-consistency.ts +5 -3
  746. package/src/detectors/phrase-match.ts +16 -5
  747. package/src/detectors/placeholder-text.ts +18 -3
  748. package/src/detectors/placeholder.ts +10 -3
  749. package/src/detectors/postcode-end.ts +16 -0
  750. package/src/detectors/prose-total-words.ts +18 -0
  751. package/src/detectors/range-notation.ts +26 -6
  752. package/src/detectors/registry/kanji-compound-slip.ts +4 -0
  753. package/src/detectors/registry/phrase-in-use.ts +4 -0
  754. package/src/detectors/requirement-smell.ts +45 -8
  755. package/src/detectors/scaled-figure-unit.ts +103 -0
  756. package/src/detectors/sentence-counts.ts +64 -12
  757. package/src/detectors/sentence-ending.ts +12 -3
  758. package/src/detectors/sentence-length.ts +17 -4
  759. package/src/detectors/sentence-load.ts +9 -2
  760. package/src/detectors/signals.ts +50 -53
  761. package/src/detectors/structure-tree.ts +14 -14
  762. package/src/detectors/structure.ts +2 -1
  763. package/src/detectors/subject-name-line.ts +66 -0
  764. package/src/detectors/superlative-name.ts +10 -0
  765. package/src/detectors/table-header.ts +15 -1
  766. package/src/detectors/technical-docs.ts +5 -1
  767. package/src/detectors/term-mention-sentence.ts +31 -0
  768. package/src/detectors/titled-run.ts +9 -4
  769. package/src/detectors/token-shape.ts +16 -5
  770. package/src/detectors/undefined-term.ts +8 -0
  771. package/src/detectors/unknown-word.ts +1 -1
  772. package/src/detectors/vague-density.ts +20 -4
  773. package/src/document-paragraphs.ts +27 -0
  774. package/src/document.ts +3 -23
  775. package/src/figure-references.ts +7 -2
  776. package/src/format-template.ts +15 -0
  777. package/src/formula-brackets.ts +36 -0
  778. package/src/html/html-markdown.ts +2 -1
  779. package/src/html/html-site-chrome.ts +104 -0
  780. package/src/joined-view.ts +1 -0
  781. package/src/kanji-compound-slip.ts +98 -0
  782. package/src/latin-company-form.ts +38 -0
  783. package/src/latin-word-boundary.ts +64 -0
  784. package/src/leading-label.ts +15 -0
  785. package/src/lexicon-genres.ts +1 -1
  786. package/src/link-shape.ts +31 -0
  787. package/src/link-title.ts +38 -0
  788. package/src/list-item-paragraphs.ts +22 -0
  789. package/src/literal-quote.ts +55 -0
  790. package/src/nado-closed-list.ts +48 -5
  791. package/src/name-misspelt-usual.ts +25 -0
  792. package/src/name-separator.ts +27 -2
  793. package/src/nominal-stem.ts +62 -5
  794. package/src/notice-header.ts +57 -0
  795. package/src/person-forms.ts +15 -0
  796. package/src/plugin.ts +5 -0
  797. package/src/preamble-paragraphs.ts +13 -3
  798. package/src/sentence-load.ts +14 -3
  799. package/src/spacing-code.ts +5 -1
  800. package/src/split-noun.ts +63 -0
  801. package/src/structure/attached-parts.ts +47 -0
  802. package/src/structure/build.ts +7 -4
  803. package/src/structure/contents-lines.ts +63 -0
  804. package/src/structure/defining-names.ts +155 -0
  805. package/src/structure/definition-use.ts +149 -32
  806. package/src/structure/gerund-phrase.ts +31 -0
  807. package/src/structure/issues.ts +7 -3
  808. package/src/structure/list-lead-in.ts +94 -0
  809. package/src/structure/modal-conflict.ts +42 -7
  810. package/src/structure/negated-act.ts +49 -0
  811. package/src/structure/numbering.ts +24 -9
  812. package/src/structure/prose-total.ts +20 -6
  813. package/src/structure/repeated-number.ts +110 -0
  814. package/src/structure/rounded-amount.ts +55 -0
  815. package/src/structure/side-step.ts +21 -0
  816. package/src/structure/spanned-label-blank.ts +39 -0
  817. package/src/structure/universal.ts +33 -9
  818. package/src/structure/unspaced-heading.ts +27 -0
  819. package/src/structure/written-list-path.ts +46 -0
  820. package/src/structure/written-resolve.ts +16 -9
  821. package/src/title-line.ts +53 -0
  822. package/src/topic-clause.ts +109 -0
  823. package/src/uncounted-particles.ts +72 -0
@@ -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). 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.
64
+ ja: 単位や列の違う金額は足しません。合計の語に表の見出しが名指さない語を付けた行(見出しが「項目」の表の「消費税合計」)は、別の種類の合計かもしれないので比べません。差引合計・控除合計も、表の最後の行でないとき、上に合計の行や総支給額・支給合計の行があるとき、金額の列が二つ以上あるときは比べず、下から続けた行の和か、その上の行の和からそれを引いた額と合えば指しません。面積のように、上の行の和とは限らない量の合計(面積合計)も比べません。前の期間の合計(前年合計)は読まず、期間を付けた合計が内訳の和を一年に直した額(ちょうど4倍・12倍・52倍。月額の内訳に年間合計)なら比べません。重さ・容量・長さ(mg、g、mL、L、cm、km)は、列のどの行も同じ種類の量なら換算して足します(500mg と 0.5g は 1g)。何あたりかを書いた量(300mg/錠)、目安の量(約300mg)、範囲(300〜400mg)がある列は足しません。足し方が何通りもあるとき(小計と税のあとの総計など)は、どれとも合わないときだけ指します。文の中では、合計の語(合計・総額)のすぐ後ろの金額か内訳の語(内訳は)のすぐ前の金額だけを合計と読み、内訳の金額が二つ以上あるときだけ比べます。並びの一部(単価や上限など、合計の語から離れた金額を除いた並び)の和か、一つを引いた額(値引き)と合えば指しません。合計のすぐ後ろの「:」から続く内訳は、「うち」「または」「最大」のように内訳のすべてとは限らない語があるとき、ほかの単位の金額や割合を並べたときは比べません。内訳の前に主なものだけだと言う語(「主な設備投資は」「主な内訳は」「主に」)があれば、内訳は合計のすべてではないので比べません。合計と内訳のどれもが丸めた単位(百万円・千円・億円、million)で有効数字3桁以上(6,655百万円。4億円は除く)で書いてあれば、ずれが(内訳の数 − 1)× 最後の桁一つ分まで(三つの内訳を百万円で書いたなら2百万円まで)は、四捨五入や切り捨てのずれとして指しません。
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. Items introduced as only the main ones ("mainly", 主な) are not compared, as they need not be every item. When the total and every item are written in a rounded unit (millions, billions, 百万円) with at least three significant digits ($6,655 million, not $4 million), a difference of up to (number of items − 1) last digits ($2 million for three items in whole millions) is rounding and is not reported.
@@ -43,8 +43,8 @@ example:
43
43
  この機能を使うと、設定を共有できます。速度にはキャッシュが大きく効きます。設定は設定画面からいつでも変えられます。
44
44
 
45
45
  not_flagged:
46
- ja: 一つ一つは誤りではないので、短い文書(500 字未満)は測りません。人の書いた技術記事でもふつうに使う言い回し(〜を提供する、〜に焦点を当てる、〜することができる)は数えません。文学のジャンルでは既定で止めています(人物を「彼女は」と呼ぶのは小説の書き方です)。
47
- en: None of these is wrong alone, so documents shorter than 500 characters are not measured. Phrasings common in human technical writing (を提供する, に焦点を当てる, することができる) are not counted. The literature preset turns it off, since a novel calls its characters 彼女.
46
+ ja: 一つ一つは誤りではないので、短い文書(500 字未満)は測りません。人の書いた技術記事でもふつうに使う言い回し(〜を提供する、〜に焦点を当てる、〜することができる)は数えません。読み手への呼びかけ(あなたの、あなたは)だけの文書は、読み手に語りかける書き方を選んだものとして言いません(ほかの言い回しと重なれば数えます)。文学のジャンルでは既定で止めています(人物を「彼女は」と呼ぶのは小説の書き方です)。
47
+ en: None of these is wrong alone, so documents shorter than 500 characters are not measured. Phrasings common in human technical writing (を提供する, に焦点を当てる, することができる) are not counted. A document whose only such phrases address the reader (あなたの, あなたは) has chosen to speak to its reader and is not reported; beside other phrases they count. The literature preset turns it off, since a novel calls its characters 彼女.
48
48
  level_meaning:
49
49
  ja: 1000 字あたり翻訳調の言い回し {limit} 個まで
50
50
  en: up to {limit} translated phrasings per 1000 characters
@@ -8,6 +8,7 @@ extra_word_lists:
8
8
  definition-marker,
9
9
  definition-verb,
10
10
  definition-statement,
11
+ definition-alternative,
11
12
  meridiem,
12
13
  time-zone,
13
14
  currency-code,
@@ -21,6 +22,7 @@ extra_word_lists:
21
22
  http-method,
22
23
  reference-list-heading,
23
24
  legal-form,
25
+ company-form,
24
26
  citation-series,
25
27
  carrier-name,
26
28
  name-prefix,
@@ -28,6 +30,7 @@ extra_word_lists:
28
30
  tax-code,
29
31
  capital-phrase,
30
32
  name-determiner,
33
+ abbreviation-mention,
31
34
  ]
32
35
  uses: [pos]
33
36
  severity: info
@@ -76,8 +79,8 @@ example:
76
79
  after: Our key goal indicator (KGI) this term is to reach product-market fit (PMF).
77
80
 
78
81
  not_flagged:
79
- ja: 誰でも知っている略語(URL、PDF など)と、前後の括弧で説明した略語は指しません。
80
- en: Common acronyms (URL, PDF) and acronyms spelled out in brackets next to them are not reported.
82
+ ja: 誰でも知っている略語(URL、PDF など)と、前後の括弧で説明した略語、会社の名前の中の英字(㈱ADEKA、CO.,LTD.)は指しません。ひな形の名前の置き場所(OOOO、XX 月)と、外のページへのリンクを並べた一覧の題名の中の略語も指しません(題名の略語は数には入れます)。大文字の違うだけの書き方で説明した略語(TCoP と TCOP)、略語を話題にする文で語に書き出した略語(略語の DOB … date of birth)、一覧で語のすぐ下にその語を名指すリンクを入れ子にした語(- GPL の下の GNU General Public License)も指しません。
83
+ en: Common acronyms (URL, PDF), acronyms spelled out in brackets next to them, and the letters of a company name (㈱ADEKA, CO.,LTD.) are not reported. Neither are a template's placeholders (OOOO, XX 月) or an acronym in the title of a page in a list of links (it still counts towards the limit). Nor are an acronym explained under another capitalisation (TCoP, then TCOP), one a sentence about the abbreviation writes out (the abbreviation DOB … date of birth), or a term in a list whose nested link names it (- GPL above GNU General Public License).
81
84
  level_meaning:
82
85
  ja: 説明のない略語が {limit} 種類あれば指摘。文書が自分で略語を {limit} 個展開していれば、1 つの抜けから指摘
83
86
  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)、前後の語から名前と分かるもの(後ろに番号が付く 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."
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、すぐ後ろの attached hereto などで添付した書式の題と分かるもの the Termination Certificate attached hereto)、見出し・リンク・太字・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; words right after it that make it the title of an attached form: the Termination Certificate attached hereto), 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:
@@ -10,8 +10,8 @@ name:
10
10
  en: Unfilled placeholder
11
11
 
12
12
  why:
13
- ja: "「【会社名】」「[Your Name]」「(ここに会社名を書く)」は、雛形や生成した下書きに残る空欄です。値に「TODO: …」「未定」とだけ書いたものも、後で埋めるつもりの空欄です。文体の好みではなく、埋め忘れです。例として置いた「○○」は正しい書き方なので数えません。"
14
- en: '"[Your Name]" and "[Insert Date]" are the blanks a template or a generated draft leaves. A value that only says "TODO: …" or "TBD" is a blank too, left to fill in later. This is not a matter of style: the blank was never filled.'
13
+ ja: "「【会社名】」「[Your Name]」「(ここに会社名を書く)」は、雛形や生成した下書きに残る空欄です。値に「TODO: …」「未定」とだけ書いたものも、後で埋めるつもりの空欄です。英語の雛形の指示の行(OPTIONAL: General conclusions …)が、埋めた報告書に残ったものも同じです。文体の好みではなく、埋め忘れです。例として置いた「○○」は正しい書き方なので数えません。"
14
+ en: '"[Your Name]" and "[Insert Date]" are the blanks a template or a generated draft leaves. A value that only says "TODO: …" or "TBD" is a blank too, left to fill in later, and so is an instruction line from the template left in a filled report ("OPTIONAL: General conclusions …"). This is not a matter of style: the blank was never filled.'
15
15
 
16
16
  message:
17
17
  ja: 「{matched}」が埋まっていません
@@ -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"), "TBD" inside a sentence ("the date is TBD"), and blanks under a heading that names a template ("## Template", "# Sample letter") are not reported.'
46
+ ja: "例として置いた「○○」、Markdown のリンク、脚注の番号、チェック欄とチェックリストの項目(- [ ] TODO: …)、値が続く見出しの札(【氏名】山田)、大文字でない「Optional:」と行の途中の OPTIONAL、コードとコードのコメント(// TODO)、文の中の「未定」(日程は未定です)、見出しが雛形と言う節(「## 雛形」「# 記入例」)の中の空欄は指しません。"
47
+ en: 'Markdown links and reference definitions, footnote numbers, checkboxes and checklist items ("- [ ] TODO: …"), a label its value follows ("[Date]: 2024-04-01"), "Optional:" not in capitals and OPTIONAL inside a line, 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.'
@@ -46,7 +46,7 @@ example:
46
46
  after: Our new product processes orders a fifth faster than the previous model.
47
47
 
48
48
  not_flagged:
49
- ja: 「当社比」「〜の中で」「〜のほうが」のように、比べる相手や範囲が同じ文にあれば指しません。「SES との最大の違い」のように、最上級のすぐ前に相手があるときも同じです。「国内最大」「業界最速」のように名詞がじかに付いた最上級と、「日本で最も」のように名前と「で」が前にある最上級は、範囲を言っているので指しません。「バグを検出できる唯一のルール」のように、動詞で終わる節が最上級のすぐ前にあって範囲を決めているときも同じです。「」や引用符で引いた言葉の中の最上級は、書き手の主張ではないので指しません。
49
+ ja: 「当社比」「〜の中で」「〜のほうが」のように、比べる相手や範囲が同じ文にあれば指しません。「SES との最大の違い」のように、最上級のすぐ前に相手があるときも同じです。「国内最大」「業界最速」のように名詞がじかに付いた最上級と、「日本で最も」のように名前と「で」が前にある最上級は、範囲を言っているので指しません。「バグを検出できる唯一のルール」のように、動詞で終わる節が最上級のすぐ前にあって範囲を決めているときも同じです。「」や引用符で引いた言葉の中の最上級は、書き手の主張ではないので指しません。「最大化する」のように接尾辞が付いて別の語になったものも指しません。
50
50
  en: A superlative with its comparison or scope in the same sentence ("in our range", "than last year", "the fastest in the industry") is not reported, nor is one limited by a clause ("the best we have measured"), nor one inside quotation marks, which are someone else's words.
51
51
  level_meaning:
52
52
  ja: 比べる相手のない最上級が {limit} 箇所あれば指摘
@@ -48,8 +48,8 @@ example:
48
48
  "Service" means the booking website we run. Users may use the Service free of charge.
49
49
 
50
50
  not_flagged:
51
- ja: 定義の書き方(「X」とは、以下「X」という、規約やポリシーの以下「X」といいます)で書いた語だけを見ます。複数形と所有の形(Services、Seller's)と、見出しの中の語も使用に数えます。同じ語の二つ目の定義は duplicate-definition が言います。
52
- en: Only terms defined in a recognised form ("X" means, (the "X")) are checked. Plurals and possessives (Services, Seller's) count as uses, and so does the term in a heading. A second definition of the same term is duplicate-definition's to report.
51
+ ja: 定義の書き方(「X」とは、以下「X」という、規約やポリシーの以下「X」といいます)で書いた語だけを見ます。複数形と所有の形(Services、Seller's)と、見出しの中の語も使用に数えます。英語の動名詞と目的語の句(Exercising your options)は、動詞のほかの形で書いた所(exercise your options)も使用に数えます。同じ語の二つ目の定義は duplicate-definition が言います。
52
+ en: Only terms defined in a recognised form ("X" means, (the "X")) are checked. Plurals and possessives (Services, Seller's) count as uses, and so does the term in a heading. A phrase of a gerund and its object (Exercising your options) is also used where its verb is written in another form (exercise your options). A second definition of the same term is duplicate-definition's to report.
53
53
  rewrite:
54
54
  depth: light
55
55
  ja:
@@ -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」といいます)も、法令の形と同じに読みます。見出しの行(章・節の行、条の前の「(買主の義務)」のような見出し)の語と、漢字で終わる語にさらに漢字が続く長い語(「監査委員会」の「監査委員」)と、定義の括弧の前の長い名前をそのまま書いた所(「…作成の手引き(以下「手引き」という。)」より前の「…作成の手引き」)は、使った所に数えません。最初の一か所だけを指します。別の語を定義する括弧の前の名前の中(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.
53
+ ja: 定義の条(「X」とは…をいう)で定義した語は、前で使っても言いません。定義の条は文書の頭にも終わりにも置く書き方があるためです。規約やポリシーの丁寧な形(以下「X」といいます)も、法令の形と同じに読みます。見出しの行(章・節の行、条の前の「(買主の義務)」のような見出し)の語と、漢字で終わる語にさらに漢字が続く長い語(「監査委員会」の「監査委員」)と、定義の括弧の前の長い名前をそのまま書いた所(「…作成の手引き(以下「手引き」という。)」より前の「…作成の手引き」)は、使った所に数えません。最初の一か所だけを指します。別の語を定義する括弧の前の名前の中(This Services Agreement (this "Agreement") の Services、本サービス利用契約(以下「本契約」という。)の本サービス)も、使った所に数えません。目次・索引の行(目次の見出しの下の項目、一行に詰めた目次、定義した語と条の番地の一覧)と、条の番号の後ろの題(Section 1.1 Closing.)と、番号と語の終わりに条の番地の括弧を添えただけの札((1)文化芸術推進基本計画(第7条関係))と、語を含むもっと長い名前(定義の括弧の前の名前を前で写した株式会社みなと、もっと長い定義した語、Navistar Financial Corporation)も数えません。文書自身の名前と定義した語に同じ頭を付けた所(この就業規則(以下「規則」)より前の「この規則」)と、すぐ後ろの括弧に定義の長い名前を書き添えた所は、読み手に分かるので言いません。
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. Nor are contents and index lines (the items under a contents heading, a table of contents or a list of defined terms and section numbers packed on one line), a caption after a section number (Section 1.1 Closing.), a label of a number and the term ending in a bracketed section reference ((a) Seller (Section 2)), or a longer name that holds the term, such as an earlier copy of the name before the bracket (Board of Directors before our Board of Directors ("Board")), a longer defined term, a capitalised name ending in it (Navistar Financial Corporation). The document naming itself (this Agreement before (this "Agreement")) and a use followed by the long name in brackets are clear to the reader and not pointed at.
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: 文書の長さに対して少ないものは指しません。短すぎる文書も測りません。指すのは語のある文ごとに一度で、長い言い方の中の語(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".'
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". A word that the bracket right after it pins down ("a reasonable fee (USD 50)") is not counted either; a bracket that only names it ("(hereinafter the ""Fee"")") pins nothing down.'
58
58
  level_meaning:
59
59
  ja: 1000 字あたりあいまいな語 {limit} 個まで
60
60
  en: up to {limit} vague words per 1000 words
@@ -31,7 +31,9 @@ read. A contract checked as a blog post gets wrong findings, so choose the genre
31
31
  guessed or default genre shows no guide, and `--no-guide` leaves it out.
32
32
 
33
33
  A rule the genre turns off is listed under "did not run" with the genre as the reason. That is the preset's
34
- choice, not a gap; turn it back on (`rules:` in `chaff.yaml`) only when the person asks.
34
+ choice, not a gap; turn it back on (`rules:` in `chaff.yaml`) only when the person asks. Some of these are off
35
+ because chaff measured them to be mostly wrong for that kind of document on real, judged documents
36
+ ([isamu/chaff-corpus](https://github.com/isamu/chaff-corpus)); turning one back on brings those false findings back.
35
37
 
36
38
  ## Run it
37
39
 
@@ -75,6 +77,10 @@ calls nothing. Ask the person before a real run; the passages leave the machine.
75
77
  `npx chaffjs explain <rule-id>` shows why a rule exists, its levels and the current one. Read it before
76
78
  relaxing a rule.
77
79
 
80
+ When a finding is wrong for a reason that is not about this team (chaff misread the text), tell the person and offer
81
+ `npx chaffjs feedback <file> --rule <rule-id> --line <n>`: it drafts a report and sends nothing. A document the
82
+ person may share can go to isamu/chaff-corpus, where wrong findings become test cases and rule fixes.
83
+
78
84
  ## When numbers or dates disagree
79
85
 
80
86
  The group "Facts that disagree" in `npx chaffjs rules` checks what a sum or a calendar can settle. Among them:
@@ -20,6 +20,8 @@ export type CountWords = {
20
20
  readonly hedgesBefore: readonly string[];
21
21
  /** 数か数える語のすぐ後ろにあると予告でなくなる語(以上、目、or more)。 */
22
22
  readonly hedgesAfter: readonly string[];
23
+ /** 数と合わせて、その一行だけで下の並びの数を言う見出しの語(3行要約、three-line summary)。 */
24
+ readonly titles: readonly string[];
23
25
  };
24
26
 
25
27
  export type CountMismatch = { readonly offset: number; readonly phrase: string; readonly announced: number; readonly listed: number };
@@ -101,7 +103,17 @@ const numberPattern = (words: CountWords): RegExp => {
101
103
  return new RegExp(latin.length === 0 ? digits : `${digits}|(?<![A-Za-z])(?:${alternation(latin)})(?![A-Za-z])`, "iu");
102
104
  };
103
105
 
104
- type Patterns = { readonly phrase: RegExp; readonly number: RegExp };
106
+ /**
107
+ * 予告の塊が一行で、数と見出しの語だけ(3行要約、**Three-line summary:**)。前後でそろった強調の印と終わりのコロンは許す。
108
+ * 文の中の「3行要約を書いた」は予告でない。
109
+ */
110
+ const titlePattern = (words: CountWords): RegExp | undefined => {
111
+ if (words.titles.length === 0) return undefined;
112
+ const numbers = words.numbers.length === 0 ? "\\p{Nd}+" : `\\p{Nd}+|${alternation(words.numbers)}`;
113
+ return new RegExp(`^([ \\t]*(\\*\\*|__|\\*|_)?)((${numbers})[ \\t]?(?:${alternation(words.titles)}))\\2[ \\t]*[::]?[ \\t]*$`, "iu");
114
+ };
115
+
116
+ type Patterns = { readonly phrase: RegExp; readonly number: RegExp; readonly title: RegExp | undefined };
105
117
 
106
118
  /**
107
119
  * 数える語の無い数は、先を指す語のすぐ後ろでだけ(the following two:)。「under $75:」の金額を数に読まない。
@@ -181,20 +193,35 @@ const matchesList = (announced: number, source: string, list: BulletList): boole
181
193
 
182
194
  type Context = { readonly source: string; readonly words: CountWords; readonly patterns: Patterns; readonly neighbours: Neighbours };
183
195
 
196
+ /** 予告の塊のどこに、何と書いて、いくつと言ったか。 */
197
+ type Announcement = { readonly start: number; readonly phrase: string; readonly announced: number };
198
+
199
+ /** 最後の一文の予告(以下の3点)か、塊が見出しの語句だけの予告(3行要約)。 */
200
+ const announcementIn = (lead: string, words: CountWords, patterns: Patterns): Announcement | undefined => {
201
+ const sentenceStart = lastSentenceStart(lead);
202
+ const sentence = lead.slice(sentenceStart);
203
+ const phrase = announcedIn(sentence, words, patterns);
204
+ if (phrase !== undefined)
205
+ return { start: sentenceStart + phrase.start, phrase: sentence.slice(phrase.start, phrase.end).trim(), announced: phrase.announced };
206
+ const title = patterns.title?.exec(lead);
207
+ const written = title?.[3];
208
+ if (title === null || title === undefined || written === undefined) return undefined;
209
+ const announced = valueOf(title[4] ?? "", words.numbers);
210
+ return announced < 1 ? undefined : { start: (title[1] ?? "").length, phrase: written, announced };
211
+ };
212
+
184
213
  const mismatchOf = ({ source, words, patterns, neighbours }: Context, list: BulletList): CountMismatch[] => {
185
214
  if (hasNeighbour(source, list.span, neighbours)) return [];
186
215
  const lead = leadBefore(source, list.span.start);
187
216
  if (lead === undefined) return [];
188
- const sentenceStart = lastSentenceStart(lead.text);
189
- const sentence = lead.text.slice(sentenceStart);
190
- const phrase = announcedIn(sentence, words, patterns);
191
- if (phrase === undefined || matchesList(phrase.announced, source, list)) return [];
192
- const offset = lead.start + sentenceStart + phrase.start;
193
- return [{ offset, phrase: sentence.slice(phrase.start, phrase.end).trim(), announced: phrase.announced, listed: list.items.length }];
217
+ const announcement = announcementIn(lead.text, words, patterns);
218
+ if (announcement === undefined || matchesList(announcement.announced, source, list)) return [];
219
+ return [{ offset: lead.start + announcement.start, phrase: announcement.phrase, announced: announcement.announced, listed: list.items.length }];
194
220
  };
195
221
 
196
222
  export const announcedCountMismatches = (source: string, lists: readonly BulletList[], words: CountWords): CountMismatch[] => {
197
223
  if (words.counters.length === 0) return [];
198
- const context = { source, words, patterns: { phrase: phrasePattern(words), number: numberPattern(words) }, neighbours: neighboursOf(source, lists) };
224
+ const patterns = { phrase: phrasePattern(words), number: numberPattern(words), title: titlePattern(words) };
225
+ const context = { source, words, patterns, neighbours: neighboursOf(source, lists) };
199
226
  return lists.flatMap((list) => mismatchOf(context, list));
200
227
  };
@@ -0,0 +1,86 @@
1
+ import { calendarUnitsOf, type CalendarUnits } from "./calendar-number.ts";
2
+ import type { ProseDocument, Sentence } from "./plugin.ts";
3
+
4
+ /**
5
+ * 年表の行(「1950年4月 設立」「2003年4月大阪証券取引所上場廃止。」)。日付で始まり、すぐに出来事を書く。
6
+ * 行は名詞で止め、文書の文体とも合わせないのが年表の書き方なので、本文の文として数えない。
7
+ *
8
+ * 日付で始まる文が 1 つだけなら本文(「2020年4月当社は…」)。続けて MIN_ROWS 以上並んだときだけ年表と読む。
9
+ * 行の注記(「当時主要製品は…」)が MAX_GAP 文まで挟まっても同じ年表の続きで、注記も年表の中身として数えない。
10
+ */
11
+ const MIN_ROWS = 3;
12
+ const MAX_GAP = 4;
13
+
14
+ /** 日付のすぐ後ろにあれば、日付は文の一部で年表の見出しではない(2020年に、2020年4月、当社は)。 */
15
+ const JOINS_DATE = /^[\p{Script=Hiragana}\p{P}\p{Sm}]/u;
16
+ const DIGITS = /^[0-90-9]+/u;
17
+ const CALENDAR_YEAR_DIGITS = 4;
18
+
19
+ type Part = { readonly digits: number; readonly rank: number; readonly end: number };
20
+
21
+ /** 数(全角も)と、その後ろ(空白 1 つまで)の単位。単位が units.chained に無ければ undefined。 */
22
+ const partAt = (text: string, at: number, units: CalendarUnits): Part | undefined => {
23
+ const digits = DIGITS.exec(text.slice(at))?.[0];
24
+ if (digits === undefined) return undefined;
25
+ const unitAt = text[at + digits.length] === " " ? at + digits.length + 1 : at + digits.length;
26
+ const rank = units.chained.findIndex((unit) => text.startsWith(unit, unitAt));
27
+ const unit = units.chained[rank];
28
+ if (unit === undefined) return undefined;
29
+ // 「2020年度」は年度という別の語で、年表の日付ではない。
30
+ if ([...units.year].some((word) => word.length > unit.length && text.startsWith(word, unitAt))) return undefined;
31
+ return { digits: digits.length, rank, end: unitAt + unit.length };
32
+ };
33
+
34
+ /** 前より小さい単位(年の後ろの月、月の後ろの日)が続く限り延ばした日付の終わり。 */
35
+ const chainEnd = (text: string, last: Part, units: CalendarUnits): number => {
36
+ const next = partAt(text, last.end, units);
37
+ return next !== undefined && next.rank > last.rank ? chainEnd(text, next, units) : last.end;
38
+ };
39
+
40
+ /** 文の頭の見出しの札(「2【沿革】」)。本文に流し込んだ見出しの後ろから、最初の行が始まる。 */
41
+ const LEADING_LABEL = /^\s*(?:[0-90-9]+\s*)?【[^】\n]*】\s*/u;
42
+
43
+ /** 文の頭(空白と見出しの札を除く)の、年から始まる日付(1950年4月、昭和56年11月1日)の終わり。年は 4 桁か元号付き。日付で始まらなければ undefined。 */
44
+ const leadingDateEnd = (text: string, units: CalendarUnits): number | undefined => {
45
+ const lead = LEADING_LABEL.exec(text)?.[0].length ?? text.length - text.trimStart().length;
46
+ const era = units.era.find((name) => text.startsWith(name, lead));
47
+ const year = partAt(text, lead + (era?.length ?? 0), units);
48
+ if (year === undefined || year.rank !== 0 || (era === undefined && year.digits !== CALENDAR_YEAR_DIGITS)) return undefined;
49
+ return chainEnd(text, year, units);
50
+ };
51
+
52
+ /** 年から始まる日付で始まり、助詞も句読点も挟まずに出来事が続く文か。units は日付の単位(年月日の順)と元号。 */
53
+ export const opensWithDateStamp = (text: string, units: CalendarUnits): boolean => {
54
+ const end = leadingDateEnd(text, units);
55
+ if (end === undefined) return false;
56
+ const rest = text.slice(end).trimStart();
57
+ return rest !== "" && !JOINS_DATE.test(rest);
58
+ };
59
+
60
+ /** heads[i] が日付で始まる文。年表と読む文の番号(MAX_GAP 文までの間を挟んで MIN_ROWS 以上続く行と、行の間の注記)。 */
61
+ export const chronologyRowIndexes = (heads: readonly boolean[]): ReadonlySet<number> => {
62
+ const dated = heads.flatMap((head, index) => (head ? [index] : []));
63
+ const clusters = dated.reduce<number[][]>((acc, index) => {
64
+ const cluster = acc.at(-1);
65
+ const previous = cluster?.at(-1);
66
+ if (cluster !== undefined && previous !== undefined && index - previous - 1 <= MAX_GAP) cluster.push(index);
67
+ else acc.push([index]);
68
+ return acc;
69
+ }, []);
70
+ return new Set(
71
+ clusters
72
+ .filter((cluster) => cluster.length >= MIN_ROWS)
73
+ .flatMap((cluster) => Array.from({ length: (cluster.at(-1) ?? 0) - (cluster[0] ?? 0) + 1 }, (_, offset) => (cluster[0] ?? 0) + offset)),
74
+ );
75
+ };
76
+
77
+ /** 主題の「は」。年表の行は出来事だけを書き、主題を立てない。立てた文(2021年売上高は110億円です。)は日付で始まっても本文。 */
78
+ const TOPIC = "は";
79
+ const hasTopic = (sentence: Sentence): boolean => (sentence.tokens ?? []).some((token) => token.surface === TOPIC && token.pos === "ADP");
80
+
81
+ /** 文書の中の、年表の行の文。 */
82
+ export const chronologyRows = (doc: ProseDocument): ReadonlySet<Sentence> => {
83
+ const units = calendarUnitsOf(doc);
84
+ const rows = chronologyRowIndexes(doc.sentences.map((sentence) => opensWithDateStamp(sentence.text, units) && !hasTopic(sentence)));
85
+ return new Set(doc.sentences.filter((_, index) => rows.has(index)));
86
+ };
@@ -0,0 +1,37 @@
1
+ import { escapeRegExp } from "./orthography.ts";
2
+ import type { Span } from "./plugin.ts";
3
+
4
+ /** 会社の名前に使う字(漢字・片仮名・英数字)の続き。かなや句読点で名前は切れる。 */
5
+ const NAME_RUN = /[\p{Script=Han}ァ-ヺーA-Za-zA-Za-z0-90-9&&・]+/gu;
6
+
7
+ /** 漢字か片仮名を含む形(株式会社、㈱、(株))。英字だけの形は日本語の名前の目印にならない。 */
8
+ const NOT_LATIN = /[^\p{Script=Latin}\p{P}\s]/u;
9
+
10
+ const formPattern = (forms: readonly string[]): RegExp =>
11
+ new RegExp(
12
+ [...forms]
13
+ .sort((a, b) => b.length - a.length)
14
+ .map(escapeRegExp)
15
+ .join("|"),
16
+ "gu",
17
+ );
18
+
19
+ /** at を含むか、at で接する名前の字の続き。 */
20
+ const runAround = (runs: readonly Span[], at: number): Span | undefined => runs.find((run) => run.start <= at && at <= run.end);
21
+
22
+ /**
23
+ * text の中の、日本の会社の形(語彙表 company-form)とその隣の名前の範囲(関東珪曹硝子㈱、株式会社ADEKA)。
24
+ * 名前は書き手が選べない字で書かれるので、表記のゆれを数える語に入れない。形の前は名前の字が続くかぎり、形の後ろも同じ。
25
+ * 名前の字の続きを一度だけ求め、形の両端をそれに合わせて伸ばす。
26
+ */
27
+ export const japaneseCompanyNameSpans = (text: string, forms: readonly string[]): Span[] => {
28
+ const japanese = forms.filter((form) => NOT_LATIN.test(form));
29
+ if (japanese.length === 0) return [];
30
+ const found = [...text.matchAll(formPattern(japanese))];
31
+ if (found.length === 0) return [];
32
+ const runs = [...text.matchAll(NAME_RUN)].map((match) => ({ start: match.index, end: match.index + match[0].length }));
33
+ return found.map((match) => {
34
+ const end = match.index + match[0].length;
35
+ return { start: runAround(runs, match.index)?.start ?? match.index, end: runAround(runs, end)?.end ?? end };
36
+ });
37
+ };
@@ -0,0 +1,25 @@
1
+ import type { Token } from "./plugin.ts";
2
+
3
+ const OPENING = new Set(["(", "("]);
4
+ const CLOSING = new Set([")", ")"]);
5
+
6
+ const isTouching = (left: Token | undefined, right: Token | undefined): boolean =>
7
+ left !== undefined && right !== undefined && left.span.end === right.span.start;
8
+
9
+ const isNounBefore = (token: Token, next: Token | undefined, suffixes: ReadonlySet<string>): next is Token =>
10
+ next?.pos === "NOUN" && isTouching(token, next) && !suffixes.has(next.surface);
11
+
12
+ /** A noun alone in brackets that close onto a noun (卒業(見込)証明書): the brackets mark it optional inside one compound. */
13
+ const isBracketedInCompound = (token: Token, tokens: readonly Token[], at: number, suffixes: ReadonlySet<string>): boolean => {
14
+ const [opening, closing] = [tokens[at - 1], tokens[at + 1]];
15
+ if (opening === undefined || closing === undefined) return false;
16
+ if (!OPENING.has(opening.surface) || !CLOSING.has(closing.surface) || !isTouching(opening, token) || !isTouching(token, closing)) return false;
17
+ return isNounBefore(closing, tokens[at + 2], suffixes);
18
+ };
19
+
20
+ /**
21
+ * Whether `token`, read at `at` in `tokens`, is a noun written onto the noun after it (取扱事業者), so official Japanese may
22
+ * drop its okurigana. A listed phrase suffix (割当て等) does not make a compound. `token` may be tokens[at] read as a noun.
23
+ */
24
+ export const isCompoundHead = (token: Token, tokens: readonly Token[], at: number, suffixes: ReadonlySet<string>): boolean =>
25
+ token.pos === "NOUN" && (isNounBefore(token, tokens[at + 1], suffixes) || isBracketedInCompound(token, tokens, at, suffixes));
@@ -115,9 +115,48 @@ const LINE_HEAD = /(?:^|\|)[\s>*_+-]*(?:\d+[.)]\s+)?$/u;
115
115
  /** 日付が行の頭(箇条書きの項目や表の升の頭)にあるか。 */
116
116
  export const opensLine = (text: string, offset: number): boolean => LINE_HEAD.test(text.slice(text.lastIndexOf("\n", offset - 1) + 1, offset));
117
117
 
118
+ /** 刻印のラベルと日付の間に来る字(更新日:、Last updated: )。 */
119
+ const STAMP_GAP = /[\s::]/u;
120
+ /** 末尾の、ラベルと日付の間の字を外した文字列。 */
121
+ const withoutGap = (text: string): string => {
122
+ const chars = text.split("");
123
+ return chars.slice(0, chars.findLastIndex((char) => !STAMP_GAP.test(char)) + 1).join("");
124
+ };
125
+
126
+ /** 刻印のラベルの前に来てよい字。行の頭か、ページの部品を区切る空白と縦線(ページID:0014616 更新日:)。 */
127
+ const STAMP_LEAD = /[\s||]/u;
128
+
129
+ /**
130
+ * text が刻印のラベル word で終わり、ラベルが行の頭か区切りの後ろから始まる。文の中の語(この日付は公開:、The date:、
131
+ * 1Updated)は刻印のラベルではない。語彙表に書いたとおりの字で照らす。
132
+ */
133
+ const endsWithLabel = (text: string, word: string): boolean => {
134
+ const start = text.length - word.length;
135
+ if (word === "" || start < 0 || !text.endsWith(word)) return false;
136
+ return start === 0 || STAMP_LEAD.test(text.charAt(start - 1));
137
+ };
138
+
139
+ /**
140
+ * 日付のすぐ前が、ページの更新日・公開日の刻印のラベル(更新日:2026年10月13日、Last updated: 2 October 2026)。
141
+ * 刻印は CMS が付ける付帯情報で、本文の日付の書き方(令和8年…)とは別の書き方をしてよい。
142
+ */
143
+ export const stampedDate = (text: string, offset: number, stampLabels: readonly string[]): boolean => {
144
+ const before = withoutGap(text.slice(text.lastIndexOf("\n", offset - 1) + 1, offset));
145
+ return stampLabels.some((label) => endsWithLabel(before, label));
146
+ };
147
+
148
+ type DateGroup = "head" | "body" | "stamp";
149
+
150
+ const groupOf = (text: string, date: WrittenDate, stampLabels: readonly string[]): DateGroup => {
151
+ if (stampedDate(text, date.offset, stampLabels)) return "stamp";
152
+ return opensLine(text, date.offset) ? "head" : "body";
153
+ };
154
+
155
+ const GROUP_ORDER: readonly DateGroup[] = ["head", "body", "stamp"];
156
+
118
157
  /**
119
- * 行の頭の日付と、文の中の日付を分ける。予定表を 2026-10-16 で並べ、文では 14 October 2026 と書くのは使い分けで、混ざりではない。
120
- * 書き方はそれぞれの組の中でだけ比べる。
158
+ * 行の頭の日付と、文の中の日付と、更新日・公開日の刻印の日付を分ける。予定表を 2026-10-16 で並べ、文では 14 October 2026 と
159
+ * 書くのは使い分けで、混ざりではない。刻印のラベルは言語パッケージの語彙表(date-stamp-label)が渡す。書き方はそれぞれの組の中でだけ比べる。
121
160
  */
122
- export const dateGroups = (text: string, dates: readonly WrittenDate[]): WrittenDate[][] =>
123
- [true, false].map((head) => dates.filter((date) => opensLine(text, date.offset) === head)).filter((group) => group.length > 0);
161
+ export const dateGroups = (text: string, dates: readonly WrittenDate[], stampLabels: readonly string[] = []): WrittenDate[][] =>
162
+ GROUP_ORDER.map((group) => dates.filter((date) => groupOf(text, date, stampLabels) === group)).filter((group) => group.length > 0);
@@ -0,0 +1,28 @@
1
+ import type { Span } from "../plugin.ts";
2
+ import { overlapsAny, type SpanIndex } from "../compare/spans.ts";
3
+ import type { DurationUnit } from "./date-arithmetic.ts";
4
+
5
+ /** A word that names a period (週, 毎月, a week), where it is written beside the count, and the period's unit. */
6
+ export type PeriodWord = { readonly word: string; readonly position: "before" | "after"; readonly unit: DurationUnit };
7
+
8
+ /** The period words, and the named schedules in the document (週休2日制, 4週8休). */
9
+ export type PerPeriodWords = { readonly periods: readonly PeriodWord[]; readonly schedules: SpanIndex };
10
+
11
+ const UNIT_ORDER: readonly DurationUnit[] = ["day", "week", "month", "year"];
12
+
13
+ /** A number or a counter just before the period word: 1年3か月 and 3か月10日 are one length written in two units, not a count per year or month. */
14
+ const COUNTED = /[0-90-9〇一二三四五六七八九十百千かヵヶカケ箇個]$/u;
15
+
16
+ const endsWithPeriod = (before: string, word: string): boolean => before.endsWith(word) && !COUNTED.test(before.slice(0, before.length - word.length));
17
+
18
+ const isBeside = (period: PeriodWord, before: string, after: string): boolean =>
19
+ period.position === "before" ? endsWithPeriod(before, period.word) : after.startsWith(period.word);
20
+
21
+ /**
22
+ * A number with a unit of time that is not a length to add to a date: a count in each period (週3日、月10日、3 days a week) or a
23
+ * number inside the name of a work schedule (週休2日制の2日、4週8休の4週). A count is in a unit smaller than its period: 毎年1年間 is a
24
+ * year's length. before and after are the text next to the count, lower-cased.
25
+ */
26
+ export const isCountPerPeriod = (count: Span & { readonly unit: DurationUnit }, before: string, after: string, words: PerPeriodWords): boolean =>
27
+ overlapsAny(words.schedules, count) ||
28
+ words.periods.some((period) => UNIT_ORDER.indexOf(count.unit) < UNIT_ORDER.indexOf(period.unit) && isBeside(period, before, after));
@@ -6,7 +6,7 @@ import { loneNumeralSpans, nameNumeralSpans } from "./name-numeral.ts";
6
6
  import { placeholderSpans } from "./placeholder.ts";
7
7
  import { numeralWordSpans } from "./numeral-word.ts";
8
8
  import { seriesLabelSpans } from "./series-label.ts";
9
- import { oneOf } from "./acronym-name.ts";
9
+ import { nameSpansOf, oneOf } from "./acronym-name.ts";
10
10
 
11
11
  /**
12
12
  * 大文字の語が略語ではなく、決まった書き方の一部として読める所(3:30 PM、1pm ET、USD 1,000、Kansas City, MO 64108、Fort Lauderdale FL 33304)。
@@ -114,3 +114,32 @@ export const notAcronymSpansOf = (words: NotationWords): NotAcronymSpans => {
114
114
  ...numeralWordSpans(text),
115
115
  ];
116
116
  };
117
+
118
+ /**
119
+ * 略語として数えない範囲(書き方の範囲と、名前の中の範囲)を、言語パッケージの語彙表から組み立てる。wordsOf は語彙表の id から語を返す。
120
+ */
121
+ export const lexiconNotationOf = (wordsOf: (id: string) => string[]): NotAcronymSpans => {
122
+ const notation = notAcronymSpansOf({
123
+ meridiem: wordsOf("meridiem"),
124
+ timeZones: wordsOf("time-zone"),
125
+ currencies: wordsOf("currency-code"),
126
+ usStates: wordsOf("us-state-code"),
127
+ emphasis: wordsOf("emphasis-word"),
128
+ divisions: wordsOf("numbered-division"),
129
+ abbreviatedLabels: wordsOf("abbreviated-label"),
130
+ honorifics: wordsOf("honorific"),
131
+ titles: wordsOf("name-title"),
132
+ dateTimeUnits: wordsOf("date-time-unit"),
133
+ });
134
+ const names = nameSpansOf({
135
+ legalForms: wordsOf("legal-form"),
136
+ companyForms: wordsOf("company-form"),
137
+ determiners: wordsOf("name-determiner"),
138
+ citationSeries: wordsOf("citation-series"),
139
+ carriers: wordsOf("carrier-name"),
140
+ namePrefixes: wordsOf("name-prefix"),
141
+ streetSuffixes: wordsOf("street-suffix"),
142
+ capitalPhrases: wordsOf("capital-phrase"),
143
+ });
144
+ return (text) => [...notation(text), ...names(text)];
145
+ };