chaffjs 0.31.0 → 0.32.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 (1263) hide show
  1. package/README.ja.md +330 -0
  2. package/README.md +119 -257
  3. package/dist/company-kana-spelling.d.ts +31 -0
  4. package/dist/company-kana-spelling.d.ts.map +1 -0
  5. package/dist/company-kana-spelling.js +79 -0
  6. package/dist/company-kana-spelling.js.map +1 -0
  7. package/dist/company-names.d.ts +32 -1
  8. package/dist/company-names.d.ts.map +1 -1
  9. package/dist/company-names.js +129 -22
  10. package/dist/company-names.js.map +1 -1
  11. package/dist/contacts/table-rows.d.ts +7 -0
  12. package/dist/contacts/table-rows.d.ts.map +1 -0
  13. package/dist/contacts/table-rows.js +42 -0
  14. package/dist/contacts/table-rows.js.map +1 -0
  15. package/dist/derived/age-on-date.d.ts +53 -0
  16. package/dist/derived/age-on-date.d.ts.map +1 -0
  17. package/dist/derived/age-on-date.js +114 -0
  18. package/dist/derived/age-on-date.js.map +1 -0
  19. package/dist/derived/durations.d.ts +17 -2
  20. package/dist/derived/durations.d.ts.map +1 -1
  21. package/dist/derived/durations.js +61 -10
  22. package/dist/derived/durations.js.map +1 -1
  23. package/dist/derived/hours-and-minutes.d.ts +26 -0
  24. package/dist/derived/hours-and-minutes.d.ts.map +1 -0
  25. package/dist/derived/hours-and-minutes.js +24 -0
  26. package/dist/derived/hours-and-minutes.js.map +1 -0
  27. package/dist/derived/hyphenated-counts.d.ts +15 -0
  28. package/dist/derived/hyphenated-counts.d.ts.map +1 -0
  29. package/dist/derived/hyphenated-counts.js +31 -0
  30. package/dist/derived/hyphenated-counts.js.map +1 -0
  31. package/dist/derived/marked-dates.d.ts +15 -0
  32. package/dist/derived/marked-dates.d.ts.map +1 -0
  33. package/dist/derived/marked-dates.js +41 -0
  34. package/dist/derived/marked-dates.js.map +1 -0
  35. package/dist/derived/money-span.d.ts +9 -0
  36. package/dist/derived/money-span.d.ts.map +1 -0
  37. package/dist/derived/money-span.js +6 -0
  38. package/dist/derived/money-span.js.map +1 -0
  39. package/dist/derived/period-parts.d.ts +55 -0
  40. package/dist/derived/period-parts.d.ts.map +1 -0
  41. package/dist/derived/period-parts.js +283 -0
  42. package/dist/derived/period-parts.js.map +1 -0
  43. package/dist/derived/readable-date.d.ts +20 -0
  44. package/dist/derived/readable-date.d.ts.map +1 -0
  45. package/dist/derived/readable-date.js +50 -0
  46. package/dist/derived/readable-date.js.map +1 -0
  47. package/dist/derived/stays.d.ts +3 -1
  48. package/dist/derived/stays.d.ts.map +1 -1
  49. package/dist/derived/stays.js +3 -0
  50. package/dist/derived/stays.js.map +1 -1
  51. package/dist/derived/timesheet-hours.d.ts +27 -0
  52. package/dist/derived/timesheet-hours.d.ts.map +1 -0
  53. package/dist/derived/timesheet-hours.js +86 -0
  54. package/dist/derived/timesheet-hours.js.map +1 -0
  55. package/dist/derived/use-maximum.d.ts +27 -0
  56. package/dist/derived/use-maximum.d.ts.map +1 -0
  57. package/dist/derived/use-maximum.js +104 -0
  58. package/dist/derived/use-maximum.js.map +1 -0
  59. package/dist/derived/working-hours.d.ts +4 -5
  60. package/dist/derived/working-hours.d.ts.map +1 -1
  61. package/dist/detectors/annual-holidays-mismatch.d.ts +3 -0
  62. package/dist/detectors/annual-holidays-mismatch.d.ts.map +1 -0
  63. package/dist/detectors/annual-holidays-mismatch.js +29 -0
  64. package/dist/detectors/annual-holidays-mismatch.js.map +1 -0
  65. package/dist/detectors/annual-pay-mismatch.d.ts +3 -0
  66. package/dist/detectors/annual-pay-mismatch.d.ts.map +1 -0
  67. package/dist/detectors/annual-pay-mismatch.js +52 -0
  68. package/dist/detectors/annual-pay-mismatch.js.map +1 -0
  69. package/dist/detectors/blank-structure.d.ts +3 -1
  70. package/dist/detectors/blank-structure.d.ts.map +1 -1
  71. package/dist/detectors/blank-structure.js +45 -12
  72. package/dist/detectors/blank-structure.js.map +1 -1
  73. package/dist/detectors/bmi-mismatch.d.ts +3 -0
  74. package/dist/detectors/bmi-mismatch.d.ts.map +1 -0
  75. package/dist/detectors/bmi-mismatch.js +70 -0
  76. package/dist/detectors/bmi-mismatch.js.map +1 -0
  77. package/dist/detectors/change-rate.d.ts.map +1 -1
  78. package/dist/detectors/change-rate.js +24 -9
  79. package/dist/detectors/change-rate.js.map +1 -1
  80. package/dist/detectors/closing-balance-mismatch.d.ts +3 -0
  81. package/dist/detectors/closing-balance-mismatch.d.ts.map +1 -0
  82. package/dist/detectors/closing-balance-mismatch.js +42 -0
  83. package/dist/detectors/closing-balance-mismatch.js.map +1 -0
  84. package/dist/detectors/contact-variant.d.ts.map +1 -1
  85. package/dist/detectors/contact-variant.js +6 -2
  86. package/dist/detectors/contact-variant.js.map +1 -1
  87. package/dist/detectors/cumulative-below-current.d.ts +3 -0
  88. package/dist/detectors/cumulative-below-current.d.ts.map +1 -0
  89. package/dist/detectors/cumulative-below-current.js +25 -0
  90. package/dist/detectors/cumulative-below-current.js.map +1 -0
  91. package/dist/detectors/currency-column.d.ts +3 -0
  92. package/dist/detectors/currency-column.d.ts.map +1 -0
  93. package/dist/detectors/currency-column.js +32 -0
  94. package/dist/detectors/currency-column.js.map +1 -0
  95. package/dist/detectors/date-any-year.d.ts +24 -0
  96. package/dist/detectors/date-any-year.d.ts.map +1 -0
  97. package/dist/detectors/date-any-year.js +103 -0
  98. package/dist/detectors/date-any-year.js.map +1 -0
  99. package/dist/detectors/date-outside-period.d.ts.map +1 -1
  100. package/dist/detectors/date-outside-period.js +4 -10
  101. package/dist/detectors/date-outside-period.js.map +1 -1
  102. package/dist/detectors/date-stamp-order.d.ts.map +1 -1
  103. package/dist/detectors/date-stamp-order.js +2 -1
  104. package/dist/detectors/date-stamp-order.js.map +1 -1
  105. package/dist/detectors/date-year.d.ts +18 -6
  106. package/dist/detectors/date-year.d.ts.map +1 -1
  107. package/dist/detectors/date-year.js +39 -11
  108. package/dist/detectors/date-year.js.map +1 -1
  109. package/dist/detectors/deductible-exceeds-limit.d.ts +4 -0
  110. package/dist/detectors/deductible-exceeds-limit.d.ts.map +1 -0
  111. package/dist/detectors/deductible-exceeds-limit.js +46 -0
  112. package/dist/detectors/deductible-exceeds-limit.js.map +1 -0
  113. package/dist/detectors/defined-term-form.d.ts.map +1 -1
  114. package/dist/detectors/defined-term-form.js +6 -20
  115. package/dist/detectors/defined-term-form.js.map +1 -1
  116. package/dist/detectors/derived-numbers.d.ts +4 -3
  117. package/dist/detectors/derived-numbers.d.ts.map +1 -1
  118. package/dist/detectors/derived-numbers.js +43 -70
  119. package/dist/detectors/derived-numbers.js.map +1 -1
  120. package/dist/detectors/discount-rate.d.ts +3 -0
  121. package/dist/detectors/discount-rate.d.ts.map +1 -0
  122. package/dist/detectors/discount-rate.js +35 -0
  123. package/dist/detectors/discount-rate.js.map +1 -0
  124. package/dist/detectors/due-date.d.ts.map +1 -1
  125. package/dist/detectors/due-date.js +11 -4
  126. package/dist/detectors/due-date.js.map +1 -1
  127. package/dist/detectors/email-letter.d.ts +10 -2
  128. package/dist/detectors/email-letter.d.ts.map +1 -1
  129. package/dist/detectors/email-letter.js +24 -5
  130. package/dist/detectors/email-letter.js.map +1 -1
  131. package/dist/detectors/event-deadline.d.ts.map +1 -1
  132. package/dist/detectors/event-deadline.js +11 -2
  133. package/dist/detectors/event-deadline.js.map +1 -1
  134. package/dist/detectors/fact-consistency.d.ts.map +1 -1
  135. package/dist/detectors/fact-consistency.js +112 -5
  136. package/dist/detectors/fact-consistency.js.map +1 -1
  137. package/dist/detectors/gloss-year.d.ts +11 -0
  138. package/dist/detectors/gloss-year.d.ts.map +1 -0
  139. package/dist/detectors/gloss-year.js +14 -0
  140. package/dist/detectors/gloss-year.js.map +1 -0
  141. package/dist/detectors/gpa-mismatch.d.ts +3 -0
  142. package/dist/detectors/gpa-mismatch.d.ts.map +1 -0
  143. package/dist/detectors/gpa-mismatch.js +39 -0
  144. package/dist/detectors/gpa-mismatch.js.map +1 -0
  145. package/dist/detectors/impossible-date.d.ts.map +1 -1
  146. package/dist/detectors/impossible-date.js +22 -6
  147. package/dist/detectors/impossible-date.js.map +1 -1
  148. package/dist/detectors/installment-total-mismatch.d.ts +3 -0
  149. package/dist/detectors/installment-total-mismatch.d.ts.map +1 -0
  150. package/dist/detectors/installment-total-mismatch.js +49 -0
  151. package/dist/detectors/installment-total-mismatch.js.map +1 -0
  152. package/dist/detectors/interest.d.ts +3 -0
  153. package/dist/detectors/interest.d.ts.map +1 -0
  154. package/dist/detectors/interest.js +38 -0
  155. package/dist/detectors/interest.js.map +1 -0
  156. package/dist/detectors/lab-columns.d.ts +4 -0
  157. package/dist/detectors/lab-columns.d.ts.map +1 -0
  158. package/dist/detectors/lab-columns.js +3 -0
  159. package/dist/detectors/lab-columns.js.map +1 -0
  160. package/dist/detectors/labelled-age.d.ts +4 -0
  161. package/dist/detectors/labelled-age.d.ts.map +1 -0
  162. package/dist/detectors/labelled-age.js +110 -0
  163. package/dist/detectors/labelled-age.js.map +1 -0
  164. package/dist/detectors/line-amount.d.ts.map +1 -1
  165. package/dist/detectors/line-amount.js +45 -2
  166. package/dist/detectors/line-amount.js.map +1 -1
  167. package/dist/detectors/measured-facts.d.ts +1 -1
  168. package/dist/detectors/measured-facts.d.ts.map +1 -1
  169. package/dist/detectors/measured-facts.js.map +1 -1
  170. package/dist/detectors/meter-usage.d.ts +3 -0
  171. package/dist/detectors/meter-usage.d.ts.map +1 -0
  172. package/dist/detectors/meter-usage.js +37 -0
  173. package/dist/detectors/meter-usage.js.map +1 -0
  174. package/dist/detectors/name-field.d.ts +13 -0
  175. package/dist/detectors/name-field.d.ts.map +1 -0
  176. package/dist/detectors/name-field.js +38 -0
  177. package/dist/detectors/name-field.js.map +1 -0
  178. package/dist/detectors/name-variant.d.ts.map +1 -1
  179. package/dist/detectors/name-variant.js +128 -14
  180. package/dist/detectors/name-variant.js.map +1 -1
  181. package/dist/detectors/net-amount-mismatch.d.ts +10 -0
  182. package/dist/detectors/net-amount-mismatch.d.ts.map +1 -0
  183. package/dist/detectors/net-amount-mismatch.js +70 -0
  184. package/dist/detectors/net-amount-mismatch.js.map +1 -0
  185. package/dist/detectors/net-gross-weight.d.ts +3 -0
  186. package/dist/detectors/net-gross-weight.d.ts.map +1 -0
  187. package/dist/detectors/net-gross-weight.js +35 -0
  188. package/dist/detectors/net-gross-weight.js.map +1 -0
  189. package/dist/detectors/nominal-step.d.ts +3 -0
  190. package/dist/detectors/nominal-step.d.ts.map +1 -0
  191. package/dist/detectors/nominal-step.js +28 -0
  192. package/dist/detectors/nominal-step.js.map +1 -0
  193. package/dist/detectors/number-style.d.ts +2 -0
  194. package/dist/detectors/number-style.d.ts.map +1 -1
  195. package/dist/detectors/number-style.js +8 -2
  196. package/dist/detectors/number-style.js.map +1 -1
  197. package/dist/detectors/order-quantity.d.ts +10 -0
  198. package/dist/detectors/order-quantity.d.ts.map +1 -0
  199. package/dist/detectors/order-quantity.js +35 -0
  200. package/dist/detectors/order-quantity.js.map +1 -0
  201. package/dist/detectors/orthographic-variant.d.ts.map +1 -1
  202. package/dist/detectors/orthographic-variant.js +35 -10
  203. package/dist/detectors/orthographic-variant.js.map +1 -1
  204. package/dist/detectors/orthography.d.ts.map +1 -1
  205. package/dist/detectors/orthography.js +15 -7
  206. package/dist/detectors/orthography.js.map +1 -1
  207. package/dist/detectors/period-label-conflict.d.ts +4 -0
  208. package/dist/detectors/period-label-conflict.d.ts.map +1 -0
  209. package/dist/detectors/period-label-conflict.js +34 -0
  210. package/dist/detectors/period-label-conflict.js.map +1 -0
  211. package/dist/detectors/period-multiple-mismatch.d.ts +3 -0
  212. package/dist/detectors/period-multiple-mismatch.d.ts.map +1 -0
  213. package/dist/detectors/period-multiple-mismatch.js +36 -0
  214. package/dist/detectors/period-multiple-mismatch.js.map +1 -0
  215. package/dist/detectors/period-part.d.ts +4 -0
  216. package/dist/detectors/period-part.d.ts.map +1 -0
  217. package/dist/detectors/period-part.js +58 -0
  218. package/dist/detectors/period-part.js.map +1 -0
  219. package/dist/detectors/range-words.d.ts +5 -0
  220. package/dist/detectors/range-words.d.ts.map +1 -0
  221. package/dist/detectors/range-words.js +14 -0
  222. package/dist/detectors/range-words.js.map +1 -0
  223. package/dist/detectors/ratio-mismatch.d.ts +7 -0
  224. package/dist/detectors/ratio-mismatch.d.ts.map +1 -0
  225. package/dist/detectors/ratio-mismatch.js +89 -0
  226. package/dist/detectors/ratio-mismatch.js.map +1 -0
  227. package/dist/detectors/readable-dates.d.ts +9 -0
  228. package/dist/detectors/readable-dates.d.ts.map +1 -0
  229. package/dist/detectors/readable-dates.js +23 -0
  230. package/dist/detectors/readable-dates.js.map +1 -0
  231. package/dist/detectors/reference-flag.d.ts +3 -0
  232. package/dist/detectors/reference-flag.d.ts.map +1 -0
  233. package/dist/detectors/reference-flag.js +31 -0
  234. package/dist/detectors/reference-flag.js.map +1 -0
  235. package/dist/detectors/reference-number-repeated.d.ts +3 -0
  236. package/dist/detectors/reference-number-repeated.d.ts.map +1 -0
  237. package/dist/detectors/reference-number-repeated.js +22 -0
  238. package/dist/detectors/reference-number-repeated.js.map +1 -0
  239. package/dist/detectors/reference-number-variant.d.ts +3 -0
  240. package/dist/detectors/reference-number-variant.d.ts.map +1 -0
  241. package/dist/detectors/reference-number-variant.js +40 -0
  242. package/dist/detectors/reference-number-variant.js.map +1 -0
  243. package/dist/detectors/reference-unit.d.ts +3 -0
  244. package/dist/detectors/reference-unit.d.ts.map +1 -0
  245. package/dist/detectors/reference-unit.js +19 -0
  246. package/dist/detectors/reference-unit.js.map +1 -0
  247. package/dist/detectors/registry/annual-holidays-mismatch.d.ts +3 -0
  248. package/dist/detectors/registry/annual-holidays-mismatch.d.ts.map +1 -0
  249. package/dist/detectors/registry/annual-holidays-mismatch.js +3 -0
  250. package/dist/detectors/registry/annual-holidays-mismatch.js.map +1 -0
  251. package/dist/detectors/registry/annual-pay-mismatch.d.ts +3 -0
  252. package/dist/detectors/registry/annual-pay-mismatch.d.ts.map +1 -0
  253. package/dist/detectors/registry/annual-pay-mismatch.js +3 -0
  254. package/dist/detectors/registry/annual-pay-mismatch.js.map +1 -0
  255. package/dist/detectors/registry/backorder-mismatch.d.ts +3 -0
  256. package/dist/detectors/registry/backorder-mismatch.d.ts.map +1 -0
  257. package/dist/detectors/registry/backorder-mismatch.js +3 -0
  258. package/dist/detectors/registry/backorder-mismatch.js.map +1 -0
  259. package/dist/detectors/registry/bmi-mismatch.d.ts +3 -0
  260. package/dist/detectors/registry/bmi-mismatch.d.ts.map +1 -0
  261. package/dist/detectors/registry/bmi-mismatch.js +3 -0
  262. package/dist/detectors/registry/bmi-mismatch.js.map +1 -0
  263. package/dist/detectors/registry/closing-balance-mismatch.d.ts +3 -0
  264. package/dist/detectors/registry/closing-balance-mismatch.d.ts.map +1 -0
  265. package/dist/detectors/registry/closing-balance-mismatch.js +3 -0
  266. package/dist/detectors/registry/closing-balance-mismatch.js.map +1 -0
  267. package/dist/detectors/registry/cumulative-below-current.d.ts +3 -0
  268. package/dist/detectors/registry/cumulative-below-current.d.ts.map +1 -0
  269. package/dist/detectors/registry/cumulative-below-current.js +3 -0
  270. package/dist/detectors/registry/cumulative-below-current.js.map +1 -0
  271. package/dist/detectors/registry/currency-column-mix.d.ts +3 -0
  272. package/dist/detectors/registry/currency-column-mix.d.ts.map +1 -0
  273. package/dist/detectors/registry/currency-column-mix.js +3 -0
  274. package/dist/detectors/registry/currency-column-mix.js.map +1 -0
  275. package/dist/detectors/registry/deductible-exceeds-limit.d.ts +3 -0
  276. package/dist/detectors/registry/deductible-exceeds-limit.d.ts.map +1 -0
  277. package/dist/detectors/registry/deductible-exceeds-limit.js +3 -0
  278. package/dist/detectors/registry/deductible-exceeds-limit.js.map +1 -0
  279. package/dist/detectors/registry/delivered-over-ordered.d.ts +3 -0
  280. package/dist/detectors/registry/delivered-over-ordered.d.ts.map +1 -0
  281. package/dist/detectors/registry/delivered-over-ordered.js +3 -0
  282. package/dist/detectors/registry/delivered-over-ordered.js.map +1 -0
  283. package/dist/detectors/registry/discount-rate.d.ts +3 -0
  284. package/dist/detectors/registry/discount-rate.d.ts.map +1 -0
  285. package/dist/detectors/registry/discount-rate.js +3 -0
  286. package/dist/detectors/registry/discount-rate.js.map +1 -0
  287. package/dist/detectors/registry/elapsed-years-mismatch.js +1 -1
  288. package/dist/detectors/registry/elapsed-years-mismatch.js.map +1 -1
  289. package/dist/detectors/registry/gpa-mismatch.d.ts +3 -0
  290. package/dist/detectors/registry/gpa-mismatch.d.ts.map +1 -0
  291. package/dist/detectors/registry/gpa-mismatch.js +3 -0
  292. package/dist/detectors/registry/gpa-mismatch.js.map +1 -0
  293. package/dist/detectors/registry/installment-total-mismatch.d.ts +3 -0
  294. package/dist/detectors/registry/installment-total-mismatch.d.ts.map +1 -0
  295. package/dist/detectors/registry/installment-total-mismatch.js +3 -0
  296. package/dist/detectors/registry/installment-total-mismatch.js.map +1 -0
  297. package/dist/detectors/registry/interest.d.ts +3 -0
  298. package/dist/detectors/registry/interest.d.ts.map +1 -0
  299. package/dist/detectors/registry/interest.js +3 -0
  300. package/dist/detectors/registry/interest.js.map +1 -0
  301. package/dist/detectors/registry/meter-usage.d.ts +3 -0
  302. package/dist/detectors/registry/meter-usage.d.ts.map +1 -0
  303. package/dist/detectors/registry/meter-usage.js +3 -0
  304. package/dist/detectors/registry/meter-usage.js.map +1 -0
  305. package/dist/detectors/registry/net-amount-mismatch.d.ts +3 -0
  306. package/dist/detectors/registry/net-amount-mismatch.d.ts.map +1 -0
  307. package/dist/detectors/registry/net-amount-mismatch.js +3 -0
  308. package/dist/detectors/registry/net-amount-mismatch.js.map +1 -0
  309. package/dist/detectors/registry/net-over-gross.d.ts +3 -0
  310. package/dist/detectors/registry/net-over-gross.d.ts.map +1 -0
  311. package/dist/detectors/registry/net-over-gross.js +3 -0
  312. package/dist/detectors/registry/net-over-gross.js.map +1 -0
  313. package/dist/detectors/registry/period-label-conflict.d.ts +3 -0
  314. package/dist/detectors/registry/period-label-conflict.d.ts.map +1 -0
  315. package/dist/detectors/registry/period-label-conflict.js +3 -0
  316. package/dist/detectors/registry/period-label-conflict.js.map +1 -0
  317. package/dist/detectors/registry/period-multiple-mismatch.d.ts +3 -0
  318. package/dist/detectors/registry/period-multiple-mismatch.d.ts.map +1 -0
  319. package/dist/detectors/registry/period-multiple-mismatch.js +3 -0
  320. package/dist/detectors/registry/period-multiple-mismatch.js.map +1 -0
  321. package/dist/detectors/registry/period-part-exceeds-whole.d.ts +3 -0
  322. package/dist/detectors/registry/period-part-exceeds-whole.d.ts.map +1 -0
  323. package/dist/detectors/registry/period-part-exceeds-whole.js +3 -0
  324. package/dist/detectors/registry/period-part-exceeds-whole.js.map +1 -0
  325. package/dist/detectors/registry/product-exceeds-maximum.d.ts +3 -0
  326. package/dist/detectors/registry/product-exceeds-maximum.d.ts.map +1 -0
  327. package/dist/detectors/registry/product-exceeds-maximum.js +3 -0
  328. package/dist/detectors/registry/product-exceeds-maximum.js.map +1 -0
  329. package/dist/detectors/registry/ratio-mismatch.d.ts +3 -0
  330. package/dist/detectors/registry/ratio-mismatch.d.ts.map +1 -0
  331. package/dist/detectors/registry/ratio-mismatch.js +3 -0
  332. package/dist/detectors/registry/ratio-mismatch.js.map +1 -0
  333. package/dist/detectors/registry/reference-flag-mismatch.d.ts +3 -0
  334. package/dist/detectors/registry/reference-flag-mismatch.d.ts.map +1 -0
  335. package/dist/detectors/registry/reference-flag-mismatch.js +3 -0
  336. package/dist/detectors/registry/reference-flag-mismatch.js.map +1 -0
  337. package/dist/detectors/registry/reference-number-repeated.d.ts +3 -0
  338. package/dist/detectors/registry/reference-number-repeated.d.ts.map +1 -0
  339. package/dist/detectors/registry/reference-number-repeated.js +3 -0
  340. package/dist/detectors/registry/reference-number-repeated.js.map +1 -0
  341. package/dist/detectors/registry/reference-number-variant.d.ts +3 -0
  342. package/dist/detectors/registry/reference-number-variant.d.ts.map +1 -0
  343. package/dist/detectors/registry/reference-number-variant.js +3 -0
  344. package/dist/detectors/registry/reference-number-variant.js.map +1 -0
  345. package/dist/detectors/registry/reference-unit.d.ts +3 -0
  346. package/dist/detectors/registry/reference-unit.d.ts.map +1 -0
  347. package/dist/detectors/registry/reference-unit.js +3 -0
  348. package/dist/detectors/registry/reference-unit.js.map +1 -0
  349. package/dist/detectors/registry/revision-direction.d.ts +3 -0
  350. package/dist/detectors/registry/revision-direction.d.ts.map +1 -0
  351. package/dist/detectors/registry/revision-direction.js +3 -0
  352. package/dist/detectors/registry/revision-direction.js.map +1 -0
  353. package/dist/detectors/registry/running-balance.d.ts +3 -0
  354. package/dist/detectors/registry/running-balance.d.ts.map +1 -0
  355. package/dist/detectors/registry/running-balance.js +3 -0
  356. package/dist/detectors/registry/running-balance.js.map +1 -0
  357. package/dist/detectors/registry/serial-range.d.ts +3 -0
  358. package/dist/detectors/registry/serial-range.d.ts.map +1 -0
  359. package/dist/detectors/registry/serial-range.js +3 -0
  360. package/dist/detectors/registry/serial-range.js.map +1 -0
  361. package/dist/detectors/registry/share-amount.d.ts +3 -0
  362. package/dist/detectors/registry/share-amount.d.ts.map +1 -0
  363. package/dist/detectors/registry/share-amount.js +3 -0
  364. package/dist/detectors/registry/share-amount.js.map +1 -0
  365. package/dist/detectors/registry/table-unit-mix.d.ts +3 -0
  366. package/dist/detectors/registry/table-unit-mix.d.ts.map +1 -0
  367. package/dist/detectors/registry/table-unit-mix.js +3 -0
  368. package/dist/detectors/registry/table-unit-mix.js.map +1 -0
  369. package/dist/detectors/registry/tier-threshold.d.ts +3 -0
  370. package/dist/detectors/registry/tier-threshold.d.ts.map +1 -0
  371. package/dist/detectors/registry/tier-threshold.js +3 -0
  372. package/dist/detectors/registry/tier-threshold.js.map +1 -0
  373. package/dist/detectors/registry/variance-mismatch.d.ts +3 -0
  374. package/dist/detectors/registry/variance-mismatch.d.ts.map +1 -0
  375. package/dist/detectors/registry/variance-mismatch.js +3 -0
  376. package/dist/detectors/registry/variance-mismatch.js.map +1 -0
  377. package/dist/detectors/relative-dates.d.ts.map +1 -1
  378. package/dist/detectors/relative-dates.js +2 -1
  379. package/dist/detectors/relative-dates.js.map +1 -1
  380. package/dist/detectors/relative-day-words.d.ts.map +1 -1
  381. package/dist/detectors/relative-day-words.js +2 -1
  382. package/dist/detectors/relative-day-words.js.map +1 -1
  383. package/dist/detectors/rent-multiple-mismatch.d.ts.map +1 -1
  384. package/dist/detectors/rent-multiple-mismatch.js.map +1 -1
  385. package/dist/detectors/request-owner.d.ts +3 -1
  386. package/dist/detectors/request-owner.d.ts.map +1 -1
  387. package/dist/detectors/request-owner.js +5 -2
  388. package/dist/detectors/request-owner.js.map +1 -1
  389. package/dist/detectors/revision-direction.d.ts +3 -0
  390. package/dist/detectors/revision-direction.d.ts.map +1 -0
  391. package/dist/detectors/revision-direction.js +32 -0
  392. package/dist/detectors/revision-direction.js.map +1 -0
  393. package/dist/detectors/row-sentence-amounts.d.ts +5 -0
  394. package/dist/detectors/row-sentence-amounts.d.ts.map +1 -0
  395. package/dist/detectors/row-sentence-amounts.js +71 -0
  396. package/dist/detectors/row-sentence-amounts.js.map +1 -0
  397. package/dist/detectors/running-balance.d.ts +3 -0
  398. package/dist/detectors/running-balance.d.ts.map +1 -0
  399. package/dist/detectors/running-balance.js +26 -0
  400. package/dist/detectors/running-balance.js.map +1 -0
  401. package/dist/detectors/scaled-quantity.js +1 -1
  402. package/dist/detectors/scaled-quantity.js.map +1 -1
  403. package/dist/detectors/serial-range.d.ts +3 -0
  404. package/dist/detectors/serial-range.d.ts.map +1 -0
  405. package/dist/detectors/serial-range.js +29 -0
  406. package/dist/detectors/serial-range.js.map +1 -0
  407. package/dist/detectors/share-amount.d.ts +3 -0
  408. package/dist/detectors/share-amount.d.ts.map +1 -0
  409. package/dist/detectors/share-amount.js +45 -0
  410. package/dist/detectors/share-amount.js.map +1 -0
  411. package/dist/detectors/structure-tree.d.ts.map +1 -1
  412. package/dist/detectors/structure-tree.js +42 -10
  413. package/dist/detectors/structure-tree.js.map +1 -1
  414. package/dist/detectors/table-scale.d.ts +3 -0
  415. package/dist/detectors/table-scale.d.ts.map +1 -0
  416. package/dist/detectors/table-scale.js +32 -0
  417. package/dist/detectors/table-scale.js.map +1 -0
  418. package/dist/detectors/tax-amount.d.ts.map +1 -1
  419. package/dist/detectors/tax-amount.js +34 -10
  420. package/dist/detectors/tax-amount.js.map +1 -1
  421. package/dist/detectors/technical-docs.d.ts +1 -1
  422. package/dist/detectors/technical-docs.d.ts.map +1 -1
  423. package/dist/detectors/technical-docs.js +3 -2
  424. package/dist/detectors/technical-docs.js.map +1 -1
  425. package/dist/detectors/tier-threshold.d.ts +3 -0
  426. package/dist/detectors/tier-threshold.d.ts.map +1 -0
  427. package/dist/detectors/tier-threshold.js +86 -0
  428. package/dist/detectors/tier-threshold.js.map +1 -0
  429. package/dist/detectors/time-order.d.ts +1 -0
  430. package/dist/detectors/time-order.d.ts.map +1 -1
  431. package/dist/detectors/time-order.js +43 -13
  432. package/dist/detectors/time-order.js.map +1 -1
  433. package/dist/detectors/use-maximum.d.ts +3 -0
  434. package/dist/detectors/use-maximum.d.ts.map +1 -0
  435. package/dist/detectors/use-maximum.js +32 -0
  436. package/dist/detectors/use-maximum.js.map +1 -0
  437. package/dist/detectors/variance.d.ts +3 -0
  438. package/dist/detectors/variance.d.ts.map +1 -0
  439. package/dist/detectors/variance.js +28 -0
  440. package/dist/detectors/variance.js.map +1 -0
  441. package/dist/detectors/whole-count-findings.d.ts +4 -0
  442. package/dist/detectors/whole-count-findings.d.ts.map +1 -0
  443. package/dist/detectors/whole-count-findings.js +38 -0
  444. package/dist/detectors/whole-count-findings.js.map +1 -0
  445. package/dist/detectors/working-hours-findings.d.ts +9 -0
  446. package/dist/detectors/working-hours-findings.d.ts.map +1 -0
  447. package/dist/detectors/working-hours-findings.js +79 -0
  448. package/dist/detectors/working-hours-findings.js.map +1 -0
  449. package/dist/facts/age-values.d.ts +22 -0
  450. package/dist/facts/age-values.d.ts.map +1 -0
  451. package/dist/facts/age-values.js +76 -0
  452. package/dist/facts/age-values.js.map +1 -0
  453. package/dist/facts/cell-keys.d.ts +12 -0
  454. package/dist/facts/cell-keys.d.ts.map +1 -0
  455. package/dist/facts/cell-keys.js +19 -0
  456. package/dist/facts/cell-keys.js.map +1 -0
  457. package/dist/facts/count-labels.d.ts +15 -0
  458. package/dist/facts/count-labels.d.ts.map +1 -0
  459. package/dist/facts/count-labels.js +19 -0
  460. package/dist/facts/count-labels.js.map +1 -0
  461. package/dist/facts/document-terms.d.ts +43 -0
  462. package/dist/facts/document-terms.d.ts.map +1 -0
  463. package/dist/facts/document-terms.js +74 -0
  464. package/dist/facts/document-terms.js.map +1 -0
  465. package/dist/facts/duration-scale.d.ts +11 -0
  466. package/dist/facts/duration-scale.d.ts.map +1 -0
  467. package/dist/facts/duration-scale.js +14 -0
  468. package/dist/facts/duration-scale.js.map +1 -0
  469. package/dist/facts/duration-values.d.ts +15 -0
  470. package/dist/facts/duration-values.d.ts.map +1 -0
  471. package/dist/facts/duration-values.js +29 -0
  472. package/dist/facts/duration-values.js.map +1 -0
  473. package/dist/facts/fact-values.d.ts +9 -1
  474. package/dist/facts/fact-values.d.ts.map +1 -1
  475. package/dist/facts/fact-values.js +19 -6
  476. package/dist/facts/fact-values.js.map +1 -1
  477. package/dist/facts/labelled-facts.d.ts +15 -1
  478. package/dist/facts/labelled-facts.d.ts.map +1 -1
  479. package/dist/facts/labelled-facts.js +51 -8
  480. package/dist/facts/labelled-facts.js.map +1 -1
  481. package/dist/facts/measure-units.d.ts.map +1 -1
  482. package/dist/facts/measure-units.js +23 -8
  483. package/dist/facts/measure-units.js.map +1 -1
  484. package/dist/facts/measures.js +11 -9
  485. package/dist/facts/measures.js.map +1 -1
  486. package/dist/facts/qualified-labels.d.ts +28 -0
  487. package/dist/facts/qualified-labels.d.ts.map +1 -0
  488. package/dist/facts/qualified-labels.js +96 -0
  489. package/dist/facts/qualified-labels.js.map +1 -0
  490. package/dist/facts/rate-values.d.ts +40 -0
  491. package/dist/facts/rate-values.d.ts.map +1 -0
  492. package/dist/facts/rate-values.js +68 -0
  493. package/dist/facts/rate-values.js.map +1 -0
  494. package/dist/facts/row-sentence-amounts.d.ts +51 -0
  495. package/dist/facts/row-sentence-amounts.d.ts.map +1 -0
  496. package/dist/facts/row-sentence-amounts.js +71 -0
  497. package/dist/facts/row-sentence-amounts.js.map +1 -0
  498. package/dist/facts/superscript-power.d.ts +3 -0
  499. package/dist/facts/superscript-power.d.ts.map +1 -0
  500. package/dist/facts/superscript-power.js +5 -0
  501. package/dist/facts/superscript-power.js.map +1 -0
  502. package/dist/facts/table-facts.d.ts +18 -2
  503. package/dist/facts/table-facts.d.ts.map +1 -1
  504. package/dist/facts/table-facts.js +16 -6
  505. package/dist/facts/table-facts.js.map +1 -1
  506. package/dist/facts/term-values.d.ts +34 -0
  507. package/dist/facts/term-values.d.ts.map +1 -0
  508. package/dist/facts/term-values.js +195 -0
  509. package/dist/facts/term-values.js.map +1 -0
  510. package/dist/facts/unit-word.d.ts +5 -0
  511. package/dist/facts/unit-word.d.ts.map +1 -1
  512. package/dist/facts/unit-word.js +9 -0
  513. package/dist/facts/unit-word.js.map +1 -1
  514. package/dist/facts/verb-quantity-facts.d.ts +22 -0
  515. package/dist/facts/verb-quantity-facts.d.ts.map +1 -0
  516. package/dist/facts/verb-quantity-facts.js +58 -0
  517. package/dist/facts/verb-quantity-facts.js.map +1 -0
  518. package/dist/facts/whole-counts.d.ts +58 -0
  519. package/dist/facts/whole-counts.d.ts.map +1 -0
  520. package/dist/facts/whole-counts.js +118 -0
  521. package/dist/facts/whole-counts.js.map +1 -0
  522. package/dist/name-char-reading.d.ts +16 -0
  523. package/dist/name-char-reading.d.ts.map +1 -0
  524. package/dist/name-char-reading.js +18 -0
  525. package/dist/name-char-reading.js.map +1 -0
  526. package/dist/name-line-block.d.ts +6 -0
  527. package/dist/name-line-block.d.ts.map +1 -0
  528. package/dist/name-line-block.js +35 -0
  529. package/dist/name-line-block.js.map +1 -0
  530. package/dist/name-lookalike-chars.d.ts +16 -0
  531. package/dist/name-lookalike-chars.d.ts.map +1 -0
  532. package/dist/name-lookalike-chars.js +41 -0
  533. package/dist/name-lookalike-chars.js.map +1 -0
  534. package/dist/name-neighbours.d.ts +7 -0
  535. package/dist/name-neighbours.d.ts.map +1 -0
  536. package/dist/name-neighbours.js +55 -0
  537. package/dist/name-neighbours.js.map +1 -0
  538. package/dist/name-ordinary-word.d.ts +13 -0
  539. package/dist/name-ordinary-word.d.ts.map +1 -0
  540. package/dist/name-ordinary-word.js +54 -0
  541. package/dist/name-ordinary-word.js.map +1 -0
  542. package/dist/name-person.d.ts +9 -0
  543. package/dist/name-person.d.ts.map +1 -0
  544. package/dist/name-person.js +25 -0
  545. package/dist/name-person.js.map +1 -0
  546. package/dist/name-separator.d.ts +14 -0
  547. package/dist/name-separator.d.ts.map +1 -0
  548. package/dist/name-separator.js +33 -0
  549. package/dist/name-separator.js.map +1 -0
  550. package/dist/name-variants.d.ts +8 -8
  551. package/dist/name-variants.d.ts.map +1 -1
  552. package/dist/name-variants.js +28 -81
  553. package/dist/name-variants.js.map +1 -1
  554. package/dist/name-weight.d.ts +10 -0
  555. package/dist/name-weight.d.ts.map +1 -0
  556. package/dist/name-weight.js +7 -0
  557. package/dist/name-weight.js.map +1 -0
  558. package/dist/person-field.d.ts +6 -0
  559. package/dist/person-field.d.ts.map +1 -0
  560. package/dist/person-field.js +40 -0
  561. package/dist/person-field.js.map +1 -0
  562. package/dist/person-full-name.d.ts +12 -0
  563. package/dist/person-full-name.d.ts.map +1 -0
  564. package/dist/person-full-name.js +52 -0
  565. package/dist/person-full-name.js.map +1 -0
  566. package/dist/phone-numbers.d.ts +23 -3
  567. package/dist/phone-numbers.d.ts.map +1 -1
  568. package/dist/phone-numbers.js +49 -21
  569. package/dist/phone-numbers.js.map +1 -1
  570. package/dist/plugin.d.ts +2 -0
  571. package/dist/plugin.d.ts.map +1 -1
  572. package/dist/product-names.d.ts +33 -0
  573. package/dist/product-names.d.ts.map +1 -0
  574. package/dist/product-names.js +74 -0
  575. package/dist/product-names.js.map +1 -0
  576. package/dist/reference-numbers.d.ts +26 -0
  577. package/dist/reference-numbers.d.ts.map +1 -0
  578. package/dist/reference-numbers.js +43 -0
  579. package/dist/reference-numbers.js.map +1 -0
  580. package/dist/spaced-person-name.d.ts +17 -0
  581. package/dist/spaced-person-name.d.ts.map +1 -0
  582. package/dist/spaced-person-name.js +82 -0
  583. package/dist/spaced-person-name.js.map +1 -0
  584. package/dist/spacing-code.d.ts +1 -0
  585. package/dist/spacing-code.d.ts.map +1 -1
  586. package/dist/spacing-code.js +15 -1
  587. package/dist/spacing-code.js.map +1 -1
  588. package/dist/structure/annual-holidays.d.ts +56 -0
  589. package/dist/structure/annual-holidays.d.ts.map +1 -0
  590. package/dist/structure/annual-holidays.js +159 -0
  591. package/dist/structure/annual-holidays.js.map +1 -0
  592. package/dist/structure/annual-pay.d.ts +97 -0
  593. package/dist/structure/annual-pay.d.ts.map +1 -0
  594. package/dist/structure/annual-pay.js +236 -0
  595. package/dist/structure/annual-pay.js.map +1 -0
  596. package/dist/structure/bmi.d.ts +63 -0
  597. package/dist/structure/bmi.d.ts.map +1 -0
  598. package/dist/structure/bmi.js +106 -0
  599. package/dist/structure/bmi.js.map +1 -0
  600. package/dist/structure/change-rate-table.d.ts +46 -0
  601. package/dist/structure/change-rate-table.d.ts.map +1 -0
  602. package/dist/structure/change-rate-table.js +110 -0
  603. package/dist/structure/change-rate-table.js.map +1 -0
  604. package/dist/structure/change-rate.d.ts +13 -1
  605. package/dist/structure/change-rate.d.ts.map +1 -1
  606. package/dist/structure/change-rate.js +51 -19
  607. package/dist/structure/change-rate.js.map +1 -1
  608. package/dist/structure/closing-balance.d.ts +24 -0
  609. package/dist/structure/closing-balance.d.ts.map +1 -0
  610. package/dist/structure/closing-balance.js +79 -0
  611. package/dist/structure/closing-balance.js.map +1 -0
  612. package/dist/structure/column-date-order.d.ts +5 -0
  613. package/dist/structure/column-date-order.d.ts.map +1 -0
  614. package/dist/structure/column-date-order.js +57 -0
  615. package/dist/structure/column-date-order.js.map +1 -0
  616. package/dist/structure/compound-hours.d.ts +5 -0
  617. package/dist/structure/compound-hours.d.ts.map +1 -0
  618. package/dist/structure/compound-hours.js +45 -0
  619. package/dist/structure/compound-hours.js.map +1 -0
  620. package/dist/structure/cumulative-below-current.d.ts +21 -0
  621. package/dist/structure/cumulative-below-current.d.ts.map +1 -0
  622. package/dist/structure/cumulative-below-current.js +48 -0
  623. package/dist/structure/cumulative-below-current.js.map +1 -0
  624. package/dist/structure/currency-column.d.ts +21 -0
  625. package/dist/structure/currency-column.d.ts.map +1 -0
  626. package/dist/structure/currency-column.js +74 -0
  627. package/dist/structure/currency-column.js.map +1 -0
  628. package/dist/structure/date-deadline-mark.d.ts +15 -0
  629. package/dist/structure/date-deadline-mark.d.ts.map +1 -0
  630. package/dist/structure/date-deadline-mark.js +22 -0
  631. package/dist/structure/date-deadline-mark.js.map +1 -0
  632. package/dist/structure/date-outside-period.d.ts +5 -1
  633. package/dist/structure/date-outside-period.d.ts.map +1 -1
  634. package/dist/structure/date-outside-period.js +13 -9
  635. package/dist/structure/date-outside-period.js.map +1 -1
  636. package/dist/structure/date-range.d.ts +2 -1
  637. package/dist/structure/date-range.d.ts.map +1 -1
  638. package/dist/structure/date-range.js +4 -6
  639. package/dist/structure/date-range.js.map +1 -1
  640. package/dist/structure/deadline-after-event.d.ts +35 -2
  641. package/dist/structure/deadline-after-event.d.ts.map +1 -1
  642. package/dist/structure/deadline-after-event.js +77 -6
  643. package/dist/structure/deadline-after-event.js.map +1 -1
  644. package/dist/structure/deductible-limit.d.ts +69 -0
  645. package/dist/structure/deductible-limit.d.ts.map +1 -0
  646. package/dist/structure/deductible-limit.js +191 -0
  647. package/dist/structure/deductible-limit.js.map +1 -0
  648. package/dist/structure/discount-rate.d.ts +35 -0
  649. package/dist/structure/discount-rate.d.ts.map +1 -0
  650. package/dist/structure/discount-rate.js +172 -0
  651. package/dist/structure/discount-rate.js.map +1 -0
  652. package/dist/structure/generic-role.d.ts +2 -0
  653. package/dist/structure/generic-role.d.ts.map +1 -0
  654. package/dist/structure/generic-role.js +8 -0
  655. package/dist/structure/generic-role.js.map +1 -0
  656. package/dist/structure/gpa.d.ts +74 -0
  657. package/dist/structure/gpa.d.ts.map +1 -0
  658. package/dist/structure/gpa.js +170 -0
  659. package/dist/structure/gpa.js.map +1 -0
  660. package/dist/structure/installment-total.d.ts +110 -0
  661. package/dist/structure/installment-total.d.ts.map +1 -0
  662. package/dist/structure/installment-total.js +224 -0
  663. package/dist/structure/installment-total.js.map +1 -0
  664. package/dist/structure/interest.d.ts +22 -0
  665. package/dist/structure/interest.d.ts.map +1 -0
  666. package/dist/structure/interest.js +107 -0
  667. package/dist/structure/interest.js.map +1 -0
  668. package/dist/structure/key-value-row.d.ts +14 -0
  669. package/dist/structure/key-value-row.d.ts.map +1 -0
  670. package/dist/structure/key-value-row.js +38 -0
  671. package/dist/structure/key-value-row.js.map +1 -0
  672. package/dist/structure/lab-columns.d.ts +12 -0
  673. package/dist/structure/lab-columns.d.ts.map +1 -0
  674. package/dist/structure/lab-columns.js +11 -0
  675. package/dist/structure/lab-columns.js.map +1 -0
  676. package/dist/structure/labelled-date-order.d.ts +33 -16
  677. package/dist/structure/labelled-date-order.d.ts.map +1 -1
  678. package/dist/structure/labelled-date-order.js +38 -30
  679. package/dist/structure/labelled-date-order.js.map +1 -1
  680. package/dist/structure/labelled-order.d.ts +59 -0
  681. package/dist/structure/labelled-order.d.ts.map +1 -0
  682. package/dist/structure/labelled-order.js +65 -0
  683. package/dist/structure/labelled-order.js.map +1 -0
  684. package/dist/structure/labelled-time-order.d.ts +17 -0
  685. package/dist/structure/labelled-time-order.d.ts.map +1 -0
  686. package/dist/structure/labelled-time-order.js +79 -0
  687. package/dist/structure/labelled-time-order.js.map +1 -0
  688. package/dist/structure/line-amount-label.d.ts +31 -0
  689. package/dist/structure/line-amount-label.d.ts.map +1 -0
  690. package/dist/structure/line-amount-label.js +77 -0
  691. package/dist/structure/line-amount-label.js.map +1 -0
  692. package/dist/structure/line-amount-rate.d.ts +47 -0
  693. package/dist/structure/line-amount-rate.d.ts.map +1 -0
  694. package/dist/structure/line-amount-rate.js +141 -0
  695. package/dist/structure/line-amount-rate.js.map +1 -0
  696. package/dist/structure/line-amount-unit.d.ts +7 -0
  697. package/dist/structure/line-amount-unit.d.ts.map +1 -1
  698. package/dist/structure/line-amount-unit.js +11 -0
  699. package/dist/structure/line-amount-unit.js.map +1 -1
  700. package/dist/structure/line-amount.d.ts +33 -7
  701. package/dist/structure/line-amount.d.ts.map +1 -1
  702. package/dist/structure/line-amount.js +152 -42
  703. package/dist/structure/line-amount.js.map +1 -1
  704. package/dist/structure/meter-usage-read.d.ts +21 -0
  705. package/dist/structure/meter-usage-read.d.ts.map +1 -0
  706. package/dist/structure/meter-usage-read.js +116 -0
  707. package/dist/structure/meter-usage-read.js.map +1 -0
  708. package/dist/structure/meter-usage.d.ts +62 -0
  709. package/dist/structure/meter-usage.d.ts.map +1 -0
  710. package/dist/structure/meter-usage.js +157 -0
  711. package/dist/structure/meter-usage.js.map +1 -0
  712. package/dist/structure/net-amount.d.ts +81 -0
  713. package/dist/structure/net-amount.d.ts.map +1 -0
  714. package/dist/structure/net-amount.js +161 -0
  715. package/dist/structure/net-amount.js.map +1 -0
  716. package/dist/structure/net-gross-weight.d.ts +30 -0
  717. package/dist/structure/net-gross-weight.d.ts.map +1 -0
  718. package/dist/structure/net-gross-weight.js +79 -0
  719. package/dist/structure/net-gross-weight.js.map +1 -0
  720. package/dist/structure/order-quantity.d.ts +38 -0
  721. package/dist/structure/order-quantity.d.ts.map +1 -0
  722. package/dist/structure/order-quantity.js +104 -0
  723. package/dist/structure/order-quantity.js.map +1 -0
  724. package/dist/structure/party-role.d.ts.map +1 -1
  725. package/dist/structure/party-role.js +4 -1
  726. package/dist/structure/party-role.js.map +1 -1
  727. package/dist/structure/percent-sum.d.ts +2 -0
  728. package/dist/structure/percent-sum.d.ts.map +1 -1
  729. package/dist/structure/percent-sum.js +2 -0
  730. package/dist/structure/percent-sum.js.map +1 -1
  731. package/dist/structure/period-label-conflict.d.ts +52 -0
  732. package/dist/structure/period-label-conflict.d.ts.map +1 -0
  733. package/dist/structure/period-label-conflict.js +105 -0
  734. package/dist/structure/period-label-conflict.js.map +1 -0
  735. package/dist/structure/period-labels.d.ts +36 -0
  736. package/dist/structure/period-labels.d.ts.map +1 -0
  737. package/dist/structure/period-labels.js +86 -0
  738. package/dist/structure/period-labels.js.map +1 -0
  739. package/dist/structure/period-multiple.d.ts +46 -0
  740. package/dist/structure/period-multiple.d.ts.map +1 -0
  741. package/dist/structure/period-multiple.js +123 -0
  742. package/dist/structure/period-multiple.js.map +1 -0
  743. package/dist/structure/quantity-range.d.ts.map +1 -1
  744. package/dist/structure/quantity-range.js +1 -5
  745. package/dist/structure/quantity-range.js.map +1 -1
  746. package/dist/structure/range-bands.d.ts +2 -0
  747. package/dist/structure/range-bands.d.ts.map +1 -1
  748. package/dist/structure/range-bands.js +1 -1
  749. package/dist/structure/range-bands.js.map +1 -1
  750. package/dist/structure/range-years.d.ts +18 -0
  751. package/dist/structure/range-years.d.ts.map +1 -0
  752. package/dist/structure/range-years.js +60 -0
  753. package/dist/structure/range-years.js.map +1 -0
  754. package/dist/structure/ratio.d.ts +136 -0
  755. package/dist/structure/ratio.d.ts.map +1 -0
  756. package/dist/structure/ratio.js +214 -0
  757. package/dist/structure/ratio.js.map +1 -0
  758. package/dist/structure/reference-flags.d.ts +55 -0
  759. package/dist/structure/reference-flags.d.ts.map +1 -0
  760. package/dist/structure/reference-flags.js +116 -0
  761. package/dist/structure/reference-flags.js.map +1 -0
  762. package/dist/structure/reference-number-repeated.d.ts +12 -0
  763. package/dist/structure/reference-number-repeated.d.ts.map +1 -0
  764. package/dist/structure/reference-number-repeated.js +43 -0
  765. package/dist/structure/reference-number-repeated.js.map +1 -0
  766. package/dist/structure/reference-unit.d.ts +24 -0
  767. package/dist/structure/reference-unit.d.ts.map +1 -0
  768. package/dist/structure/reference-unit.js +80 -0
  769. package/dist/structure/reference-unit.js.map +1 -0
  770. package/dist/structure/rent-multiple.d.ts +2 -22
  771. package/dist/structure/rent-multiple.d.ts.map +1 -1
  772. package/dist/structure/rent-multiple.js +2 -49
  773. package/dist/structure/rent-multiple.js.map +1 -1
  774. package/dist/structure/revision-direction.d.ts +51 -0
  775. package/dist/structure/revision-direction.d.ts.map +1 -0
  776. package/dist/structure/revision-direction.js +163 -0
  777. package/dist/structure/revision-direction.js.map +1 -0
  778. package/dist/structure/running-balance.d.ts +36 -0
  779. package/dist/structure/running-balance.d.ts.map +1 -0
  780. package/dist/structure/running-balance.js +126 -0
  781. package/dist/structure/running-balance.js.map +1 -0
  782. package/dist/structure/scaled-quantities.d.ts +1 -1
  783. package/dist/structure/scaled-quantities.d.ts.map +1 -1
  784. package/dist/structure/scaled-quantities.js +23 -6
  785. package/dist/structure/scaled-quantities.js.map +1 -1
  786. package/dist/structure/serial-range.d.ts +9 -0
  787. package/dist/structure/serial-range.d.ts.map +1 -0
  788. package/dist/structure/serial-range.js +41 -0
  789. package/dist/structure/serial-range.js.map +1 -0
  790. package/dist/structure/share-amount.d.ts +55 -0
  791. package/dist/structure/share-amount.d.ts.map +1 -0
  792. package/dist/structure/share-amount.js +162 -0
  793. package/dist/structure/share-amount.js.map +1 -0
  794. package/dist/structure/shift-times.d.ts +32 -0
  795. package/dist/structure/shift-times.d.ts.map +1 -0
  796. package/dist/structure/shift-times.js +112 -0
  797. package/dist/structure/shift-times.js.map +1 -0
  798. package/dist/structure/span-label.d.ts +3 -0
  799. package/dist/structure/span-label.d.ts.map +1 -0
  800. package/dist/structure/span-label.js +27 -0
  801. package/dist/structure/span-label.js.map +1 -0
  802. package/dist/structure/stated-multiple.d.ts +39 -0
  803. package/dist/structure/stated-multiple.d.ts.map +1 -0
  804. package/dist/structure/stated-multiple.js +49 -0
  805. package/dist/structure/stated-multiple.js.map +1 -0
  806. package/dist/structure/stated-period.d.ts +3 -2
  807. package/dist/structure/stated-period.d.ts.map +1 -1
  808. package/dist/structure/stated-period.js +17 -11
  809. package/dist/structure/stated-period.js.map +1 -1
  810. package/dist/structure/table-scale.d.ts +45 -0
  811. package/dist/structure/table-scale.d.ts.map +1 -0
  812. package/dist/structure/table-scale.js +188 -0
  813. package/dist/structure/table-scale.js.map +1 -0
  814. package/dist/structure/tax-price.d.ts +29 -0
  815. package/dist/structure/tax-price.d.ts.map +1 -0
  816. package/dist/structure/tax-price.js +112 -0
  817. package/dist/structure/tax-price.js.map +1 -0
  818. package/dist/structure/tax.d.ts +2 -0
  819. package/dist/structure/tax.d.ts.map +1 -1
  820. package/dist/structure/tax.js +46 -23
  821. package/dist/structure/tax.js.map +1 -1
  822. package/dist/structure/tier-threshold.d.ts +65 -0
  823. package/dist/structure/tier-threshold.d.ts.map +1 -0
  824. package/dist/structure/tier-threshold.js +170 -0
  825. package/dist/structure/tier-threshold.js.map +1 -0
  826. package/dist/structure/time-range.d.ts +2 -0
  827. package/dist/structure/time-range.d.ts.map +1 -1
  828. package/dist/structure/time-range.js +7 -2
  829. package/dist/structure/time-range.js.map +1 -1
  830. package/dist/structure/total-line.d.ts +34 -2
  831. package/dist/structure/total-line.d.ts.map +1 -1
  832. package/dist/structure/total-line.js +124 -3
  833. package/dist/structure/total-line.js.map +1 -1
  834. package/dist/structure/total-row-blank.d.ts +10 -0
  835. package/dist/structure/total-row-blank.d.ts.map +1 -0
  836. package/dist/structure/total-row-blank.js +15 -0
  837. package/dist/structure/total-row-blank.js.map +1 -0
  838. package/dist/structure/total.d.ts +13 -3
  839. package/dist/structure/total.d.ts.map +1 -1
  840. package/dist/structure/total.js +80 -7
  841. package/dist/structure/total.js.map +1 -1
  842. package/dist/structure/variance-table.d.ts +34 -0
  843. package/dist/structure/variance-table.d.ts.map +1 -0
  844. package/dist/structure/variance-table.js +130 -0
  845. package/dist/structure/variance-table.js.map +1 -0
  846. package/dist/table-names.d.ts +4 -3
  847. package/dist/table-names.d.ts.map +1 -1
  848. package/dist/table-names.js +6 -6
  849. package/dist/table-names.js.map +1 -1
  850. package/dist/unlabelled-references.d.ts +16 -0
  851. package/dist/unlabelled-references.d.ts.map +1 -0
  852. package/dist/unlabelled-references.js +73 -0
  853. package/dist/unlabelled-references.js.map +1 -0
  854. package/dist/vehicle-plates.d.ts +28 -0
  855. package/dist/vehicle-plates.d.ts.map +1 -0
  856. package/dist/vehicle-plates.js +116 -0
  857. package/dist/vehicle-plates.js.map +1 -0
  858. package/dist/whole-word-runs.d.ts +24 -0
  859. package/dist/whole-word-runs.d.ts.map +1 -0
  860. package/dist/whole-word-runs.js +26 -0
  861. package/dist/whole-word-runs.js.map +1 -0
  862. package/package.json +4 -3
  863. package/rules/absolute-exception.yaml +1 -1
  864. package/rules/ai-generated-composite.yaml +1 -1
  865. package/rules/ai-tell.yaml +1 -1
  866. package/rules/amount-range-reversed.yaml +1 -1
  867. package/rules/amount-scale-consistency.yaml +1 -1
  868. package/rules/announcing-opener.yaml +1 -1
  869. package/rules/annual-holidays-mismatch.yaml +65 -0
  870. package/rules/annual-pay-mismatch.yaml +64 -0
  871. package/rules/article-sound.yaml +1 -1
  872. package/rules/assistant-residue.yaml +1 -1
  873. package/rules/attachment-not-attached.yaml +1 -1
  874. package/rules/backorder-mismatch.yaml +57 -0
  875. package/rules/bmi-mismatch.yaml +63 -0
  876. package/rules/bold-label-list.yaml +1 -1
  877. package/rules/broken-link.yaml +1 -1
  878. package/rules/capacity-runtime-mismatch.yaml +1 -1
  879. package/rules/change-rate-mismatch.yaml +6 -6
  880. package/rules/chat-citation-residue.yaml +2 -2
  881. package/rules/cliche.yaml +2 -2
  882. package/rules/closing-balance-mismatch.yaml +63 -0
  883. package/rules/colon-lead-in.yaml +1 -1
  884. package/rules/comparative-without-baseline.yaml +1 -1
  885. package/rules/concrete-evidence-density.yaml +1 -1
  886. package/rules/connection-time-short.yaml +1 -1
  887. package/rules/contact-variant.yaml +4 -4
  888. package/rules/contrast-framing.yaml +2 -2
  889. package/rules/cross-doc-broken-link.yaml +1 -1
  890. package/rules/cross-doc-fact-conflict.yaml +1 -1
  891. package/rules/cross-doc-term-variant.yaml +1 -1
  892. package/rules/cumulative-below-current.yaml +59 -0
  893. package/rules/currency-column-mix.yaml +70 -0
  894. package/rules/currency-notation-consistency.yaml +2 -2
  895. package/rules/cushion-phrase-density.yaml +1 -1
  896. package/rules/dangling-participle.yaml +2 -2
  897. package/rules/dangling-reference.yaml +1 -1
  898. package/rules/date-format-consistency.yaml +1 -1
  899. package/rules/date-outside-period.yaml +5 -5
  900. package/rules/date-range-reversed.yaml +2 -2
  901. package/rules/date-stamp-order.yaml +2 -2
  902. package/rules/date-without-year.yaml +12 -12
  903. package/rules/deadline-after-event.yaml +11 -6
  904. package/rules/deductible-exceeds-limit.yaml +54 -0
  905. package/rules/defined-name-repeated.yaml +3 -3
  906. package/rules/defined-term-form.yaml +2 -2
  907. package/rules/delivered-over-ordered.yaml +57 -0
  908. package/rules/demonstrative-opener-run.yaml +1 -1
  909. package/rules/discount-rate-mismatch.yaml +66 -0
  910. package/rules/due-before-issue.yaml +33 -12
  911. package/rules/duration-mismatch.yaml +16 -7
  912. package/rules/duration-product-mismatch.yaml +11 -3
  913. package/rules/elapsed-years-mismatch.yaml +11 -6
  914. package/rules/email-greeting-closing.yaml +2 -2
  915. package/rules/empty-conclusion.yaml +1 -1
  916. package/rules/empty-intensifier.yaml +1 -1
  917. package/rules/empty-list-item.yaml +1 -1
  918. package/rules/empty-section.yaml +1 -1
  919. package/rules/empty-table-cell.yaml +2 -2
  920. package/rules/expletive-construction.yaml +1 -1
  921. package/rules/fact-conflict.yaml +16 -4
  922. package/rules/figurative-density.yaml +1 -1
  923. package/rules/figure-reference-order.yaml +1 -1
  924. package/rules/footnote-mismatch.yaml +1 -1
  925. package/rules/fullwidth-alnum-consistency.yaml +1 -1
  926. package/rules/gpa-mismatch.yaml +80 -0
  927. package/rules/heading-end-punctuation-mix.yaml +1 -1
  928. package/rules/heading-level-skip.yaml +1 -1
  929. package/rules/heading-numbering-mix.yaml +3 -3
  930. package/rules/homophone-slip.yaml +1 -1
  931. package/rules/humble-for-others.yaml +1 -1
  932. package/rules/idiom-misuse.yaml +1 -1
  933. package/rules/ime-residue.yaml +1 -1
  934. package/rules/impossible-date.yaml +10 -6
  935. package/rules/installment-total-mismatch.yaml +58 -0
  936. package/rules/interest-mismatch.yaml +50 -0
  937. package/rules/interval-count-mismatch.yaml +1 -1
  938. package/rules/invisible-character.yaml +1 -1
  939. package/rules/kana-function-word.yaml +2 -2
  940. package/rules/katakana-density.yaml +1 -1
  941. package/rules/katakana-long-vowel.yaml +2 -2
  942. package/rules/kutoten-consistency.yaml +1 -1
  943. package/rules/latin-spacing.yaml +20 -6
  944. package/rules/layout-code-mismatch.yaml +1 -1
  945. package/rules/less-for-fewer.yaml +1 -1
  946. package/rules/line-amount-mismatch.yaml +8 -7
  947. package/rules/link-text-url-mismatch.yaml +1 -1
  948. package/rules/list-item-form-mix.yaml +1 -1
  949. package/rules/lookalike-character.yaml +1 -1
  950. package/rules/max-kanji-continuous.yaml +1 -1
  951. package/rules/meter-usage-mismatch.yaml +64 -0
  952. package/rules/misconversion.yaml +1 -1
  953. package/rules/modal-conflict.yaml +1 -1
  954. package/rules/name-variant.yaml +12 -3
  955. package/rules/net-amount-mismatch.yaml +57 -0
  956. package/rules/net-over-gross.yaml +57 -0
  957. package/rules/no-doubled-joshi.yaml +1 -1
  958. package/rules/no-mixed-desumasu.yaml +1 -1
  959. package/rules/no-nakaguro-parallel.yaml +1 -1
  960. package/rules/nominalization.yaml +1 -1
  961. package/rules/nonstandard-word.yaml +1 -1
  962. package/rules/number-style-consistency.yaml +3 -3
  963. package/rules/number-without-unit.yaml +1 -1
  964. package/rules/number-word-figure-mismatch.yaml +1 -1
  965. package/rules/numbering-gap.yaml +1 -1
  966. package/rules/obligation-without-deadline.yaml +1 -1
  967. package/rules/ordinal-suffix-mismatch.yaml +1 -1
  968. package/rules/orthographic-variant.yaml +2 -2
  969. package/rules/outside-announced-list.yaml +1 -1
  970. package/rules/padded-intro.yaml +1 -1
  971. package/rules/paragraph-restatement.yaml +1 -1
  972. package/rules/party-role-name.yaml +3 -3
  973. package/rules/percent-sum-mismatch.yaml +2 -2
  974. package/rules/period-label-conflict.yaml +68 -0
  975. package/rules/period-multiple-mismatch.yaml +61 -0
  976. package/rules/period-part-exceeds-whole.yaml +62 -0
  977. package/rules/person-consistency.yaml +1 -1
  978. package/rules/phone-number-variant.yaml +3 -3
  979. package/rules/preferred-term.yaml +2 -2
  980. package/rules/prerequisite-after-step.yaml +1 -1
  981. package/rules/product-exceeds-maximum.yaml +49 -0
  982. package/rules/proper-noun-density.yaml +1 -1
  983. package/rules/quantity-range-reversed.yaml +2 -2
  984. package/rules/range-band-mismatch.yaml +1 -1
  985. package/rules/ratio-mismatch.yaml +64 -0
  986. package/rules/reference-flag-mismatch.yaml +74 -0
  987. package/rules/reference-number-repeated.yaml +63 -0
  988. package/rules/reference-number-variant.yaml +81 -0
  989. package/rules/reference-title-mismatch.yaml +1 -1
  990. package/rules/reference-topic-missing.yaml +1 -1
  991. package/rules/reference-unit-mismatch.yaml +62 -0
  992. package/rules/relative-date-mismatch.yaml +1 -1
  993. package/rules/request-without-deadline.yaml +3 -3
  994. package/rules/required-listed-as-preferred.yaml +1 -1
  995. package/rules/required-sections.yaml +2 -2
  996. package/rules/requirement-modal.yaml +2 -2
  997. package/rules/requirement-smell.yaml +1 -1
  998. package/rules/revision-direction-mismatch.yaml +66 -0
  999. package/rules/risk-disclosure.yaml +1 -1
  1000. package/rules/running-balance-mismatch.yaml +59 -0
  1001. package/rules/scaled-quantity-mismatch.yaml +1 -1
  1002. package/rules/serial-range-reversed.yaml +52 -0
  1003. package/rules/share-amount-mismatch.yaml +58 -0
  1004. package/rules/share-over-hundred.yaml +1 -1
  1005. package/rules/shell-prompt-mix.yaml +1 -1
  1006. package/rules/space-before-punctuation.yaml +1 -1
  1007. package/rules/spelling-consistency.yaml +1 -1
  1008. package/rules/step-statement-mix.yaml +3 -3
  1009. package/rules/stock-transition.yaml +1 -1
  1010. package/rules/summary-fact-mismatch.yaml +1 -1
  1011. package/rules/table-header-variant.yaml +1 -1
  1012. package/rules/table-unit-mix.yaml +82 -0
  1013. package/rules/taigen-dome-in-prose.yaml +1 -1
  1014. package/rules/tax-mismatch.yaml +13 -7
  1015. package/rules/tier-threshold-mismatch.yaml +73 -0
  1016. package/rules/time-order.yaml +7 -4
  1017. package/rules/time-range-reversed.yaml +9 -4
  1018. package/rules/toc-heading-mismatch.yaml +1 -1
  1019. package/rules/topic-predicate-distance.yaml +1 -1
  1020. package/rules/total-mismatch.yaml +5 -5
  1021. package/rules/ui-label-variant.yaml +1 -1
  1022. package/rules/unclosed-code-fence.yaml +1 -1
  1023. package/rules/uncomparable-graded.yaml +2 -2
  1024. package/rules/undefined-term.yaml +2 -2
  1025. package/rules/unfilled-placeholder.yaml +2 -2
  1026. package/rules/unit-mismatch.yaml +1 -1
  1027. package/rules/unit-spacing-consistency.yaml +1 -1
  1028. package/rules/unknown-word.yaml +1 -1
  1029. package/rules/url-run-on.yaml +1 -1
  1030. package/rules/vague-deadline.yaml +1 -1
  1031. package/rules/vague-figure-reference.yaml +1 -1
  1032. package/rules/vague-word-density.yaml +2 -2
  1033. package/rules/variance-mismatch.yaml +67 -0
  1034. package/rules/very-adjective.yaml +1 -1
  1035. package/rules/walk-time-distance-mismatch.yaml +1 -1
  1036. package/rules/warning-without-action.yaml +1 -1
  1037. package/rules/weasel-word.yaml +2 -2
  1038. package/rules/wordy-phrase.yaml +2 -2
  1039. package/rules/yori-as-from.yaml +1 -1
  1040. package/skills/chaff/SKILL.md +59 -9
  1041. package/src/company-kana-spelling.ts +105 -0
  1042. package/src/company-names.ts +159 -26
  1043. package/src/contacts/table-rows.ts +51 -0
  1044. package/src/derived/age-on-date.ts +161 -0
  1045. package/src/derived/durations.ts +83 -12
  1046. package/src/derived/hours-and-minutes.ts +41 -0
  1047. package/src/derived/hyphenated-counts.ts +38 -0
  1048. package/src/derived/marked-dates.ts +61 -0
  1049. package/src/derived/money-span.ts +10 -0
  1050. package/src/derived/period-parts.ts +360 -0
  1051. package/src/derived/readable-date.ts +63 -0
  1052. package/src/derived/stays.ts +7 -2
  1053. package/src/derived/timesheet-hours.ts +112 -0
  1054. package/src/derived/use-maximum.ts +158 -0
  1055. package/src/derived/working-hours.ts +2 -2
  1056. package/src/detectors/annual-holidays-mismatch.ts +41 -0
  1057. package/src/detectors/annual-pay-mismatch.ts +71 -0
  1058. package/src/detectors/blank-structure.ts +54 -14
  1059. package/src/detectors/bmi-mismatch.ts +82 -0
  1060. package/src/detectors/change-rate.ts +27 -4
  1061. package/src/detectors/closing-balance-mismatch.ts +52 -0
  1062. package/src/detectors/contact-variant.ts +8 -2
  1063. package/src/detectors/cumulative-below-current.ts +30 -0
  1064. package/src/detectors/currency-column.ts +37 -0
  1065. package/src/detectors/date-any-year.ts +130 -0
  1066. package/src/detectors/date-outside-period.ts +4 -10
  1067. package/src/detectors/date-stamp-order.ts +2 -1
  1068. package/src/detectors/date-year.ts +55 -13
  1069. package/src/detectors/deductible-exceeds-limit.ts +55 -0
  1070. package/src/detectors/defined-term-form.ts +6 -23
  1071. package/src/detectors/derived-numbers.ts +50 -89
  1072. package/src/detectors/discount-rate.ts +41 -0
  1073. package/src/detectors/due-date.ts +21 -7
  1074. package/src/detectors/email-letter.ts +45 -15
  1075. package/src/detectors/event-deadline.ts +13 -3
  1076. package/src/detectors/fact-consistency.ts +145 -7
  1077. package/src/detectors/gloss-year.ts +21 -0
  1078. package/src/detectors/gpa-mismatch.ts +43 -0
  1079. package/src/detectors/impossible-date.ts +25 -3
  1080. package/src/detectors/installment-total-mismatch.ts +68 -0
  1081. package/src/detectors/interest.ts +43 -0
  1082. package/src/detectors/lab-columns.ts +9 -0
  1083. package/src/detectors/labelled-age.ts +154 -0
  1084. package/src/detectors/line-amount.ts +58 -3
  1085. package/src/detectors/measured-facts.ts +1 -1
  1086. package/src/detectors/meter-usage.ts +49 -0
  1087. package/src/detectors/name-field.ts +43 -0
  1088. package/src/detectors/name-variant.ts +160 -16
  1089. package/src/detectors/net-amount-mismatch.ts +86 -0
  1090. package/src/detectors/net-gross-weight.ts +39 -0
  1091. package/src/detectors/nominal-step.ts +35 -0
  1092. package/src/detectors/number-style.ts +11 -2
  1093. package/src/detectors/order-quantity.ts +46 -0
  1094. package/src/detectors/orthographic-variant.ts +40 -10
  1095. package/src/detectors/orthography.ts +27 -11
  1096. package/src/detectors/period-label-conflict.ts +43 -0
  1097. package/src/detectors/period-multiple-mismatch.ts +54 -0
  1098. package/src/detectors/period-part.ts +71 -0
  1099. package/src/detectors/range-words.ts +17 -0
  1100. package/src/detectors/ratio-mismatch.ts +116 -0
  1101. package/src/detectors/readable-dates.ts +36 -0
  1102. package/src/detectors/reference-flag.ts +36 -0
  1103. package/src/detectors/reference-number-repeated.ts +25 -0
  1104. package/src/detectors/reference-number-variant.ts +44 -0
  1105. package/src/detectors/reference-unit.ts +24 -0
  1106. package/src/detectors/registry/annual-holidays-mismatch.ts +4 -0
  1107. package/src/detectors/registry/annual-pay-mismatch.ts +4 -0
  1108. package/src/detectors/registry/backorder-mismatch.ts +4 -0
  1109. package/src/detectors/registry/bmi-mismatch.ts +4 -0
  1110. package/src/detectors/registry/closing-balance-mismatch.ts +4 -0
  1111. package/src/detectors/registry/cumulative-below-current.ts +4 -0
  1112. package/src/detectors/registry/currency-column-mix.ts +4 -0
  1113. package/src/detectors/registry/deductible-exceeds-limit.ts +4 -0
  1114. package/src/detectors/registry/delivered-over-ordered.ts +4 -0
  1115. package/src/detectors/registry/discount-rate.ts +4 -0
  1116. package/src/detectors/registry/elapsed-years-mismatch.ts +1 -1
  1117. package/src/detectors/registry/gpa-mismatch.ts +4 -0
  1118. package/src/detectors/registry/installment-total-mismatch.ts +4 -0
  1119. package/src/detectors/registry/interest.ts +4 -0
  1120. package/src/detectors/registry/meter-usage.ts +4 -0
  1121. package/src/detectors/registry/net-amount-mismatch.ts +4 -0
  1122. package/src/detectors/registry/net-over-gross.ts +4 -0
  1123. package/src/detectors/registry/period-label-conflict.ts +4 -0
  1124. package/src/detectors/registry/period-multiple-mismatch.ts +4 -0
  1125. package/src/detectors/registry/period-part-exceeds-whole.ts +4 -0
  1126. package/src/detectors/registry/product-exceeds-maximum.ts +4 -0
  1127. package/src/detectors/registry/ratio-mismatch.ts +4 -0
  1128. package/src/detectors/registry/reference-flag-mismatch.ts +4 -0
  1129. package/src/detectors/registry/reference-number-repeated.ts +4 -0
  1130. package/src/detectors/registry/reference-number-variant.ts +4 -0
  1131. package/src/detectors/registry/reference-unit.ts +4 -0
  1132. package/src/detectors/registry/revision-direction.ts +4 -0
  1133. package/src/detectors/registry/running-balance.ts +4 -0
  1134. package/src/detectors/registry/serial-range.ts +4 -0
  1135. package/src/detectors/registry/share-amount.ts +4 -0
  1136. package/src/detectors/registry/table-unit-mix.ts +4 -0
  1137. package/src/detectors/registry/tier-threshold.ts +4 -0
  1138. package/src/detectors/registry/variance-mismatch.ts +4 -0
  1139. package/src/detectors/relative-dates.ts +2 -1
  1140. package/src/detectors/relative-day-words.ts +2 -1
  1141. package/src/detectors/rent-multiple-mismatch.ts +3 -2
  1142. package/src/detectors/request-owner.ts +5 -2
  1143. package/src/detectors/revision-direction.ts +44 -0
  1144. package/src/detectors/row-sentence-amounts.ts +96 -0
  1145. package/src/detectors/running-balance.ts +31 -0
  1146. package/src/detectors/scaled-quantity.ts +1 -1
  1147. package/src/detectors/serial-range.ts +37 -0
  1148. package/src/detectors/share-amount.ts +51 -0
  1149. package/src/detectors/structure-tree.ts +58 -10
  1150. package/src/detectors/table-scale.ts +37 -0
  1151. package/src/detectors/tax-amount.ts +45 -13
  1152. package/src/detectors/technical-docs.ts +4 -2
  1153. package/src/detectors/tier-threshold.ts +108 -0
  1154. package/src/detectors/time-order.ts +52 -18
  1155. package/src/detectors/use-maximum.ts +38 -0
  1156. package/src/detectors/variance.ts +33 -0
  1157. package/src/detectors/whole-count-findings.ts +48 -0
  1158. package/src/detectors/working-hours-findings.ts +100 -0
  1159. package/src/facts/age-values.ts +124 -0
  1160. package/src/facts/cell-keys.ts +21 -0
  1161. package/src/facts/count-labels.ts +28 -0
  1162. package/src/facts/document-terms.ts +107 -0
  1163. package/src/facts/duration-scale.ts +22 -0
  1164. package/src/facts/duration-values.ts +44 -0
  1165. package/src/facts/fact-values.ts +36 -7
  1166. package/src/facts/labelled-facts.ts +66 -9
  1167. package/src/facts/measure-units.ts +28 -10
  1168. package/src/facts/measures.ts +11 -11
  1169. package/src/facts/qualified-labels.ts +126 -0
  1170. package/src/facts/rate-values.ts +117 -0
  1171. package/src/facts/row-sentence-amounts.ts +113 -0
  1172. package/src/facts/superscript-power.ts +5 -0
  1173. package/src/facts/table-facts.ts +35 -7
  1174. package/src/facts/term-values.ts +236 -0
  1175. package/src/facts/unit-word.ts +13 -0
  1176. package/src/facts/verb-quantity-facts.ts +84 -0
  1177. package/src/facts/whole-counts.ts +183 -0
  1178. package/src/name-char-reading.ts +24 -0
  1179. package/src/name-line-block.ts +40 -0
  1180. package/src/name-lookalike-chars.ts +53 -0
  1181. package/src/name-neighbours.ts +58 -0
  1182. package/src/name-ordinary-word.ts +68 -0
  1183. package/src/name-person.ts +31 -0
  1184. package/src/name-separator.ts +48 -0
  1185. package/src/name-variants.ts +42 -86
  1186. package/src/name-weight.ts +12 -0
  1187. package/src/person-field.ts +43 -0
  1188. package/src/person-full-name.ts +70 -0
  1189. package/src/phone-numbers.ts +54 -18
  1190. package/src/plugin.ts +2 -0
  1191. package/src/product-names.ts +98 -0
  1192. package/src/reference-numbers.ts +55 -0
  1193. package/src/spaced-person-name.ts +97 -0
  1194. package/src/spacing-code.ts +22 -1
  1195. package/src/structure/annual-holidays.ts +222 -0
  1196. package/src/structure/annual-pay.ts +339 -0
  1197. package/src/structure/bmi.ts +133 -0
  1198. package/src/structure/change-rate-table.ts +135 -0
  1199. package/src/structure/change-rate.ts +54 -17
  1200. package/src/structure/closing-balance.ts +104 -0
  1201. package/src/structure/column-date-order.ts +73 -0
  1202. package/src/structure/compound-hours.ts +49 -0
  1203. package/src/structure/cumulative-below-current.ts +66 -0
  1204. package/src/structure/currency-column.ts +97 -0
  1205. package/src/structure/date-deadline-mark.ts +30 -0
  1206. package/src/structure/date-outside-period.ts +17 -9
  1207. package/src/structure/date-range.ts +6 -9
  1208. package/src/structure/deadline-after-event.ts +125 -8
  1209. package/src/structure/deductible-limit.ts +255 -0
  1210. package/src/structure/discount-rate.ts +209 -0
  1211. package/src/structure/generic-role.ts +8 -0
  1212. package/src/structure/gpa.ts +218 -0
  1213. package/src/structure/installment-total.ts +343 -0
  1214. package/src/structure/interest.ts +133 -0
  1215. package/src/structure/key-value-row.ts +45 -0
  1216. package/src/structure/lab-columns.ts +21 -0
  1217. package/src/structure/labelled-date-order.ts +68 -52
  1218. package/src/structure/labelled-order.ts +122 -0
  1219. package/src/structure/labelled-time-order.ts +100 -0
  1220. package/src/structure/line-amount-label.ts +100 -0
  1221. package/src/structure/line-amount-rate.ts +178 -0
  1222. package/src/structure/line-amount-unit.ts +16 -0
  1223. package/src/structure/line-amount.ts +200 -48
  1224. package/src/structure/meter-usage-read.ts +139 -0
  1225. package/src/structure/meter-usage.ts +224 -0
  1226. package/src/structure/net-amount.ts +243 -0
  1227. package/src/structure/net-gross-weight.ts +97 -0
  1228. package/src/structure/order-quantity.ts +125 -0
  1229. package/src/structure/party-role.ts +4 -1
  1230. package/src/structure/percent-sum.ts +3 -0
  1231. package/src/structure/period-label-conflict.ts +174 -0
  1232. package/src/structure/period-labels.ts +147 -0
  1233. package/src/structure/period-multiple.ts +186 -0
  1234. package/src/structure/quantity-range.ts +1 -8
  1235. package/src/structure/range-bands.ts +1 -1
  1236. package/src/structure/range-years.ts +75 -0
  1237. package/src/structure/ratio.ts +296 -0
  1238. package/src/structure/reference-flags.ts +156 -0
  1239. package/src/structure/reference-number-repeated.ts +57 -0
  1240. package/src/structure/reference-unit.ts +105 -0
  1241. package/src/structure/rent-multiple.ts +12 -82
  1242. package/src/structure/revision-direction.ts +214 -0
  1243. package/src/structure/running-balance.ts +157 -0
  1244. package/src/structure/scaled-quantities.ts +20 -6
  1245. package/src/structure/serial-range.ts +52 -0
  1246. package/src/structure/share-amount.ts +206 -0
  1247. package/src/structure/shift-times.ts +136 -0
  1248. package/src/structure/span-label.ts +26 -0
  1249. package/src/structure/stated-multiple.ts +82 -0
  1250. package/src/structure/stated-period.ts +23 -11
  1251. package/src/structure/table-scale.ts +239 -0
  1252. package/src/structure/tax-price.ts +136 -0
  1253. package/src/structure/tax.ts +55 -20
  1254. package/src/structure/tier-threshold.ts +218 -0
  1255. package/src/structure/time-range.ts +9 -3
  1256. package/src/structure/total-line.ts +174 -5
  1257. package/src/structure/total-row-blank.ts +23 -0
  1258. package/src/structure/total.ts +122 -13
  1259. package/src/structure/variance-table.ts +167 -0
  1260. package/src/table-names.ts +6 -6
  1261. package/src/unlabelled-references.ts +83 -0
  1262. package/src/vehicle-plates.ts +142 -0
  1263. package/src/whole-word-runs.ts +38 -0
@@ -0,0 +1,25 @@
1
+ // reference-number-repeated: the reading half. Reads the document's Markdown tables and the lexicon reference-column, and
2
+ // leaves the deciding to structure/reference-number-repeated.ts.
3
+ import type { Detector, Finding } from "../plugin.ts";
4
+ import { quoteAt } from "./structure-tree.ts";
5
+ import { cellsOf, tablesOf } from "../facts/table-facts.ts";
6
+ import { lineNumberAt, linesOf } from "../structure/lines.ts";
7
+ import { proseAndTablesOf } from "../table-text.ts";
8
+ import { repeatedReferences } from "../structure/reference-number-repeated.ts";
9
+
10
+ const RULE = "reference-number-repeated";
11
+
12
+ export const referenceNumberRepeated: Detector = (doc): Finding[] => {
13
+ const words = (doc.lexicons["reference-column"] ?? []).map((entry) => entry.pattern);
14
+ if (words.length === 0) return [];
15
+ const tables = tablesOf(linesOf(proseAndTablesOf(doc))).map((table) => ({ header: cellsOf(table.header), rows: table.rows.map(cellsOf) }));
16
+ const sourceLines = linesOf(doc.source);
17
+ return repeatedReferences(tables, words).map((repeat) => ({
18
+ rule: RULE,
19
+ severity: "warning",
20
+ line: 0,
21
+ column: 0,
22
+ quote: quoteAt(doc.source, repeat.offset),
23
+ values: { number: repeat.number, heading: repeat.heading, firstLine: lineNumberAt(sourceLines, repeat.firstOffset) ?? 0, offset: repeat.offset },
24
+ }));
25
+ };
@@ -0,0 +1,44 @@
1
+ // reference-number-variant: a document's own reference number written with two neighbouring characters swapped somewhere
2
+ // else in the document, after a label of the same kind (reference-numbers.ts), or with no label where only one labelled
3
+ // code swaps to it (unlabelled-references.ts); and the document's one vehicle plate written
4
+ // once with one character of its serial changed (vehicle-plates.ts).
5
+ import { labelledReferenceNumbers, referenceVariants, type ReferenceNumber } from "../reference-numbers.ts";
6
+ import { labelledPlates, plateVariants } from "../vehicle-plates.ts";
7
+ import { tableCodes, tableLabelledCodes, unlabelledVariants } from "../unlabelled-references.ts";
8
+ import { proseAndTablesOf } from "../table-text.ts";
9
+ import { quoteAt } from "./structure-tree.ts";
10
+ import type { Detector, Finding, OptionValue } from "../plugin.ts";
11
+
12
+ const PLATE_SHAPES = "vehicle-plate";
13
+ const SUBSTITUTED = "substituted";
14
+
15
+ const finding = (number: ReferenceNumber, other: ReferenceNumber, source: string, variant?: string): Finding => ({
16
+ rule: "",
17
+ severity: "info",
18
+ line: 0,
19
+ column: 0,
20
+ quote: quoteAt(source, number.offset),
21
+ values: { written: number.written, other: other.written, offset: number.offset },
22
+ ...(variant === undefined ? {} : { variant }),
23
+ });
24
+
25
+ /** Kinds a document lists many of (item codes): two labelled ones are two things, so only a code with no label is compared with them. */
26
+ const listedKindsOf = (value: OptionValue | undefined): readonly string[] => (typeof value === "object" ? value : []);
27
+
28
+ export const referenceNumberVariant: Detector = (doc, options): Finding[] => {
29
+ const labels = options.lexicon ?? [];
30
+ if (labels.length === 0) return [];
31
+ const text = doc.prose ?? doc.source;
32
+ const plates = labelledPlates(text, labels, doc.lexicons[PLATE_SHAPES] ?? []);
33
+ const inPlate = (number: ReferenceNumber): boolean =>
34
+ plates.some((plate) => number.offset >= plate.offset && number.offset < plate.offset + plate.written.length);
35
+ const numbers = [...labelledReferenceNumbers(text, labels).filter((number) => !inPlate(number)), ...plates];
36
+ const listed = new Set(listedKindsOf(options.settings?.["listed_kinds"]));
37
+ const withTables = proseAndTablesOf(doc);
38
+ const labelled = [...numbers, ...tableLabelledCodes(withTables, labels)];
39
+ return [
40
+ ...referenceVariants(numbers.filter((number) => !listed.has(number.label))).map(({ number, other }) => finding(number, other, doc.source)),
41
+ ...unlabelledVariants(text, labelled, tableCodes(withTables)).map(({ number, other }) => finding(number, other, doc.source)),
42
+ ...plateVariants(plates).map(({ number, other }) => finding(number, other, doc.source, SUBSTITUTED)),
43
+ ].toSorted((a, b) => Number(a.values["offset"]) - Number(b.values["offset"]));
44
+ };
@@ -0,0 +1,24 @@
1
+ // reference-unit-mismatch: the reading half. The result, reference range and unit columns are found by the language's
2
+ // lab-result-column and reference-unit-column lexicons and the units read with reference-unit; the tables are read from the
3
+ // prose with its tables put back, so code is not.
4
+ import type { Detector, Finding, ProseDocument } from "../plugin.ts";
5
+ import { referenceUnitMismatches, type UnitWord } from "../structure/reference-unit.ts";
6
+ import { proseAndTablesOf } from "../table-text.ts";
7
+ import { labColumnWordsOf } from "./lab-columns.ts";
8
+ import { quoteAt } from "./structure-tree.ts";
9
+
10
+ const unitsOf = (doc: ProseDocument): UnitWord[] =>
11
+ (doc.lexicons["reference-unit"] ?? []).flatMap((entry) => (entry.group === undefined ? [] : [{ pattern: entry.pattern, unit: entry.group }]));
12
+
13
+ export const referenceUnit: Detector = (doc): Finding[] => {
14
+ const columns = labColumnWordsOf(doc, "reference-unit-column");
15
+ if (columns.length === 0) return [];
16
+ return referenceUnitMismatches(proseAndTablesOf(doc), { units: unitsOf(doc), columns }).map((issue) => ({
17
+ rule: "reference-unit-mismatch",
18
+ severity: "error",
19
+ line: 0,
20
+ column: 0,
21
+ quote: quoteAt(doc.source, issue.offset),
22
+ values: { ...issue.values, offset: issue.offset },
23
+ }));
24
+ };
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { annualHolidaysMismatch } from "../annual-holidays-mismatch.ts";
3
+
4
+ export const detector: Detector = annualHolidaysMismatch;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { annualPayMismatch } from "../annual-pay-mismatch.ts";
3
+
4
+ export const detector: Detector = annualPayMismatch;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { backorderMismatchDetector } from "../order-quantity.ts";
3
+
4
+ export const detector: Detector = backorderMismatchDetector;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { bmiMismatch } from "../bmi-mismatch.ts";
3
+
4
+ export const detector: Detector = bmiMismatch;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { closingBalanceMismatch } from "../closing-balance-mismatch.ts";
3
+
4
+ export const detector: Detector = closingBalanceMismatch;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { cumulativeBelow } from "../cumulative-below-current.ts";
3
+
4
+ export const detector: Detector = cumulativeBelow;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { currencyColumnMixDetector } from "../currency-column.ts";
3
+
4
+ export const detector: Detector = currencyColumnMixDetector;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { deductibleExceedsLimit } from "../deductible-exceeds-limit.ts";
3
+
4
+ export const detector: Detector = deductibleExceedsLimit;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { deliveredOverOrderedDetector } from "../order-quantity.ts";
3
+
4
+ export const detector: Detector = deliveredOverOrderedDetector;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { discountRate } from "../discount-rate.ts";
3
+
4
+ export const detector: Detector = discountRate;
@@ -1,4 +1,4 @@
1
1
  import type { Detector } from "../../plugin.ts";
2
- import { elapsedYearsMismatch } from "../derived-numbers.ts";
2
+ import { elapsedYearsMismatch } from "../labelled-age.ts";
3
3
 
4
4
  export const detector: Detector = elapsedYearsMismatch;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { gpaMismatch } from "../gpa-mismatch.ts";
3
+
4
+ export const detector: Detector = gpaMismatch;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { installmentTotalMismatch } from "../installment-total-mismatch.ts";
3
+
4
+ export const detector: Detector = installmentTotalMismatch;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { interest } from "../interest.ts";
3
+
4
+ export const detector: Detector = interest;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { meterUsage } from "../meter-usage.ts";
3
+
4
+ export const detector: Detector = meterUsage;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { netAmountMismatch } from "../net-amount-mismatch.ts";
3
+
4
+ export const detector: Detector = netAmountMismatch;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { netOverGrossDetector } from "../net-gross-weight.ts";
3
+
4
+ export const detector: Detector = netOverGrossDetector;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { periodLabelConflict } from "../period-label-conflict.ts";
3
+
4
+ export const detector: Detector = periodLabelConflict;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { periodMultipleMismatch } from "../period-multiple-mismatch.ts";
3
+
4
+ export const detector: Detector = periodMultipleMismatch;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { periodPartExceedsWhole } from "../period-part.ts";
3
+
4
+ export const detector: Detector = periodPartExceedsWhole;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { productExceedsMaximum } from "../use-maximum.ts";
3
+
4
+ export const detector: Detector = productExceedsMaximum;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { ratioMismatch } from "../ratio-mismatch.ts";
3
+
4
+ export const detector: Detector = ratioMismatch;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { referenceFlag } from "../reference-flag.ts";
3
+
4
+ export const detector: Detector = referenceFlag;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { referenceNumberRepeated } from "../reference-number-repeated.ts";
3
+
4
+ export const detector: Detector = referenceNumberRepeated;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { referenceNumberVariant } from "../reference-number-variant.ts";
3
+
4
+ export const detector: Detector = referenceNumberVariant;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { referenceUnit } from "../reference-unit.ts";
3
+
4
+ export const detector: Detector = referenceUnit;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { revisionDirection } from "../revision-direction.ts";
3
+
4
+ export const detector: Detector = revisionDirection;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { runningBalance } from "../running-balance.ts";
3
+
4
+ export const detector: Detector = runningBalance;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { serialRange } from "../serial-range.ts";
3
+
4
+ export const detector: Detector = serialRange;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { shareAmount } from "../share-amount.ts";
3
+
4
+ export const detector: Detector = shareAmount;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { tableUnitMix } from "../table-scale.ts";
3
+
4
+ export const detector: Detector = tableUnitMix;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { tierThreshold } from "../tier-threshold.ts";
3
+
4
+ export const detector: Detector = tierThreshold;
@@ -0,0 +1,4 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ import { varianceMismatch } from "../variance.ts";
3
+
4
+ export const detector: Detector = varianceMismatch;
@@ -5,6 +5,7 @@ import type { DurationUnit } from "../derived/date-arithmetic.ts";
5
5
  import { relativeMismatches, type DatedValue, type Relative } from "../derived/relative-dates.ts";
6
6
  import { quoteAt } from "./structure-tree.ts";
7
7
  import { dayWordFindings } from "./relative-day-words.ts";
8
+ import { readableDates } from "./readable-dates.ts";
8
9
 
9
10
  /** 期間の単位の語彙表。relative-year-unit は、向きの語が付くときだけ期間になる単位(「1年前」の年)。 */
10
11
  const DURATION_LEXICONS: readonly (readonly [string, DurationUnit])[] = [
@@ -107,7 +108,7 @@ export const relativeDateMismatch: Detector = (doc): Finding[] => {
107
108
  base: doc.source.slice(mismatch.base.start, mismatch.base.end),
108
109
  relative: doc.source.slice(mismatch.relative.start, mismatch.relative.end),
109
110
  target: doc.source.slice(mismatch.target.start, mismatch.target.end),
110
- expected: mismatch.expected,
111
+ expected: readableDates(doc)(mismatch.expected),
111
112
  offset: mismatch.target.start,
112
113
  },
113
114
  }));
@@ -6,6 +6,7 @@ import type { DatedValue } from "../derived/relative-dates.ts";
6
6
  import { relativeDayMismatch, type DayWord } from "../derived/relative-weekdays.ts";
7
7
  import { escapeRegExp } from "../orthography.ts";
8
8
  import { quoteAt } from "./structure-tree.ts";
9
+ import { readableDates } from "./readable-dates.ts";
9
10
 
10
11
  const FULL = /^\d{4}-\d{2}-\d{2}$/u;
11
12
  const LATIN = /^[A-Za-z]/u;
@@ -117,7 +118,7 @@ export const dayWordFindings = (doc: ProseDocument, dates: readonly DatedValue[]
117
118
  base: doc.source.slice(base.start, base.end),
118
119
  relative: doc.source.slice(word.start, word.end),
119
120
  target: doc.source.slice(target.start, target.end),
120
- expected,
121
+ expected: readableDates(doc)(expected),
121
122
  offset: target.start,
122
123
  },
123
124
  },
@@ -3,7 +3,8 @@
3
3
  // the labels are rent-label and rent-multiple-label, the words rent-multiple-word, the counts number-word (digit), and a
4
4
  // range of rent is joined by range-connector or amount-range-word.
5
5
  import type { Detector, Finding, ProseDocument } from "../plugin.ts";
6
- import { rentMultipleMismatches, type RentAmount, type RentMultipleWords } from "../structure/rent-multiple.ts";
6
+ import { rentMultipleMismatches, type RentMultipleWords } from "../structure/rent-multiple.ts";
7
+ import type { StatedAmount } from "../structure/stated-multiple.ts";
7
8
  import { scaledAmountOf, scaleWordsOf } from "./amount-scale.ts";
8
9
  import { amountsIn, formsOf } from "./currency-notation.ts";
9
10
  import { proseAndTablesOf } from "../table-text.ts";
@@ -29,7 +30,7 @@ const wordsOf = (doc: ProseDocument): RentMultipleWords => ({
29
30
  numberWords: numberWordsOf(doc),
30
31
  });
31
32
 
32
- const amountsOf = (text: string, doc: ProseDocument): RentAmount[] => {
33
+ const amountsOf = (text: string, doc: ProseDocument): StatedAmount[] => {
33
34
  const scales = scaleWordsOf(doc);
34
35
  return amountsIn(
35
36
  text,
@@ -14,6 +14,7 @@ export const REQUEST_LEXICONS = {
14
14
  deadline: "request-deadline",
15
15
  owner: "request-owner",
16
16
  pointer: "request-pointer",
17
+ offer: "request-offer",
17
18
  } as const;
18
19
 
19
20
  type Words = Readonly<Record<keyof typeof REQUEST_LEXICONS, readonly string[]>>;
@@ -30,6 +31,7 @@ const wordsOf = (doc: ProseDocument): Words => ({
30
31
  deadline: patternsOf(doc.lexicons[REQUEST_LEXICONS.deadline]),
31
32
  owner: patternsOf(doc.lexicons[REQUEST_LEXICONS.owner]),
32
33
  pointer: patternsOf(doc.lexicons[REQUEST_LEXICONS.pointer]),
34
+ offer: patternsOf(doc.lexicons[REQUEST_LEXICONS.offer]),
33
35
  });
34
36
 
35
37
  /** How far apart, in characters, the action word and the request ending may be: the action must be what is requested. */
@@ -57,13 +59,14 @@ const gapBetween = (left: Place, right: Place): number => Math.max(left.start -
57
59
 
58
60
  /**
59
61
  * A request for an action: an action word next to a request ending (「確認してください」「please send」), not a condition
60
- * (「ご不明な点があれば…ください」 is an offer), and not a pointer to where to read more (「詳細は資料をご確認ください」).
62
+ * (「ご不明な点があれば…ください」 is an offer), not an open offer to take the reader's questions (「ご質問はメールでお送りください」),
63
+ * and not a pointer to where to read more (「詳細は資料をご確認ください」).
61
64
  * The action has to be close to the ending, or a noun like 検討会 or 履修登録 earlier in the sentence would make one.
62
65
  */
63
66
  export const isRequest = (text: string, words: Words): boolean => {
64
67
  const endings = placesOf(text, words.ending);
65
68
  const asked = placesOf(text, words.action).some((action) => endings.some((ending) => gapBetween(action, ending) <= ACTION_REACH));
66
- return asked && !containsAny(text, words.condition) && !containsAny(text, words.pointer);
69
+ return asked && ![words.condition, words.offer, words.pointer].some((patterns) => containsAny(text, patterns));
67
70
  };
68
71
 
69
72
  const NAMED = new Set(["PROPN"]);
@@ -0,0 +1,44 @@
1
+ // revision-direction-mismatch: a forecast said to be revised one way whose revision table moves the other way
2
+ // (structure/revision-direction.ts). The words are revision-direction (rise, fall; the verbs rise-verb and fall-verb, read
3
+ // only with a word of its group forecast in their sentence) and the labels of the previous and
4
+ // revised forecasts revision-column (previous, revised); the sections start at the headings, whose words the prose masks
5
+ // and this puts back.
6
+ import type { Detector, Finding, ProseDocument } from "../plugin.ts";
7
+ import { revisionDirectionMismatches, type RevisionWords } from "../structure/revision-direction.ts";
8
+ import { proseAndTablesOf } from "../table-text.ts";
9
+ import { proseWithCells } from "../table-cells.ts";
10
+ import { quoteAround } from "./quote-around.ts";
11
+
12
+ const patternsOf = (doc: ProseDocument, lexicon: string, group: string): string[] =>
13
+ (doc.lexicons[lexicon] ?? []).filter((entry) => entry.group === group).map((entry) => entry.pattern);
14
+
15
+ const wordsOf = (doc: ProseDocument): RevisionWords => ({
16
+ rises: patternsOf(doc, "revision-direction", "rise"),
17
+ falls: patternsOf(doc, "revision-direction", "fall"),
18
+ risesWithObject: patternsOf(doc, "revision-direction", "rise-verb"),
19
+ fallsWithObject: patternsOf(doc, "revision-direction", "fall-verb"),
20
+ objects: patternsOf(doc, "revision-direction", "forecast"),
21
+ previous: patternsOf(doc, "revision-column", "previous"),
22
+ revised: patternsOf(doc, "revision-column", "revised"),
23
+ });
24
+
25
+ export const revisionDirection: Detector = (doc): Finding[] => {
26
+ const headings = doc.markup?.headings ?? [];
27
+ const text = proseWithCells(
28
+ proseAndTablesOf(doc),
29
+ headings.map((heading) => ({ ...heading, text: doc.source.slice(heading.start, heading.end) })),
30
+ );
31
+ const input = {
32
+ text,
33
+ sectionStarts: headings.map((heading) => heading.start),
34
+ units: [...headings, ...doc.sentences.map((sentence) => sentence.span)],
35
+ };
36
+ return revisionDirectionMismatches(input, wordsOf(doc)).map((issue) => ({
37
+ rule: "revision-direction-mismatch",
38
+ severity: "warning",
39
+ line: 0,
40
+ column: 0,
41
+ quote: quoteAround(text, issue.offset),
42
+ values: { ...issue.values, offset: issue.offset },
43
+ }));
44
+ };
@@ -0,0 +1,96 @@
1
+ import type { Finding, ProseDocument, StructureNode } from "../plugin.ts";
2
+ import { nameSpans } from "../compare/proper-nouns.ts";
3
+ import { factValues, type FactValue } from "../facts/fact-values.ts";
4
+ import { cellsOf, tablesOf } from "../facts/table-facts.ts";
5
+ import { scopedFacts, type ScopedFact } from "../facts/fact-scope.ts";
6
+ import { withoutEdgeMarks } from "../facts/trim-marks.ts";
7
+ import {
8
+ periodOf,
9
+ rowSentenceConflicts,
10
+ type Amount,
11
+ type AmountRow,
12
+ type PeriodMark,
13
+ type SubjectSentence,
14
+ type SubjectWords,
15
+ } from "../facts/row-sentence-amounts.ts";
16
+ import { linesOf, type Line } from "../structure/lines.ts";
17
+ import { quoteAt } from "./structure-tree.ts";
18
+
19
+ const LETTER = /\p{L}/u;
20
+
21
+ const patternsOf = (doc: ProseDocument, id: string): string[] => (doc.lexicons[id] ?? []).map((entry) => entry.pattern);
22
+
23
+ const within = <T extends FactValue>(span: { start: number; end: number }, values: readonly T[]): T[] =>
24
+ values.filter((value) => span.start <= value.start && value.end <= span.end);
25
+
26
+ /** 範囲は事実と同じ読み(fact-scope)。値の位置で決まる。位置ごとの範囲。 */
27
+ const scopesAt = (doc: ProseDocument, tree: StructureNode, values: readonly FactValue[]): ReadonlyMap<number, string> =>
28
+ new Map(
29
+ scopedFacts(
30
+ values.map((value) => ({ label: "", key: "", value })),
31
+ tree,
32
+ doc.source,
33
+ patternsOf(doc, "summary-heading"),
34
+ ).map((fact) => [fact.value.start, fact.scope]),
35
+ );
36
+
37
+ const amountRow = (row: Line, amounts: readonly Amount[], scopes: ReadonlyMap<number, string>): AmountRow[] => {
38
+ const [first, ...rest] = cellsOf(row);
39
+ if (first === undefined) return [];
40
+ const label = withoutEdgeMarks(first.text);
41
+ const inRow = rest.flatMap((cell) => within(cell, amounts));
42
+ const [head] = inRow;
43
+ if (head === undefined || !LETTER.test(label) || within(first, amounts).length > 0) return [];
44
+ return [{ label, scope: scopes.get(head.start) ?? "", amounts: inRow }];
45
+ };
46
+
47
+ const subjectSentences = (doc: ProseDocument, amounts: readonly Amount[], scopes: ReadonlyMap<number, string>): SubjectSentence[] =>
48
+ doc.sentences.flatMap((sentence) => {
49
+ const inSentence = within(sentence.span, amounts);
50
+ const [head] = inSentence;
51
+ return head === undefined ? [] : [{ text: sentence.text, scope: scopes.get(head.start) ?? "", amounts: inSentence }];
52
+ });
53
+
54
+ const subjectWordsOf = (doc: ProseDocument): SubjectWords => ({
55
+ separators: patternsOf(doc, "fact-separator"),
56
+ determiners: patternsOf(doc, "fact-label-drop"),
57
+ conditions: patternsOf(doc, "fact-amount-condition"),
58
+ });
59
+
60
+ const periodMarksOf = (doc: ProseDocument): PeriodMark[] =>
61
+ (doc.lexicons["per-unit-mark"] ?? []).map((entry): PeriodMark => ({ pattern: entry.pattern, group: entry.group ?? entry.pattern }));
62
+
63
+ /** 金額: 通貨の語彙表の印を単位に書いた数量。前後に期間あたりの印があれば、その期間も。 */
64
+ const amountsOf = (doc: ProseDocument, tree: StructureNode): Amount[] => {
65
+ const currencies = new Set(patternsOf(doc, "currency-notation").map((pattern) => pattern.normalize("NFKC")));
66
+ const marks = periodMarksOf(doc);
67
+ return factValues(tree, doc.source, nameSpans(doc))
68
+ .filter((value) => value.kind === "quantity" && currencies.has(value.unit))
69
+ .map((value): Amount => {
70
+ const period = periodOf(doc.source, value, marks);
71
+ return period === undefined ? value : { ...value, period };
72
+ });
73
+ };
74
+
75
+ /** 表の行の金額と、その行の見出しを主語にした文の金額の食い違い。名前付きの値として読めた文の値は、ほかの読みが比べる。 */
76
+ export const rowSentenceFindings = (doc: ProseDocument, facts: readonly ScopedFact[]): Finding[] => {
77
+ const tree = doc.structure;
78
+ if (tree === undefined) return [];
79
+ const amounts = amountsOf(doc, tree);
80
+ const tableRows = tablesOf(linesOf(doc.source)).flatMap((table) => table.rows);
81
+ if (tableRows.length === 0 || amounts.length === 0) return [];
82
+ const scopes = scopesAt(doc, tree, amounts);
83
+ const rows = tableRows.flatMap((row) => amountRow(row, amounts, scopes));
84
+ const read = new Set(facts.map((fact) => fact.value.start));
85
+ return rowSentenceConflicts(rows, subjectSentences(doc, amounts, scopes), subjectWordsOf(doc))
86
+ .filter((conflict) => !read.has(conflict.value.start))
87
+ .map(({ label, value, other }) => ({
88
+ rule: "fact-conflict",
89
+ severity: "warning",
90
+ line: 0,
91
+ column: 0,
92
+ quote: quoteAt(doc.source, value.start),
93
+ variant: "term",
94
+ values: { label, value: doc.source.slice(value.start, value.end), other: doc.source.slice(other.start, other.end), offset: value.start },
95
+ }));
96
+ };
@@ -0,0 +1,31 @@
1
+ // running-balance-mismatch: the reading half. Reads the document's Markdown tables and the lexicons balance-column and
2
+ // total-label, and leaves the deciding to structure/running-balance.ts.
3
+ import type { Detector, Finding, ProseDocument } from "../plugin.ts";
4
+ import { quoteAt } from "./structure-tree.ts";
5
+ import { cellsOf, tablesOf } from "../facts/table-facts.ts";
6
+ import { linesOf } from "../structure/lines.ts";
7
+ import { proseAndTablesOf } from "../table-text.ts";
8
+ import { runningBalanceMismatches, type BalanceRole, type BalanceWord } from "../structure/running-balance.ts";
9
+
10
+ const RULE = "running-balance-mismatch";
11
+ const ROLES: readonly string[] = ["date", "sequence", "balance", "interest", "principal", "in", "out", "payment"] satisfies readonly BalanceRole[];
12
+ const isRole = (group: string | undefined): group is BalanceRole => group !== undefined && ROLES.includes(group);
13
+
14
+ /** Lexicon balance-column: the heading words that say which column holds the balance and which the movement of a row. */
15
+ const columnWordsOf = (doc: ProseDocument): BalanceWord[] =>
16
+ (doc.lexicons["balance-column"] ?? []).flatMap((entry) => (isRole(entry.group) ? [{ pattern: entry.pattern, role: entry.group }] : []));
17
+
18
+ export const runningBalance: Detector = (doc): Finding[] => {
19
+ const columns = columnWordsOf(doc);
20
+ if (columns.length === 0) return [];
21
+ const tables = tablesOf(linesOf(proseAndTablesOf(doc))).map((table) => ({ header: cellsOf(table.header), rows: table.rows.map(cellsOf) }));
22
+ const totalLabels = (doc.lexicons["total-label"] ?? []).map((entry) => entry.pattern);
23
+ return runningBalanceMismatches(tables, { columns, totalLabels }).map((issue) => ({
24
+ rule: RULE,
25
+ severity: "warning",
26
+ line: 0,
27
+ column: 0,
28
+ quote: quoteAt(doc.source, issue.offset),
29
+ values: { ...issue.values, offset: issue.offset },
30
+ }));
31
+ };
@@ -5,7 +5,7 @@ import type { MeasureUnit } from "../facts/measures.ts";
5
5
  import { quoteAt } from "./structure-tree.ts";
6
6
  import type { Detector, Finding, ProseDocument } from "../plugin.ts";
7
7
 
8
- const DIMENSIONS = ["unit-mass", "unit-volume"] as const;
8
+ const DIMENSIONS = ["unit-mass", "unit-volume", "unit-area"] as const;
9
9
 
10
10
  const measuresOf = (doc: ProseDocument): MeasureUnit[] =>
11
11
  DIMENSIONS.flatMap((dimension) =>
@@ -0,0 +1,37 @@
1
+ // serial-range-reversed: a range of serial, lot or batch codes whose end is below its start (製造番号:A2400〜A1800,
2
+ // "Lots L5240 through L5210"), decided by structure/amount-range.ts as quantity-range-reversed is. The codes are read by
3
+ // structure/serial-range.ts; serial-label names the codes on the line; the joints are range-connector, range-opener,
4
+ // range-closer and quantity-range-word; quantity-change-word's ungrouped words make a pair a change.
5
+ import type { Detector, Finding, ProseDocument } from "../plugin.ts";
6
+ import { reversedAmountRanges, type AmountRangeWords } from "../structure/amount-range.ts";
7
+ import { labelledRanges, NO_BARE_NUMBER, serialRangeEnds } from "../structure/serial-range.ts";
8
+ import { proseAndTablesOf } from "../table-text.ts";
9
+ import { quoteAround } from "./quote-around.ts";
10
+
11
+ const patternsOf = (doc: ProseDocument, lexicon: string): string[] =>
12
+ (doc.lexicons[lexicon] ?? []).filter((entry) => entry.group === undefined).map((entry) => entry.pattern);
13
+
14
+ const wordsOf = (doc: ProseDocument): AmountRangeWords => ({
15
+ connectors: [...patternsOf(doc, "range-connector"), ...patternsOf(doc, "quantity-range-word")],
16
+ openers: patternsOf(doc, "range-opener"),
17
+ closers: patternsOf(doc, "range-closer"),
18
+ changes: patternsOf(doc, "quantity-change-word"),
19
+ lowers: [],
20
+ uppers: [],
21
+ links: [],
22
+ scales: [],
23
+ number: NO_BARE_NUMBER,
24
+ });
25
+
26
+ export const serialRange: Detector = (doc): Finding[] => {
27
+ const text = proseAndTablesOf(doc);
28
+ const reversed = reversedAmountRanges(text, serialRangeEnds(text), wordsOf(doc));
29
+ return labelledRanges(text, reversed, patternsOf(doc, "serial-label")).map((issue) => ({
30
+ rule: "serial-range-reversed",
31
+ severity: "warning",
32
+ line: 0,
33
+ column: 0,
34
+ quote: quoteAround(text, issue.offset),
35
+ values: { ...issue.values, offset: issue.offset },
36
+ }));
37
+ };