chaffjs 0.30.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 (1616) hide show
  1. package/README.ja.md +330 -0
  2. package/README.md +119 -257
  3. package/dist/announced-count.d.ts +2 -0
  4. package/dist/announced-count.d.ts.map +1 -1
  5. package/dist/announced-count.js +4 -3
  6. package/dist/announced-count.js.map +1 -1
  7. package/dist/company-kana-spelling.d.ts +31 -0
  8. package/dist/company-kana-spelling.d.ts.map +1 -0
  9. package/dist/company-kana-spelling.js +79 -0
  10. package/dist/company-kana-spelling.js.map +1 -0
  11. package/dist/company-names.d.ts +32 -1
  12. package/dist/company-names.d.ts.map +1 -1
  13. package/dist/company-names.js +129 -22
  14. package/dist/company-names.js.map +1 -1
  15. package/dist/contacts/addresses.d.ts +21 -0
  16. package/dist/contacts/addresses.d.ts.map +1 -0
  17. package/dist/contacts/addresses.js +144 -0
  18. package/dist/contacts/addresses.js.map +1 -0
  19. package/dist/contacts/emails.d.ts +11 -0
  20. package/dist/contacts/emails.d.ts.map +1 -0
  21. package/dist/contacts/emails.js +51 -0
  22. package/dist/contacts/emails.js.map +1 -0
  23. package/dist/contacts/table-rows.d.ts +7 -0
  24. package/dist/contacts/table-rows.d.ts.map +1 -0
  25. package/dist/contacts/table-rows.js +42 -0
  26. package/dist/contacts/table-rows.js.map +1 -0
  27. package/dist/contacts/variants.d.ts +14 -0
  28. package/dist/contacts/variants.d.ts.map +1 -0
  29. package/dist/contacts/variants.js +25 -0
  30. package/dist/contacts/variants.js.map +1 -0
  31. package/dist/derived/age-on-date.d.ts +53 -0
  32. package/dist/derived/age-on-date.d.ts.map +1 -0
  33. package/dist/derived/age-on-date.js +114 -0
  34. package/dist/derived/age-on-date.js.map +1 -0
  35. package/dist/derived/battery-runtime.d.ts +85 -0
  36. package/dist/derived/battery-runtime.d.ts.map +1 -0
  37. package/dist/derived/battery-runtime.js +217 -0
  38. package/dist/derived/battery-runtime.js.map +1 -0
  39. package/dist/derived/durations.d.ts +17 -2
  40. package/dist/derived/durations.d.ts.map +1 -1
  41. package/dist/derived/durations.js +61 -10
  42. package/dist/derived/durations.js.map +1 -1
  43. package/dist/derived/hours-and-minutes.d.ts +26 -0
  44. package/dist/derived/hours-and-minutes.d.ts.map +1 -0
  45. package/dist/derived/hours-and-minutes.js +24 -0
  46. package/dist/derived/hours-and-minutes.js.map +1 -0
  47. package/dist/derived/hyphenated-counts.d.ts +15 -0
  48. package/dist/derived/hyphenated-counts.d.ts.map +1 -0
  49. package/dist/derived/hyphenated-counts.js +31 -0
  50. package/dist/derived/hyphenated-counts.js.map +1 -0
  51. package/dist/derived/marked-dates.d.ts +15 -0
  52. package/dist/derived/marked-dates.d.ts.map +1 -0
  53. package/dist/derived/marked-dates.js +41 -0
  54. package/dist/derived/marked-dates.js.map +1 -0
  55. package/dist/derived/money-span.d.ts +9 -0
  56. package/dist/derived/money-span.d.ts.map +1 -0
  57. package/dist/derived/money-span.js +6 -0
  58. package/dist/derived/money-span.js.map +1 -0
  59. package/dist/derived/period-counts.d.ts +48 -0
  60. package/dist/derived/period-counts.d.ts.map +1 -0
  61. package/dist/derived/period-counts.js +128 -0
  62. package/dist/derived/period-counts.js.map +1 -0
  63. package/dist/derived/period-parts.d.ts +55 -0
  64. package/dist/derived/period-parts.d.ts.map +1 -0
  65. package/dist/derived/period-parts.js +283 -0
  66. package/dist/derived/period-parts.js.map +1 -0
  67. package/dist/derived/readable-date.d.ts +20 -0
  68. package/dist/derived/readable-date.d.ts.map +1 -0
  69. package/dist/derived/readable-date.js +50 -0
  70. package/dist/derived/readable-date.js.map +1 -0
  71. package/dist/derived/stays.d.ts +3 -1
  72. package/dist/derived/stays.d.ts.map +1 -1
  73. package/dist/derived/stays.js +3 -0
  74. package/dist/derived/stays.js.map +1 -1
  75. package/dist/derived/time-lengths.d.ts.map +1 -1
  76. package/dist/derived/time-lengths.js +12 -9
  77. package/dist/derived/time-lengths.js.map +1 -1
  78. package/dist/derived/timesheet-hours.d.ts +27 -0
  79. package/dist/derived/timesheet-hours.d.ts.map +1 -0
  80. package/dist/derived/timesheet-hours.js +86 -0
  81. package/dist/derived/timesheet-hours.js.map +1 -0
  82. package/dist/derived/use-interval.d.ts +33 -0
  83. package/dist/derived/use-interval.d.ts.map +1 -0
  84. package/dist/derived/use-interval.js +93 -0
  85. package/dist/derived/use-interval.js.map +1 -0
  86. package/dist/derived/use-maximum.d.ts +27 -0
  87. package/dist/derived/use-maximum.d.ts.map +1 -0
  88. package/dist/derived/use-maximum.js +104 -0
  89. package/dist/derived/use-maximum.js.map +1 -0
  90. package/dist/derived/working-hours.d.ts +4 -5
  91. package/dist/derived/working-hours.d.ts.map +1 -1
  92. package/dist/detectors/announced-count.d.ts.map +1 -1
  93. package/dist/detectors/announced-count.js +1 -0
  94. package/dist/detectors/announced-count.js.map +1 -1
  95. package/dist/detectors/annual-holidays-mismatch.d.ts +3 -0
  96. package/dist/detectors/annual-holidays-mismatch.d.ts.map +1 -0
  97. package/dist/detectors/annual-holidays-mismatch.js +29 -0
  98. package/dist/detectors/annual-holidays-mismatch.js.map +1 -0
  99. package/dist/detectors/annual-pay-mismatch.d.ts +3 -0
  100. package/dist/detectors/annual-pay-mismatch.d.ts.map +1 -0
  101. package/dist/detectors/annual-pay-mismatch.js +52 -0
  102. package/dist/detectors/annual-pay-mismatch.js.map +1 -0
  103. package/dist/detectors/blank-structure.d.ts +3 -1
  104. package/dist/detectors/blank-structure.d.ts.map +1 -1
  105. package/dist/detectors/blank-structure.js +45 -12
  106. package/dist/detectors/blank-structure.js.map +1 -1
  107. package/dist/detectors/bmi-mismatch.d.ts +3 -0
  108. package/dist/detectors/bmi-mismatch.d.ts.map +1 -0
  109. package/dist/detectors/bmi-mismatch.js +70 -0
  110. package/dist/detectors/bmi-mismatch.js.map +1 -0
  111. package/dist/detectors/capacity-runtime.d.ts +7 -0
  112. package/dist/detectors/capacity-runtime.d.ts.map +1 -0
  113. package/dist/detectors/capacity-runtime.js +98 -0
  114. package/dist/detectors/capacity-runtime.js.map +1 -0
  115. package/dist/detectors/change-rate.d.ts.map +1 -1
  116. package/dist/detectors/change-rate.js +24 -9
  117. package/dist/detectors/change-rate.js.map +1 -1
  118. package/dist/detectors/closing-balance-mismatch.d.ts +3 -0
  119. package/dist/detectors/closing-balance-mismatch.d.ts.map +1 -0
  120. package/dist/detectors/closing-balance-mismatch.js +42 -0
  121. package/dist/detectors/closing-balance-mismatch.js.map +1 -0
  122. package/dist/detectors/contact-variant.d.ts +3 -0
  123. package/dist/detectors/contact-variant.d.ts.map +1 -0
  124. package/dist/detectors/contact-variant.js +25 -0
  125. package/dist/detectors/contact-variant.js.map +1 -0
  126. package/dist/detectors/count-over-capacity.d.ts +4 -0
  127. package/dist/detectors/count-over-capacity.d.ts.map +1 -0
  128. package/dist/detectors/count-over-capacity.js +26 -0
  129. package/dist/detectors/count-over-capacity.js.map +1 -0
  130. package/dist/detectors/cumulative-below-current.d.ts +3 -0
  131. package/dist/detectors/cumulative-below-current.d.ts.map +1 -0
  132. package/dist/detectors/cumulative-below-current.js +25 -0
  133. package/dist/detectors/cumulative-below-current.js.map +1 -0
  134. package/dist/detectors/currency-column.d.ts +3 -0
  135. package/dist/detectors/currency-column.d.ts.map +1 -0
  136. package/dist/detectors/currency-column.js +32 -0
  137. package/dist/detectors/currency-column.js.map +1 -0
  138. package/dist/detectors/date-any-year.d.ts +24 -0
  139. package/dist/detectors/date-any-year.d.ts.map +1 -0
  140. package/dist/detectors/date-any-year.js +103 -0
  141. package/dist/detectors/date-any-year.js.map +1 -0
  142. package/dist/detectors/date-outside-period.d.ts.map +1 -1
  143. package/dist/detectors/date-outside-period.js +5 -10
  144. package/dist/detectors/date-outside-period.js.map +1 -1
  145. package/dist/detectors/date-stamp-order.d.ts +3 -0
  146. package/dist/detectors/date-stamp-order.d.ts.map +1 -0
  147. package/dist/detectors/date-stamp-order.js +25 -0
  148. package/dist/detectors/date-stamp-order.js.map +1 -0
  149. package/dist/detectors/date-year.d.ts +18 -6
  150. package/dist/detectors/date-year.d.ts.map +1 -1
  151. package/dist/detectors/date-year.js +39 -11
  152. package/dist/detectors/date-year.js.map +1 -1
  153. package/dist/detectors/deductible-exceeds-limit.d.ts +4 -0
  154. package/dist/detectors/deductible-exceeds-limit.d.ts.map +1 -0
  155. package/dist/detectors/deductible-exceeds-limit.js +46 -0
  156. package/dist/detectors/deductible-exceeds-limit.js.map +1 -0
  157. package/dist/detectors/defined-term-form.d.ts.map +1 -1
  158. package/dist/detectors/defined-term-form.js +45 -9
  159. package/dist/detectors/defined-term-form.js.map +1 -1
  160. package/dist/detectors/definition-use.d.ts +1 -1
  161. package/dist/detectors/definition-use.d.ts.map +1 -1
  162. package/dist/detectors/definition-use.js +4 -2
  163. package/dist/detectors/definition-use.js.map +1 -1
  164. package/dist/detectors/derived-numbers.d.ts +12 -3
  165. package/dist/detectors/derived-numbers.d.ts.map +1 -1
  166. package/dist/detectors/derived-numbers.js +45 -72
  167. package/dist/detectors/derived-numbers.js.map +1 -1
  168. package/dist/detectors/discount-rate.d.ts +3 -0
  169. package/dist/detectors/discount-rate.d.ts.map +1 -0
  170. package/dist/detectors/discount-rate.js +35 -0
  171. package/dist/detectors/discount-rate.js.map +1 -0
  172. package/dist/detectors/due-date.d.ts.map +1 -1
  173. package/dist/detectors/due-date.js +16 -3
  174. package/dist/detectors/due-date.js.map +1 -1
  175. package/dist/detectors/email-letter.d.ts +10 -2
  176. package/dist/detectors/email-letter.d.ts.map +1 -1
  177. package/dist/detectors/email-letter.js +24 -5
  178. package/dist/detectors/email-letter.js.map +1 -1
  179. package/dist/detectors/en-shape.d.ts.map +1 -1
  180. package/dist/detectors/en-shape.js +7 -4
  181. package/dist/detectors/en-shape.js.map +1 -1
  182. package/dist/detectors/event-deadline.d.ts +3 -0
  183. package/dist/detectors/event-deadline.d.ts.map +1 -0
  184. package/dist/detectors/event-deadline.js +33 -0
  185. package/dist/detectors/event-deadline.js.map +1 -0
  186. package/dist/detectors/fact-consistency.d.ts +1 -1
  187. package/dist/detectors/fact-consistency.d.ts.map +1 -1
  188. package/dist/detectors/fact-consistency.js +161 -5
  189. package/dist/detectors/fact-consistency.js.map +1 -1
  190. package/dist/detectors/gloss-year.d.ts +11 -0
  191. package/dist/detectors/gloss-year.d.ts.map +1 -0
  192. package/dist/detectors/gloss-year.js +14 -0
  193. package/dist/detectors/gloss-year.js.map +1 -0
  194. package/dist/detectors/gpa-mismatch.d.ts +3 -0
  195. package/dist/detectors/gpa-mismatch.d.ts.map +1 -0
  196. package/dist/detectors/gpa-mismatch.js +39 -0
  197. package/dist/detectors/gpa-mismatch.js.map +1 -0
  198. package/dist/detectors/heading-case.d.ts +5 -2
  199. package/dist/detectors/heading-case.d.ts.map +1 -1
  200. package/dist/detectors/heading-case.js +12 -4
  201. package/dist/detectors/heading-case.js.map +1 -1
  202. package/dist/detectors/heading-echo.d.ts +5 -0
  203. package/dist/detectors/heading-echo.d.ts.map +1 -1
  204. package/dist/detectors/heading-echo.js +14 -1
  205. package/dist/detectors/heading-echo.js.map +1 -1
  206. package/dist/detectors/impossible-date.d.ts.map +1 -1
  207. package/dist/detectors/impossible-date.js +22 -6
  208. package/dist/detectors/impossible-date.js.map +1 -1
  209. package/dist/detectors/installment-total-mismatch.d.ts +3 -0
  210. package/dist/detectors/installment-total-mismatch.d.ts.map +1 -0
  211. package/dist/detectors/installment-total-mismatch.js +49 -0
  212. package/dist/detectors/installment-total-mismatch.js.map +1 -0
  213. package/dist/detectors/interest.d.ts +3 -0
  214. package/dist/detectors/interest.d.ts.map +1 -0
  215. package/dist/detectors/interest.js +38 -0
  216. package/dist/detectors/interest.js.map +1 -0
  217. package/dist/detectors/lab-columns.d.ts +4 -0
  218. package/dist/detectors/lab-columns.d.ts.map +1 -0
  219. package/dist/detectors/lab-columns.js +3 -0
  220. package/dist/detectors/lab-columns.js.map +1 -0
  221. package/dist/detectors/labelled-age.d.ts +4 -0
  222. package/dist/detectors/labelled-age.d.ts.map +1 -0
  223. package/dist/detectors/labelled-age.js +110 -0
  224. package/dist/detectors/labelled-age.js.map +1 -0
  225. package/dist/detectors/layout-code.d.ts +5 -0
  226. package/dist/detectors/layout-code.d.ts.map +1 -0
  227. package/dist/detectors/layout-code.js +124 -0
  228. package/dist/detectors/layout-code.js.map +1 -0
  229. package/dist/detectors/line-amount.d.ts.map +1 -1
  230. package/dist/detectors/line-amount.js +45 -2
  231. package/dist/detectors/line-amount.js.map +1 -1
  232. package/dist/detectors/measured-facts.d.ts +8 -0
  233. package/dist/detectors/measured-facts.d.ts.map +1 -0
  234. package/dist/detectors/measured-facts.js +18 -0
  235. package/dist/detectors/measured-facts.js.map +1 -0
  236. package/dist/detectors/meter-usage.d.ts +3 -0
  237. package/dist/detectors/meter-usage.d.ts.map +1 -0
  238. package/dist/detectors/meter-usage.js +37 -0
  239. package/dist/detectors/meter-usage.js.map +1 -0
  240. package/dist/detectors/name-field.d.ts +13 -0
  241. package/dist/detectors/name-field.d.ts.map +1 -0
  242. package/dist/detectors/name-field.js +38 -0
  243. package/dist/detectors/name-field.js.map +1 -0
  244. package/dist/detectors/name-variant-model-codes.d.ts +11 -0
  245. package/dist/detectors/name-variant-model-codes.d.ts.map +1 -0
  246. package/dist/detectors/name-variant-model-codes.js +21 -0
  247. package/dist/detectors/name-variant-model-codes.js.map +1 -0
  248. package/dist/detectors/name-variant.d.ts.map +1 -1
  249. package/dist/detectors/name-variant.js +151 -16
  250. package/dist/detectors/name-variant.js.map +1 -1
  251. package/dist/detectors/net-amount-mismatch.d.ts +10 -0
  252. package/dist/detectors/net-amount-mismatch.d.ts.map +1 -0
  253. package/dist/detectors/net-amount-mismatch.js +70 -0
  254. package/dist/detectors/net-amount-mismatch.js.map +1 -0
  255. package/dist/detectors/net-gross-weight.d.ts +3 -0
  256. package/dist/detectors/net-gross-weight.d.ts.map +1 -0
  257. package/dist/detectors/net-gross-weight.js +35 -0
  258. package/dist/detectors/net-gross-weight.js.map +1 -0
  259. package/dist/detectors/nominal-step.d.ts +3 -0
  260. package/dist/detectors/nominal-step.d.ts.map +1 -0
  261. package/dist/detectors/nominal-step.js +28 -0
  262. package/dist/detectors/nominal-step.js.map +1 -0
  263. package/dist/detectors/number-style.d.ts +2 -0
  264. package/dist/detectors/number-style.d.ts.map +1 -1
  265. package/dist/detectors/number-style.js +8 -2
  266. package/dist/detectors/number-style.js.map +1 -1
  267. package/dist/detectors/order-quantity.d.ts +10 -0
  268. package/dist/detectors/order-quantity.d.ts.map +1 -0
  269. package/dist/detectors/order-quantity.js +35 -0
  270. package/dist/detectors/order-quantity.js.map +1 -0
  271. package/dist/detectors/orthographic-variant.d.ts.map +1 -1
  272. package/dist/detectors/orthographic-variant.js +97 -17
  273. package/dist/detectors/orthographic-variant.js.map +1 -1
  274. package/dist/detectors/orthography.d.ts.map +1 -1
  275. package/dist/detectors/orthography.js +21 -7
  276. package/dist/detectors/orthography.js.map +1 -1
  277. package/dist/detectors/period-label-conflict.d.ts +4 -0
  278. package/dist/detectors/period-label-conflict.d.ts.map +1 -0
  279. package/dist/detectors/period-label-conflict.js +34 -0
  280. package/dist/detectors/period-label-conflict.js.map +1 -0
  281. package/dist/detectors/period-multiple-mismatch.d.ts +3 -0
  282. package/dist/detectors/period-multiple-mismatch.d.ts.map +1 -0
  283. package/dist/detectors/period-multiple-mismatch.js +36 -0
  284. package/dist/detectors/period-multiple-mismatch.js.map +1 -0
  285. package/dist/detectors/period-part.d.ts +4 -0
  286. package/dist/detectors/period-part.d.ts.map +1 -0
  287. package/dist/detectors/period-part.js +58 -0
  288. package/dist/detectors/period-part.js.map +1 -0
  289. package/dist/detectors/quantity-range.d.ts +3 -0
  290. package/dist/detectors/quantity-range.d.ts.map +1 -0
  291. package/dist/detectors/quantity-range.js +35 -0
  292. package/dist/detectors/quantity-range.js.map +1 -0
  293. package/dist/detectors/range-band.d.ts +5 -0
  294. package/dist/detectors/range-band.d.ts.map +1 -0
  295. package/dist/detectors/range-band.js +80 -0
  296. package/dist/detectors/range-band.js.map +1 -0
  297. package/dist/detectors/range-words.d.ts +5 -0
  298. package/dist/detectors/range-words.d.ts.map +1 -0
  299. package/dist/detectors/range-words.js +14 -0
  300. package/dist/detectors/range-words.js.map +1 -0
  301. package/dist/detectors/ratio-mismatch.d.ts +7 -0
  302. package/dist/detectors/ratio-mismatch.d.ts.map +1 -0
  303. package/dist/detectors/ratio-mismatch.js +89 -0
  304. package/dist/detectors/ratio-mismatch.js.map +1 -0
  305. package/dist/detectors/readable-dates.d.ts +9 -0
  306. package/dist/detectors/readable-dates.d.ts.map +1 -0
  307. package/dist/detectors/readable-dates.js +23 -0
  308. package/dist/detectors/readable-dates.js.map +1 -0
  309. package/dist/detectors/reference-flag.d.ts +3 -0
  310. package/dist/detectors/reference-flag.d.ts.map +1 -0
  311. package/dist/detectors/reference-flag.js +31 -0
  312. package/dist/detectors/reference-flag.js.map +1 -0
  313. package/dist/detectors/reference-number-repeated.d.ts +3 -0
  314. package/dist/detectors/reference-number-repeated.d.ts.map +1 -0
  315. package/dist/detectors/reference-number-repeated.js +22 -0
  316. package/dist/detectors/reference-number-repeated.js.map +1 -0
  317. package/dist/detectors/reference-number-variant.d.ts +3 -0
  318. package/dist/detectors/reference-number-variant.d.ts.map +1 -0
  319. package/dist/detectors/reference-number-variant.js +40 -0
  320. package/dist/detectors/reference-number-variant.js.map +1 -0
  321. package/dist/detectors/reference-unit.d.ts +3 -0
  322. package/dist/detectors/reference-unit.d.ts.map +1 -0
  323. package/dist/detectors/reference-unit.js +19 -0
  324. package/dist/detectors/reference-unit.js.map +1 -0
  325. package/dist/detectors/registry/annual-holidays-mismatch.d.ts +3 -0
  326. package/dist/detectors/registry/annual-holidays-mismatch.d.ts.map +1 -0
  327. package/dist/detectors/registry/annual-holidays-mismatch.js +3 -0
  328. package/dist/detectors/registry/annual-holidays-mismatch.js.map +1 -0
  329. package/dist/detectors/registry/annual-pay-mismatch.d.ts +3 -0
  330. package/dist/detectors/registry/annual-pay-mismatch.d.ts.map +1 -0
  331. package/dist/detectors/registry/annual-pay-mismatch.js +3 -0
  332. package/dist/detectors/registry/annual-pay-mismatch.js.map +1 -0
  333. package/dist/detectors/registry/backorder-mismatch.d.ts +3 -0
  334. package/dist/detectors/registry/backorder-mismatch.d.ts.map +1 -0
  335. package/dist/detectors/registry/backorder-mismatch.js +3 -0
  336. package/dist/detectors/registry/backorder-mismatch.js.map +1 -0
  337. package/dist/detectors/registry/bmi-mismatch.d.ts +3 -0
  338. package/dist/detectors/registry/bmi-mismatch.d.ts.map +1 -0
  339. package/dist/detectors/registry/bmi-mismatch.js +3 -0
  340. package/dist/detectors/registry/bmi-mismatch.js.map +1 -0
  341. package/dist/detectors/registry/capacity-runtime-mismatch.d.ts +3 -0
  342. package/dist/detectors/registry/capacity-runtime-mismatch.d.ts.map +1 -0
  343. package/dist/detectors/registry/capacity-runtime-mismatch.js +3 -0
  344. package/dist/detectors/registry/capacity-runtime-mismatch.js.map +1 -0
  345. package/dist/detectors/registry/closing-balance-mismatch.d.ts +3 -0
  346. package/dist/detectors/registry/closing-balance-mismatch.d.ts.map +1 -0
  347. package/dist/detectors/registry/closing-balance-mismatch.js +3 -0
  348. package/dist/detectors/registry/closing-balance-mismatch.js.map +1 -0
  349. package/dist/detectors/registry/contact-variant.d.ts +3 -0
  350. package/dist/detectors/registry/contact-variant.d.ts.map +1 -0
  351. package/dist/detectors/registry/contact-variant.js +3 -0
  352. package/dist/detectors/registry/contact-variant.js.map +1 -0
  353. package/dist/detectors/registry/count-over-capacity.d.ts +3 -0
  354. package/dist/detectors/registry/count-over-capacity.d.ts.map +1 -0
  355. package/dist/detectors/registry/count-over-capacity.js +3 -0
  356. package/dist/detectors/registry/count-over-capacity.js.map +1 -0
  357. package/dist/detectors/registry/cumulative-below-current.d.ts +3 -0
  358. package/dist/detectors/registry/cumulative-below-current.d.ts.map +1 -0
  359. package/dist/detectors/registry/cumulative-below-current.js +3 -0
  360. package/dist/detectors/registry/cumulative-below-current.js.map +1 -0
  361. package/dist/detectors/registry/currency-column-mix.d.ts +3 -0
  362. package/dist/detectors/registry/currency-column-mix.d.ts.map +1 -0
  363. package/dist/detectors/registry/currency-column-mix.js +3 -0
  364. package/dist/detectors/registry/currency-column-mix.js.map +1 -0
  365. package/dist/detectors/registry/date-stamp-order.d.ts +3 -0
  366. package/dist/detectors/registry/date-stamp-order.d.ts.map +1 -0
  367. package/dist/detectors/registry/date-stamp-order.js +3 -0
  368. package/dist/detectors/registry/date-stamp-order.js.map +1 -0
  369. package/dist/detectors/registry/deductible-exceeds-limit.d.ts +3 -0
  370. package/dist/detectors/registry/deductible-exceeds-limit.d.ts.map +1 -0
  371. package/dist/detectors/registry/deductible-exceeds-limit.js +3 -0
  372. package/dist/detectors/registry/deductible-exceeds-limit.js.map +1 -0
  373. package/dist/detectors/registry/delivered-over-ordered.d.ts +3 -0
  374. package/dist/detectors/registry/delivered-over-ordered.d.ts.map +1 -0
  375. package/dist/detectors/registry/delivered-over-ordered.js +3 -0
  376. package/dist/detectors/registry/delivered-over-ordered.js.map +1 -0
  377. package/dist/detectors/registry/discount-rate.d.ts +3 -0
  378. package/dist/detectors/registry/discount-rate.d.ts.map +1 -0
  379. package/dist/detectors/registry/discount-rate.js +3 -0
  380. package/dist/detectors/registry/discount-rate.js.map +1 -0
  381. package/dist/detectors/registry/elapsed-years-mismatch.js +1 -1
  382. package/dist/detectors/registry/elapsed-years-mismatch.js.map +1 -1
  383. package/dist/detectors/registry/event-deadline.d.ts +3 -0
  384. package/dist/detectors/registry/event-deadline.d.ts.map +1 -0
  385. package/dist/detectors/registry/event-deadline.js +3 -0
  386. package/dist/detectors/registry/event-deadline.js.map +1 -0
  387. package/dist/detectors/registry/gpa-mismatch.d.ts +3 -0
  388. package/dist/detectors/registry/gpa-mismatch.d.ts.map +1 -0
  389. package/dist/detectors/registry/gpa-mismatch.js +3 -0
  390. package/dist/detectors/registry/gpa-mismatch.js.map +1 -0
  391. package/dist/detectors/registry/installment-total-mismatch.d.ts +3 -0
  392. package/dist/detectors/registry/installment-total-mismatch.d.ts.map +1 -0
  393. package/dist/detectors/registry/installment-total-mismatch.js +3 -0
  394. package/dist/detectors/registry/installment-total-mismatch.js.map +1 -0
  395. package/dist/detectors/registry/interest.d.ts +3 -0
  396. package/dist/detectors/registry/interest.d.ts.map +1 -0
  397. package/dist/detectors/registry/interest.js +3 -0
  398. package/dist/detectors/registry/interest.js.map +1 -0
  399. package/dist/detectors/registry/interval-count-mismatch.d.ts +3 -0
  400. package/dist/detectors/registry/interval-count-mismatch.d.ts.map +1 -0
  401. package/dist/detectors/registry/interval-count-mismatch.js +3 -0
  402. package/dist/detectors/registry/interval-count-mismatch.js.map +1 -0
  403. package/dist/detectors/registry/layout-code-mismatch.d.ts +3 -0
  404. package/dist/detectors/registry/layout-code-mismatch.d.ts.map +1 -0
  405. package/dist/detectors/registry/layout-code-mismatch.js +3 -0
  406. package/dist/detectors/registry/layout-code-mismatch.js.map +1 -0
  407. package/dist/detectors/registry/meter-usage.d.ts +3 -0
  408. package/dist/detectors/registry/meter-usage.d.ts.map +1 -0
  409. package/dist/detectors/registry/meter-usage.js +3 -0
  410. package/dist/detectors/registry/meter-usage.js.map +1 -0
  411. package/dist/detectors/registry/net-amount-mismatch.d.ts +3 -0
  412. package/dist/detectors/registry/net-amount-mismatch.d.ts.map +1 -0
  413. package/dist/detectors/registry/net-amount-mismatch.js +3 -0
  414. package/dist/detectors/registry/net-amount-mismatch.js.map +1 -0
  415. package/dist/detectors/registry/net-over-gross.d.ts +3 -0
  416. package/dist/detectors/registry/net-over-gross.d.ts.map +1 -0
  417. package/dist/detectors/registry/net-over-gross.js +3 -0
  418. package/dist/detectors/registry/net-over-gross.js.map +1 -0
  419. package/dist/detectors/registry/period-label-conflict.d.ts +3 -0
  420. package/dist/detectors/registry/period-label-conflict.d.ts.map +1 -0
  421. package/dist/detectors/registry/period-label-conflict.js +3 -0
  422. package/dist/detectors/registry/period-label-conflict.js.map +1 -0
  423. package/dist/detectors/registry/period-multiple-mismatch.d.ts +3 -0
  424. package/dist/detectors/registry/period-multiple-mismatch.d.ts.map +1 -0
  425. package/dist/detectors/registry/period-multiple-mismatch.js +3 -0
  426. package/dist/detectors/registry/period-multiple-mismatch.js.map +1 -0
  427. package/dist/detectors/registry/period-part-exceeds-whole.d.ts +3 -0
  428. package/dist/detectors/registry/period-part-exceeds-whole.d.ts.map +1 -0
  429. package/dist/detectors/registry/period-part-exceeds-whole.js +3 -0
  430. package/dist/detectors/registry/period-part-exceeds-whole.js.map +1 -0
  431. package/dist/detectors/registry/product-exceeds-maximum.d.ts +3 -0
  432. package/dist/detectors/registry/product-exceeds-maximum.d.ts.map +1 -0
  433. package/dist/detectors/registry/product-exceeds-maximum.js +3 -0
  434. package/dist/detectors/registry/product-exceeds-maximum.js.map +1 -0
  435. package/dist/detectors/registry/quantity-range.d.ts +3 -0
  436. package/dist/detectors/registry/quantity-range.d.ts.map +1 -0
  437. package/dist/detectors/registry/quantity-range.js +3 -0
  438. package/dist/detectors/registry/quantity-range.js.map +1 -0
  439. package/dist/detectors/registry/range-band-mismatch.d.ts +3 -0
  440. package/dist/detectors/registry/range-band-mismatch.d.ts.map +1 -0
  441. package/dist/detectors/registry/range-band-mismatch.js +3 -0
  442. package/dist/detectors/registry/range-band-mismatch.js.map +1 -0
  443. package/dist/detectors/registry/ratio-mismatch.d.ts +3 -0
  444. package/dist/detectors/registry/ratio-mismatch.d.ts.map +1 -0
  445. package/dist/detectors/registry/ratio-mismatch.js +3 -0
  446. package/dist/detectors/registry/ratio-mismatch.js.map +1 -0
  447. package/dist/detectors/registry/reference-flag-mismatch.d.ts +3 -0
  448. package/dist/detectors/registry/reference-flag-mismatch.d.ts.map +1 -0
  449. package/dist/detectors/registry/reference-flag-mismatch.js +3 -0
  450. package/dist/detectors/registry/reference-flag-mismatch.js.map +1 -0
  451. package/dist/detectors/registry/reference-number-repeated.d.ts +3 -0
  452. package/dist/detectors/registry/reference-number-repeated.d.ts.map +1 -0
  453. package/dist/detectors/registry/reference-number-repeated.js +3 -0
  454. package/dist/detectors/registry/reference-number-repeated.js.map +1 -0
  455. package/dist/detectors/registry/reference-number-variant.d.ts +3 -0
  456. package/dist/detectors/registry/reference-number-variant.d.ts.map +1 -0
  457. package/dist/detectors/registry/reference-number-variant.js +3 -0
  458. package/dist/detectors/registry/reference-number-variant.js.map +1 -0
  459. package/dist/detectors/registry/reference-unit.d.ts +3 -0
  460. package/dist/detectors/registry/reference-unit.d.ts.map +1 -0
  461. package/dist/detectors/registry/reference-unit.js +3 -0
  462. package/dist/detectors/registry/reference-unit.js.map +1 -0
  463. package/dist/detectors/registry/rent-multiple-mismatch.d.ts +3 -0
  464. package/dist/detectors/registry/rent-multiple-mismatch.d.ts.map +1 -0
  465. package/dist/detectors/registry/rent-multiple-mismatch.js +3 -0
  466. package/dist/detectors/registry/rent-multiple-mismatch.js.map +1 -0
  467. package/dist/detectors/registry/revision-direction.d.ts +3 -0
  468. package/dist/detectors/registry/revision-direction.d.ts.map +1 -0
  469. package/dist/detectors/registry/revision-direction.js +3 -0
  470. package/dist/detectors/registry/revision-direction.js.map +1 -0
  471. package/dist/detectors/registry/running-balance.d.ts +3 -0
  472. package/dist/detectors/registry/running-balance.d.ts.map +1 -0
  473. package/dist/detectors/registry/running-balance.js +3 -0
  474. package/dist/detectors/registry/running-balance.js.map +1 -0
  475. package/dist/detectors/registry/scaled-quantity-mismatch.d.ts +3 -0
  476. package/dist/detectors/registry/scaled-quantity-mismatch.d.ts.map +1 -0
  477. package/dist/detectors/registry/scaled-quantity-mismatch.js +3 -0
  478. package/dist/detectors/registry/scaled-quantity-mismatch.js.map +1 -0
  479. package/dist/detectors/registry/serial-range.d.ts +3 -0
  480. package/dist/detectors/registry/serial-range.d.ts.map +1 -0
  481. package/dist/detectors/registry/serial-range.js +3 -0
  482. package/dist/detectors/registry/serial-range.js.map +1 -0
  483. package/dist/detectors/registry/share-amount.d.ts +3 -0
  484. package/dist/detectors/registry/share-amount.d.ts.map +1 -0
  485. package/dist/detectors/registry/share-amount.js +3 -0
  486. package/dist/detectors/registry/share-amount.js.map +1 -0
  487. package/dist/detectors/registry/step-time-sum-mismatch.d.ts +3 -0
  488. package/dist/detectors/registry/step-time-sum-mismatch.d.ts.map +1 -0
  489. package/dist/detectors/registry/step-time-sum-mismatch.js +3 -0
  490. package/dist/detectors/registry/step-time-sum-mismatch.js.map +1 -0
  491. package/dist/detectors/registry/table-unit-mix.d.ts +3 -0
  492. package/dist/detectors/registry/table-unit-mix.d.ts.map +1 -0
  493. package/dist/detectors/registry/table-unit-mix.js +3 -0
  494. package/dist/detectors/registry/table-unit-mix.js.map +1 -0
  495. package/dist/detectors/registry/tier-threshold.d.ts +3 -0
  496. package/dist/detectors/registry/tier-threshold.d.ts.map +1 -0
  497. package/dist/detectors/registry/tier-threshold.js +3 -0
  498. package/dist/detectors/registry/tier-threshold.js.map +1 -0
  499. package/dist/detectors/registry/time-range-reversed.d.ts +3 -0
  500. package/dist/detectors/registry/time-range-reversed.d.ts.map +1 -0
  501. package/dist/detectors/registry/time-range-reversed.js +3 -0
  502. package/dist/detectors/registry/time-range-reversed.js.map +1 -0
  503. package/dist/detectors/registry/unlisted-item-used.d.ts +3 -0
  504. package/dist/detectors/registry/unlisted-item-used.d.ts.map +1 -0
  505. package/dist/detectors/registry/unlisted-item-used.js +3 -0
  506. package/dist/detectors/registry/unlisted-item-used.js.map +1 -0
  507. package/dist/detectors/registry/variance-mismatch.d.ts +3 -0
  508. package/dist/detectors/registry/variance-mismatch.d.ts.map +1 -0
  509. package/dist/detectors/registry/variance-mismatch.js +3 -0
  510. package/dist/detectors/registry/variance-mismatch.js.map +1 -0
  511. package/dist/detectors/registry/walk-time-distance-mismatch.d.ts +3 -0
  512. package/dist/detectors/registry/walk-time-distance-mismatch.d.ts.map +1 -0
  513. package/dist/detectors/registry/walk-time-distance-mismatch.js +3 -0
  514. package/dist/detectors/registry/walk-time-distance-mismatch.js.map +1 -0
  515. package/dist/detectors/relative-dates.d.ts.map +1 -1
  516. package/dist/detectors/relative-dates.js +2 -1
  517. package/dist/detectors/relative-dates.js.map +1 -1
  518. package/dist/detectors/relative-day-words.d.ts.map +1 -1
  519. package/dist/detectors/relative-day-words.js +2 -1
  520. package/dist/detectors/relative-day-words.js.map +1 -1
  521. package/dist/detectors/rent-multiple-mismatch.d.ts +3 -0
  522. package/dist/detectors/rent-multiple-mismatch.d.ts.map +1 -0
  523. package/dist/detectors/rent-multiple-mismatch.js +39 -0
  524. package/dist/detectors/rent-multiple-mismatch.js.map +1 -0
  525. package/dist/detectors/request-owner.d.ts +3 -1
  526. package/dist/detectors/request-owner.d.ts.map +1 -1
  527. package/dist/detectors/request-owner.js +5 -2
  528. package/dist/detectors/request-owner.js.map +1 -1
  529. package/dist/detectors/revision-direction.d.ts +3 -0
  530. package/dist/detectors/revision-direction.d.ts.map +1 -0
  531. package/dist/detectors/revision-direction.js +32 -0
  532. package/dist/detectors/revision-direction.js.map +1 -0
  533. package/dist/detectors/row-sentence-amounts.d.ts +5 -0
  534. package/dist/detectors/row-sentence-amounts.d.ts.map +1 -0
  535. package/dist/detectors/row-sentence-amounts.js +71 -0
  536. package/dist/detectors/row-sentence-amounts.js.map +1 -0
  537. package/dist/detectors/running-balance.d.ts +3 -0
  538. package/dist/detectors/running-balance.d.ts.map +1 -0
  539. package/dist/detectors/running-balance.js +26 -0
  540. package/dist/detectors/running-balance.js.map +1 -0
  541. package/dist/detectors/scaled-quantity.d.ts +3 -0
  542. package/dist/detectors/scaled-quantity.d.ts.map +1 -0
  543. package/dist/detectors/scaled-quantity.js +37 -0
  544. package/dist/detectors/scaled-quantity.js.map +1 -0
  545. package/dist/detectors/serial-range.d.ts +3 -0
  546. package/dist/detectors/serial-range.d.ts.map +1 -0
  547. package/dist/detectors/serial-range.js +29 -0
  548. package/dist/detectors/serial-range.js.map +1 -0
  549. package/dist/detectors/share-amount.d.ts +3 -0
  550. package/dist/detectors/share-amount.d.ts.map +1 -0
  551. package/dist/detectors/share-amount.js +45 -0
  552. package/dist/detectors/share-amount.js.map +1 -0
  553. package/dist/detectors/signals.d.ts.map +1 -1
  554. package/dist/detectors/signals.js +3 -1
  555. package/dist/detectors/signals.js.map +1 -1
  556. package/dist/detectors/step-time-sum.d.ts +3 -0
  557. package/dist/detectors/step-time-sum.d.ts.map +1 -0
  558. package/dist/detectors/step-time-sum.js +46 -0
  559. package/dist/detectors/step-time-sum.js.map +1 -0
  560. package/dist/detectors/structure-tree.d.ts +2 -0
  561. package/dist/detectors/structure-tree.d.ts.map +1 -1
  562. package/dist/detectors/structure-tree.js +58 -9
  563. package/dist/detectors/structure-tree.js.map +1 -1
  564. package/dist/detectors/structure.js +1 -1
  565. package/dist/detectors/structure.js.map +1 -1
  566. package/dist/detectors/table-scale.d.ts +3 -0
  567. package/dist/detectors/table-scale.d.ts.map +1 -0
  568. package/dist/detectors/table-scale.js +32 -0
  569. package/dist/detectors/table-scale.js.map +1 -0
  570. package/dist/detectors/tax-amount.d.ts.map +1 -1
  571. package/dist/detectors/tax-amount.js +34 -10
  572. package/dist/detectors/tax-amount.js.map +1 -1
  573. package/dist/detectors/technical-docs.d.ts +6 -1
  574. package/dist/detectors/technical-docs.d.ts.map +1 -1
  575. package/dist/detectors/technical-docs.js +15 -2
  576. package/dist/detectors/technical-docs.js.map +1 -1
  577. package/dist/detectors/tier-threshold.d.ts +3 -0
  578. package/dist/detectors/tier-threshold.d.ts.map +1 -0
  579. package/dist/detectors/tier-threshold.js +86 -0
  580. package/dist/detectors/tier-threshold.js.map +1 -0
  581. package/dist/detectors/time-order.d.ts +2 -0
  582. package/dist/detectors/time-order.d.ts.map +1 -1
  583. package/dist/detectors/time-order.js +45 -13
  584. package/dist/detectors/time-order.js.map +1 -1
  585. package/dist/detectors/unit-consistency.d.ts +1 -1
  586. package/dist/detectors/unit-consistency.d.ts.map +1 -1
  587. package/dist/detectors/unit-consistency.js +46 -38
  588. package/dist/detectors/unit-consistency.js.map +1 -1
  589. package/dist/detectors/unlisted-items.d.ts +3 -0
  590. package/dist/detectors/unlisted-items.d.ts.map +1 -0
  591. package/dist/detectors/unlisted-items.js +57 -0
  592. package/dist/detectors/unlisted-items.js.map +1 -0
  593. package/dist/detectors/use-count-words.d.ts +8 -0
  594. package/dist/detectors/use-count-words.d.ts.map +1 -0
  595. package/dist/detectors/use-count-words.js +20 -0
  596. package/dist/detectors/use-count-words.js.map +1 -0
  597. package/dist/detectors/use-interval.d.ts +3 -0
  598. package/dist/detectors/use-interval.d.ts.map +1 -0
  599. package/dist/detectors/use-interval.js +39 -0
  600. package/dist/detectors/use-interval.js.map +1 -0
  601. package/dist/detectors/use-maximum.d.ts +3 -0
  602. package/dist/detectors/use-maximum.d.ts.map +1 -0
  603. package/dist/detectors/use-maximum.js +32 -0
  604. package/dist/detectors/use-maximum.js.map +1 -0
  605. package/dist/detectors/variance.d.ts +3 -0
  606. package/dist/detectors/variance.d.ts.map +1 -0
  607. package/dist/detectors/variance.js +28 -0
  608. package/dist/detectors/variance.js.map +1 -0
  609. package/dist/detectors/walk-time-distance-mismatch.d.ts +4 -0
  610. package/dist/detectors/walk-time-distance-mismatch.d.ts.map +1 -0
  611. package/dist/detectors/walk-time-distance-mismatch.js +38 -0
  612. package/dist/detectors/walk-time-distance-mismatch.js.map +1 -0
  613. package/dist/detectors/whole-count-findings.d.ts +4 -0
  614. package/dist/detectors/whole-count-findings.d.ts.map +1 -0
  615. package/dist/detectors/whole-count-findings.js +38 -0
  616. package/dist/detectors/whole-count-findings.js.map +1 -0
  617. package/dist/detectors/working-hours-findings.d.ts +9 -0
  618. package/dist/detectors/working-hours-findings.d.ts.map +1 -0
  619. package/dist/detectors/working-hours-findings.js +79 -0
  620. package/dist/detectors/working-hours-findings.js.map +1 -0
  621. package/dist/facts/age-values.d.ts +22 -0
  622. package/dist/facts/age-values.d.ts.map +1 -0
  623. package/dist/facts/age-values.js +76 -0
  624. package/dist/facts/age-values.js.map +1 -0
  625. package/dist/facts/approximate-tolerance.d.ts +7 -0
  626. package/dist/facts/approximate-tolerance.d.ts.map +1 -0
  627. package/dist/facts/approximate-tolerance.js +16 -0
  628. package/dist/facts/approximate-tolerance.js.map +1 -0
  629. package/dist/facts/cell-keys.d.ts +12 -0
  630. package/dist/facts/cell-keys.d.ts.map +1 -0
  631. package/dist/facts/cell-keys.js +19 -0
  632. package/dist/facts/cell-keys.js.map +1 -0
  633. package/dist/facts/count-labels.d.ts +15 -0
  634. package/dist/facts/count-labels.d.ts.map +1 -0
  635. package/dist/facts/count-labels.js +19 -0
  636. package/dist/facts/count-labels.js.map +1 -0
  637. package/dist/facts/document-terms.d.ts +43 -0
  638. package/dist/facts/document-terms.d.ts.map +1 -0
  639. package/dist/facts/document-terms.js +74 -0
  640. package/dist/facts/document-terms.js.map +1 -0
  641. package/dist/facts/duration-scale.d.ts +11 -0
  642. package/dist/facts/duration-scale.d.ts.map +1 -0
  643. package/dist/facts/duration-scale.js +14 -0
  644. package/dist/facts/duration-scale.js.map +1 -0
  645. package/dist/facts/duration-values.d.ts +15 -0
  646. package/dist/facts/duration-values.d.ts.map +1 -0
  647. package/dist/facts/duration-values.js +29 -0
  648. package/dist/facts/duration-values.js.map +1 -0
  649. package/dist/facts/fact-values.d.ts +9 -1
  650. package/dist/facts/fact-values.d.ts.map +1 -1
  651. package/dist/facts/fact-values.js +19 -6
  652. package/dist/facts/fact-values.js.map +1 -1
  653. package/dist/facts/item-amounts.d.ts +18 -0
  654. package/dist/facts/item-amounts.d.ts.map +1 -0
  655. package/dist/facts/item-amounts.js +67 -0
  656. package/dist/facts/item-amounts.js.map +1 -0
  657. package/dist/facts/labelled-facts.d.ts +18 -0
  658. package/dist/facts/labelled-facts.d.ts.map +1 -1
  659. package/dist/facts/labelled-facts.js +71 -13
  660. package/dist/facts/labelled-facts.js.map +1 -1
  661. package/dist/facts/measure-units.d.ts +5 -0
  662. package/dist/facts/measure-units.d.ts.map +1 -0
  663. package/dist/facts/measure-units.js +43 -0
  664. package/dist/facts/measure-units.js.map +1 -0
  665. package/dist/facts/measures.d.ts +23 -4
  666. package/dist/facts/measures.d.ts.map +1 -1
  667. package/dist/facts/measures.js +71 -20
  668. package/dist/facts/measures.js.map +1 -1
  669. package/dist/facts/qualified-labels.d.ts +28 -0
  670. package/dist/facts/qualified-labels.d.ts.map +1 -0
  671. package/dist/facts/qualified-labels.js +96 -0
  672. package/dist/facts/qualified-labels.js.map +1 -0
  673. package/dist/facts/rate-values.d.ts +40 -0
  674. package/dist/facts/rate-values.d.ts.map +1 -0
  675. package/dist/facts/rate-values.js +68 -0
  676. package/dist/facts/rate-values.js.map +1 -0
  677. package/dist/facts/retention-periods.d.ts +51 -0
  678. package/dist/facts/retention-periods.d.ts.map +1 -0
  679. package/dist/facts/retention-periods.js +148 -0
  680. package/dist/facts/retention-periods.js.map +1 -0
  681. package/dist/facts/row-sentence-amounts.d.ts +51 -0
  682. package/dist/facts/row-sentence-amounts.d.ts.map +1 -0
  683. package/dist/facts/row-sentence-amounts.js +71 -0
  684. package/dist/facts/row-sentence-amounts.js.map +1 -0
  685. package/dist/facts/superscript-power.d.ts +3 -0
  686. package/dist/facts/superscript-power.d.ts.map +1 -0
  687. package/dist/facts/superscript-power.js +5 -0
  688. package/dist/facts/superscript-power.js.map +1 -0
  689. package/dist/facts/table-facts.d.ts +18 -2
  690. package/dist/facts/table-facts.d.ts.map +1 -1
  691. package/dist/facts/table-facts.js +16 -6
  692. package/dist/facts/table-facts.js.map +1 -1
  693. package/dist/facts/term-values.d.ts +34 -0
  694. package/dist/facts/term-values.d.ts.map +1 -0
  695. package/dist/facts/term-values.js +195 -0
  696. package/dist/facts/term-values.js.map +1 -0
  697. package/dist/facts/unit-conflicts.d.ts +3 -2
  698. package/dist/facts/unit-conflicts.d.ts.map +1 -1
  699. package/dist/facts/unit-conflicts.js +15 -7
  700. package/dist/facts/unit-conflicts.js.map +1 -1
  701. package/dist/facts/unit-equivalents.d.ts +13 -0
  702. package/dist/facts/unit-equivalents.d.ts.map +1 -0
  703. package/dist/facts/unit-equivalents.js +56 -0
  704. package/dist/facts/unit-equivalents.js.map +1 -0
  705. package/dist/facts/unit-tolerance.d.ts +4 -0
  706. package/dist/facts/unit-tolerance.d.ts.map +1 -0
  707. package/dist/facts/unit-tolerance.js +13 -0
  708. package/dist/facts/unit-tolerance.js.map +1 -0
  709. package/dist/facts/unit-word.d.ts +13 -0
  710. package/dist/facts/unit-word.d.ts.map +1 -0
  711. package/dist/facts/unit-word.js +43 -0
  712. package/dist/facts/unit-word.js.map +1 -0
  713. package/dist/facts/verb-quantity-facts.d.ts +22 -0
  714. package/dist/facts/verb-quantity-facts.d.ts.map +1 -0
  715. package/dist/facts/verb-quantity-facts.js +58 -0
  716. package/dist/facts/verb-quantity-facts.js.map +1 -0
  717. package/dist/facts/whole-counts.d.ts +58 -0
  718. package/dist/facts/whole-counts.d.ts.map +1 -0
  719. package/dist/facts/whole-counts.js +118 -0
  720. package/dist/facts/whole-counts.js.map +1 -0
  721. package/dist/facts/written-precision.d.ts +10 -0
  722. package/dist/facts/written-precision.d.ts.map +1 -0
  723. package/dist/facts/written-precision.js +20 -0
  724. package/dist/facts/written-precision.js.map +1 -0
  725. package/dist/kana-spelling.d.ts +12 -0
  726. package/dist/kana-spelling.d.ts.map +1 -1
  727. package/dist/kana-spelling.js +23 -0
  728. package/dist/kana-spelling.js.map +1 -1
  729. package/dist/model-codes.d.ts +23 -0
  730. package/dist/model-codes.d.ts.map +1 -0
  731. package/dist/model-codes.js +81 -0
  732. package/dist/model-codes.js.map +1 -0
  733. package/dist/name-char-reading.d.ts +16 -0
  734. package/dist/name-char-reading.d.ts.map +1 -0
  735. package/dist/name-char-reading.js +18 -0
  736. package/dist/name-char-reading.js.map +1 -0
  737. package/dist/name-line-block.d.ts +6 -0
  738. package/dist/name-line-block.d.ts.map +1 -0
  739. package/dist/name-line-block.js +35 -0
  740. package/dist/name-line-block.js.map +1 -0
  741. package/dist/name-lookalike-chars.d.ts +16 -0
  742. package/dist/name-lookalike-chars.d.ts.map +1 -0
  743. package/dist/name-lookalike-chars.js +41 -0
  744. package/dist/name-lookalike-chars.js.map +1 -0
  745. package/dist/name-neighbours.d.ts +7 -0
  746. package/dist/name-neighbours.d.ts.map +1 -0
  747. package/dist/name-neighbours.js +55 -0
  748. package/dist/name-neighbours.js.map +1 -0
  749. package/dist/name-ordinary-word.d.ts +13 -0
  750. package/dist/name-ordinary-word.d.ts.map +1 -0
  751. package/dist/name-ordinary-word.js +54 -0
  752. package/dist/name-ordinary-word.js.map +1 -0
  753. package/dist/name-person.d.ts +9 -0
  754. package/dist/name-person.d.ts.map +1 -0
  755. package/dist/name-person.js +25 -0
  756. package/dist/name-person.js.map +1 -0
  757. package/dist/name-separator.d.ts +14 -0
  758. package/dist/name-separator.d.ts.map +1 -0
  759. package/dist/name-separator.js +33 -0
  760. package/dist/name-separator.js.map +1 -0
  761. package/dist/name-spelling-chars.d.ts +16 -0
  762. package/dist/name-spelling-chars.d.ts.map +1 -0
  763. package/dist/name-spelling-chars.js +14 -0
  764. package/dist/name-spelling-chars.js.map +1 -0
  765. package/dist/name-variants.d.ts +10 -9
  766. package/dist/name-variants.d.ts.map +1 -1
  767. package/dist/name-variants.js +32 -88
  768. package/dist/name-variants.js.map +1 -1
  769. package/dist/name-weight.d.ts +10 -0
  770. package/dist/name-weight.d.ts.map +1 -0
  771. package/dist/name-weight.js +7 -0
  772. package/dist/name-weight.js.map +1 -0
  773. package/dist/person-field.d.ts +6 -0
  774. package/dist/person-field.d.ts.map +1 -0
  775. package/dist/person-field.js +40 -0
  776. package/dist/person-field.js.map +1 -0
  777. package/dist/person-full-name.d.ts +12 -0
  778. package/dist/person-full-name.d.ts.map +1 -0
  779. package/dist/person-full-name.js +52 -0
  780. package/dist/person-full-name.js.map +1 -0
  781. package/dist/phone-numbers.d.ts +23 -3
  782. package/dist/phone-numbers.d.ts.map +1 -1
  783. package/dist/phone-numbers.js +68 -23
  784. package/dist/phone-numbers.js.map +1 -1
  785. package/dist/place-names.d.ts +12 -5
  786. package/dist/place-names.d.ts.map +1 -1
  787. package/dist/place-names.js +34 -14
  788. package/dist/place-names.js.map +1 -1
  789. package/dist/plugin.d.ts +7 -0
  790. package/dist/plugin.d.ts.map +1 -1
  791. package/dist/preamble-paragraphs.d.ts +2 -1
  792. package/dist/preamble-paragraphs.d.ts.map +1 -1
  793. package/dist/preamble-paragraphs.js +16 -1
  794. package/dist/preamble-paragraphs.js.map +1 -1
  795. package/dist/product-names.d.ts +33 -0
  796. package/dist/product-names.d.ts.map +1 -0
  797. package/dist/product-names.js +74 -0
  798. package/dist/product-names.js.map +1 -0
  799. package/dist/profile/parse.d.ts.map +1 -1
  800. package/dist/profile/parse.js +11 -0
  801. package/dist/profile/parse.js.map +1 -1
  802. package/dist/reference-numbers.d.ts +26 -0
  803. package/dist/reference-numbers.d.ts.map +1 -0
  804. package/dist/reference-numbers.js +43 -0
  805. package/dist/reference-numbers.js.map +1 -0
  806. package/dist/spaced-person-name.d.ts +17 -0
  807. package/dist/spaced-person-name.d.ts.map +1 -0
  808. package/dist/spaced-person-name.js +82 -0
  809. package/dist/spaced-person-name.js.map +1 -0
  810. package/dist/spacing-code.d.ts +7 -0
  811. package/dist/spacing-code.d.ts.map +1 -0
  812. package/dist/spacing-code.js +30 -0
  813. package/dist/spacing-code.js.map +1 -0
  814. package/dist/structure/amount-range.d.ts +2 -2
  815. package/dist/structure/amount-range.d.ts.map +1 -1
  816. package/dist/structure/amount-range.js +12 -5
  817. package/dist/structure/amount-range.js.map +1 -1
  818. package/dist/structure/annual-holidays.d.ts +56 -0
  819. package/dist/structure/annual-holidays.d.ts.map +1 -0
  820. package/dist/structure/annual-holidays.js +159 -0
  821. package/dist/structure/annual-holidays.js.map +1 -0
  822. package/dist/structure/annual-pay.d.ts +97 -0
  823. package/dist/structure/annual-pay.d.ts.map +1 -0
  824. package/dist/structure/annual-pay.js +236 -0
  825. package/dist/structure/annual-pay.js.map +1 -0
  826. package/dist/structure/bmi.d.ts +63 -0
  827. package/dist/structure/bmi.d.ts.map +1 -0
  828. package/dist/structure/bmi.js +106 -0
  829. package/dist/structure/bmi.js.map +1 -0
  830. package/dist/structure/capacity-count.d.ts +59 -0
  831. package/dist/structure/capacity-count.d.ts.map +1 -0
  832. package/dist/structure/capacity-count.js +118 -0
  833. package/dist/structure/capacity-count.js.map +1 -0
  834. package/dist/structure/change-rate-table.d.ts +46 -0
  835. package/dist/structure/change-rate-table.d.ts.map +1 -0
  836. package/dist/structure/change-rate-table.js +110 -0
  837. package/dist/structure/change-rate-table.js.map +1 -0
  838. package/dist/structure/change-rate.d.ts +13 -1
  839. package/dist/structure/change-rate.d.ts.map +1 -1
  840. package/dist/structure/change-rate.js +51 -19
  841. package/dist/structure/change-rate.js.map +1 -1
  842. package/dist/structure/closing-balance.d.ts +24 -0
  843. package/dist/structure/closing-balance.d.ts.map +1 -0
  844. package/dist/structure/closing-balance.js +79 -0
  845. package/dist/structure/closing-balance.js.map +1 -0
  846. package/dist/structure/column-date-order.d.ts +5 -0
  847. package/dist/structure/column-date-order.d.ts.map +1 -0
  848. package/dist/structure/column-date-order.js +57 -0
  849. package/dist/structure/column-date-order.js.map +1 -0
  850. package/dist/structure/compound-hours.d.ts +5 -0
  851. package/dist/structure/compound-hours.d.ts.map +1 -0
  852. package/dist/structure/compound-hours.js +45 -0
  853. package/dist/structure/compound-hours.js.map +1 -0
  854. package/dist/structure/counted-amounts.d.ts +6 -0
  855. package/dist/structure/counted-amounts.d.ts.map +1 -1
  856. package/dist/structure/counted-amounts.js +4 -4
  857. package/dist/structure/counted-amounts.js.map +1 -1
  858. package/dist/structure/cumulative-below-current.d.ts +21 -0
  859. package/dist/structure/cumulative-below-current.d.ts.map +1 -0
  860. package/dist/structure/cumulative-below-current.js +48 -0
  861. package/dist/structure/cumulative-below-current.js.map +1 -0
  862. package/dist/structure/currency-column.d.ts +21 -0
  863. package/dist/structure/currency-column.d.ts.map +1 -0
  864. package/dist/structure/currency-column.js +74 -0
  865. package/dist/structure/currency-column.js.map +1 -0
  866. package/dist/structure/date-deadline-mark.d.ts +15 -0
  867. package/dist/structure/date-deadline-mark.d.ts.map +1 -0
  868. package/dist/structure/date-deadline-mark.js +22 -0
  869. package/dist/structure/date-deadline-mark.js.map +1 -0
  870. package/dist/structure/date-outside-period.d.ts +8 -2
  871. package/dist/structure/date-outside-period.d.ts.map +1 -1
  872. package/dist/structure/date-outside-period.js +21 -14
  873. package/dist/structure/date-outside-period.js.map +1 -1
  874. package/dist/structure/date-range.d.ts +3 -1
  875. package/dist/structure/date-range.d.ts.map +1 -1
  876. package/dist/structure/date-range.js +5 -7
  877. package/dist/structure/date-range.js.map +1 -1
  878. package/dist/structure/deadline-after-event.d.ts +56 -0
  879. package/dist/structure/deadline-after-event.d.ts.map +1 -0
  880. package/dist/structure/deadline-after-event.js +113 -0
  881. package/dist/structure/deadline-after-event.js.map +1 -0
  882. package/dist/structure/deductible-limit.d.ts +69 -0
  883. package/dist/structure/deductible-limit.d.ts.map +1 -0
  884. package/dist/structure/deductible-limit.js +191 -0
  885. package/dist/structure/deductible-limit.js.map +1 -0
  886. package/dist/structure/definition-use.d.ts +1 -1
  887. package/dist/structure/definition-use.d.ts.map +1 -1
  888. package/dist/structure/definition-use.js +55 -2
  889. package/dist/structure/definition-use.js.map +1 -1
  890. package/dist/structure/discount-rate.d.ts +35 -0
  891. package/dist/structure/discount-rate.d.ts.map +1 -0
  892. package/dist/structure/discount-rate.js +172 -0
  893. package/dist/structure/discount-rate.js.map +1 -0
  894. package/dist/structure/due-date.d.ts.map +1 -1
  895. package/dist/structure/due-date.js +5 -27
  896. package/dist/structure/due-date.js.map +1 -1
  897. package/dist/structure/generic-role.d.ts +2 -0
  898. package/dist/structure/generic-role.d.ts.map +1 -0
  899. package/dist/structure/generic-role.js +8 -0
  900. package/dist/structure/generic-role.js.map +1 -0
  901. package/dist/structure/gpa.d.ts +74 -0
  902. package/dist/structure/gpa.d.ts.map +1 -0
  903. package/dist/structure/gpa.js +170 -0
  904. package/dist/structure/gpa.js.map +1 -0
  905. package/dist/structure/installment-total.d.ts +110 -0
  906. package/dist/structure/installment-total.d.ts.map +1 -0
  907. package/dist/structure/installment-total.js +224 -0
  908. package/dist/structure/installment-total.js.map +1 -0
  909. package/dist/structure/interest.d.ts +22 -0
  910. package/dist/structure/interest.d.ts.map +1 -0
  911. package/dist/structure/interest.js +107 -0
  912. package/dist/structure/interest.js.map +1 -0
  913. package/dist/structure/key-value-row.d.ts +14 -0
  914. package/dist/structure/key-value-row.d.ts.map +1 -0
  915. package/dist/structure/key-value-row.js +38 -0
  916. package/dist/structure/key-value-row.js.map +1 -0
  917. package/dist/structure/lab-columns.d.ts +12 -0
  918. package/dist/structure/lab-columns.d.ts.map +1 -0
  919. package/dist/structure/lab-columns.js +11 -0
  920. package/dist/structure/lab-columns.js.map +1 -0
  921. package/dist/structure/labelled-date-order.d.ts +55 -0
  922. package/dist/structure/labelled-date-order.d.ts.map +1 -0
  923. package/dist/structure/labelled-date-order.js +49 -0
  924. package/dist/structure/labelled-date-order.js.map +1 -0
  925. package/dist/structure/labelled-order.d.ts +59 -0
  926. package/dist/structure/labelled-order.d.ts.map +1 -0
  927. package/dist/structure/labelled-order.js +65 -0
  928. package/dist/structure/labelled-order.js.map +1 -0
  929. package/dist/structure/labelled-time-order.d.ts +17 -0
  930. package/dist/structure/labelled-time-order.d.ts.map +1 -0
  931. package/dist/structure/labelled-time-order.js +79 -0
  932. package/dist/structure/labelled-time-order.js.map +1 -0
  933. package/dist/structure/layout-codes.d.ts +68 -0
  934. package/dist/structure/layout-codes.d.ts.map +1 -0
  935. package/dist/structure/layout-codes.js +161 -0
  936. package/dist/structure/layout-codes.js.map +1 -0
  937. package/dist/structure/line-amount-label.d.ts +31 -0
  938. package/dist/structure/line-amount-label.d.ts.map +1 -0
  939. package/dist/structure/line-amount-label.js +77 -0
  940. package/dist/structure/line-amount-label.js.map +1 -0
  941. package/dist/structure/line-amount-rate.d.ts +47 -0
  942. package/dist/structure/line-amount-rate.d.ts.map +1 -0
  943. package/dist/structure/line-amount-rate.js +141 -0
  944. package/dist/structure/line-amount-rate.js.map +1 -0
  945. package/dist/structure/line-amount-unit.d.ts +7 -0
  946. package/dist/structure/line-amount-unit.d.ts.map +1 -1
  947. package/dist/structure/line-amount-unit.js +11 -0
  948. package/dist/structure/line-amount-unit.js.map +1 -1
  949. package/dist/structure/line-amount.d.ts +33 -7
  950. package/dist/structure/line-amount.d.ts.map +1 -1
  951. package/dist/structure/line-amount.js +152 -42
  952. package/dist/structure/line-amount.js.map +1 -1
  953. package/dist/structure/measured-amounts.d.ts +17 -0
  954. package/dist/structure/measured-amounts.d.ts.map +1 -0
  955. package/dist/structure/measured-amounts.js +110 -0
  956. package/dist/structure/measured-amounts.js.map +1 -0
  957. package/dist/structure/meter-usage-read.d.ts +21 -0
  958. package/dist/structure/meter-usage-read.d.ts.map +1 -0
  959. package/dist/structure/meter-usage-read.js +116 -0
  960. package/dist/structure/meter-usage-read.js.map +1 -0
  961. package/dist/structure/meter-usage.d.ts +62 -0
  962. package/dist/structure/meter-usage.d.ts.map +1 -0
  963. package/dist/structure/meter-usage.js +157 -0
  964. package/dist/structure/meter-usage.js.map +1 -0
  965. package/dist/structure/net-amount.d.ts +81 -0
  966. package/dist/structure/net-amount.d.ts.map +1 -0
  967. package/dist/structure/net-amount.js +161 -0
  968. package/dist/structure/net-amount.js.map +1 -0
  969. package/dist/structure/net-gross-weight.d.ts +30 -0
  970. package/dist/structure/net-gross-weight.d.ts.map +1 -0
  971. package/dist/structure/net-gross-weight.js +79 -0
  972. package/dist/structure/net-gross-weight.js.map +1 -0
  973. package/dist/structure/order-quantity.d.ts +38 -0
  974. package/dist/structure/order-quantity.d.ts.map +1 -0
  975. package/dist/structure/order-quantity.js +104 -0
  976. package/dist/structure/order-quantity.js.map +1 -0
  977. package/dist/structure/party-role.d.ts.map +1 -1
  978. package/dist/structure/party-role.js +4 -1
  979. package/dist/structure/party-role.js.map +1 -1
  980. package/dist/structure/percent-sum.d.ts +2 -0
  981. package/dist/structure/percent-sum.d.ts.map +1 -1
  982. package/dist/structure/percent-sum.js +2 -0
  983. package/dist/structure/percent-sum.js.map +1 -1
  984. package/dist/structure/period-label-conflict.d.ts +52 -0
  985. package/dist/structure/period-label-conflict.d.ts.map +1 -0
  986. package/dist/structure/period-label-conflict.js +105 -0
  987. package/dist/structure/period-label-conflict.js.map +1 -0
  988. package/dist/structure/period-labels.d.ts +36 -0
  989. package/dist/structure/period-labels.d.ts.map +1 -0
  990. package/dist/structure/period-labels.js +86 -0
  991. package/dist/structure/period-labels.js.map +1 -0
  992. package/dist/structure/period-multiple.d.ts +46 -0
  993. package/dist/structure/period-multiple.d.ts.map +1 -0
  994. package/dist/structure/period-multiple.js +123 -0
  995. package/dist/structure/period-multiple.js.map +1 -0
  996. package/dist/structure/quantity-range.d.ts +8 -0
  997. package/dist/structure/quantity-range.d.ts.map +1 -0
  998. package/dist/structure/quantity-range.js +32 -0
  999. package/dist/structure/quantity-range.js.map +1 -0
  1000. package/dist/structure/range-bands.d.ts +77 -0
  1001. package/dist/structure/range-bands.d.ts.map +1 -0
  1002. package/dist/structure/range-bands.js +244 -0
  1003. package/dist/structure/range-bands.js.map +1 -0
  1004. package/dist/structure/range-years.d.ts +18 -0
  1005. package/dist/structure/range-years.d.ts.map +1 -0
  1006. package/dist/structure/range-years.js +60 -0
  1007. package/dist/structure/range-years.js.map +1 -0
  1008. package/dist/structure/ratio.d.ts +136 -0
  1009. package/dist/structure/ratio.d.ts.map +1 -0
  1010. package/dist/structure/ratio.js +214 -0
  1011. package/dist/structure/ratio.js.map +1 -0
  1012. package/dist/structure/reference-flags.d.ts +55 -0
  1013. package/dist/structure/reference-flags.d.ts.map +1 -0
  1014. package/dist/structure/reference-flags.js +116 -0
  1015. package/dist/structure/reference-flags.js.map +1 -0
  1016. package/dist/structure/reference-number-repeated.d.ts +12 -0
  1017. package/dist/structure/reference-number-repeated.d.ts.map +1 -0
  1018. package/dist/structure/reference-number-repeated.js +43 -0
  1019. package/dist/structure/reference-number-repeated.js.map +1 -0
  1020. package/dist/structure/reference-unit.d.ts +24 -0
  1021. package/dist/structure/reference-unit.d.ts.map +1 -0
  1022. package/dist/structure/reference-unit.js +80 -0
  1023. package/dist/structure/reference-unit.js.map +1 -0
  1024. package/dist/structure/rent-multiple.d.ts +56 -0
  1025. package/dist/structure/rent-multiple.d.ts.map +1 -0
  1026. package/dist/structure/rent-multiple.js +139 -0
  1027. package/dist/structure/rent-multiple.js.map +1 -0
  1028. package/dist/structure/revision-direction.d.ts +51 -0
  1029. package/dist/structure/revision-direction.d.ts.map +1 -0
  1030. package/dist/structure/revision-direction.js +163 -0
  1031. package/dist/structure/revision-direction.js.map +1 -0
  1032. package/dist/structure/running-balance.d.ts +36 -0
  1033. package/dist/structure/running-balance.d.ts.map +1 -0
  1034. package/dist/structure/running-balance.js +126 -0
  1035. package/dist/structure/running-balance.js.map +1 -0
  1036. package/dist/structure/scaled-quantities.d.ts +50 -0
  1037. package/dist/structure/scaled-quantities.d.ts.map +1 -0
  1038. package/dist/structure/scaled-quantities.js +170 -0
  1039. package/dist/structure/scaled-quantities.js.map +1 -0
  1040. package/dist/structure/serial-range.d.ts +9 -0
  1041. package/dist/structure/serial-range.d.ts.map +1 -0
  1042. package/dist/structure/serial-range.js +41 -0
  1043. package/dist/structure/serial-range.js.map +1 -0
  1044. package/dist/structure/share-amount.d.ts +55 -0
  1045. package/dist/structure/share-amount.d.ts.map +1 -0
  1046. package/dist/structure/share-amount.js +162 -0
  1047. package/dist/structure/share-amount.js.map +1 -0
  1048. package/dist/structure/shift-times.d.ts +32 -0
  1049. package/dist/structure/shift-times.d.ts.map +1 -0
  1050. package/dist/structure/shift-times.js +112 -0
  1051. package/dist/structure/shift-times.js.map +1 -0
  1052. package/dist/structure/span-label.d.ts +3 -0
  1053. package/dist/structure/span-label.d.ts.map +1 -0
  1054. package/dist/structure/span-label.js +27 -0
  1055. package/dist/structure/span-label.js.map +1 -0
  1056. package/dist/structure/stamp-order.d.ts +16 -0
  1057. package/dist/structure/stamp-order.d.ts.map +1 -0
  1058. package/dist/structure/stamp-order.js +78 -0
  1059. package/dist/structure/stamp-order.js.map +1 -0
  1060. package/dist/structure/stated-multiple.d.ts +39 -0
  1061. package/dist/structure/stated-multiple.d.ts.map +1 -0
  1062. package/dist/structure/stated-multiple.js +49 -0
  1063. package/dist/structure/stated-multiple.js.map +1 -0
  1064. package/dist/structure/stated-period.d.ts +3 -2
  1065. package/dist/structure/stated-period.d.ts.map +1 -1
  1066. package/dist/structure/stated-period.js +17 -11
  1067. package/dist/structure/stated-period.js.map +1 -1
  1068. package/dist/structure/step-times.d.ts +49 -0
  1069. package/dist/structure/step-times.d.ts.map +1 -0
  1070. package/dist/structure/step-times.js +128 -0
  1071. package/dist/structure/step-times.js.map +1 -0
  1072. package/dist/structure/table-scale.d.ts +45 -0
  1073. package/dist/structure/table-scale.d.ts.map +1 -0
  1074. package/dist/structure/table-scale.js +188 -0
  1075. package/dist/structure/table-scale.js.map +1 -0
  1076. package/dist/structure/tax-price.d.ts +29 -0
  1077. package/dist/structure/tax-price.d.ts.map +1 -0
  1078. package/dist/structure/tax-price.js +112 -0
  1079. package/dist/structure/tax-price.js.map +1 -0
  1080. package/dist/structure/tax.d.ts +2 -0
  1081. package/dist/structure/tax.d.ts.map +1 -1
  1082. package/dist/structure/tax.js +46 -23
  1083. package/dist/structure/tax.js.map +1 -1
  1084. package/dist/structure/term-deadline.d.ts +19 -0
  1085. package/dist/structure/term-deadline.d.ts.map +1 -0
  1086. package/dist/structure/term-deadline.js +28 -0
  1087. package/dist/structure/term-deadline.js.map +1 -0
  1088. package/dist/structure/tier-threshold.d.ts +65 -0
  1089. package/dist/structure/tier-threshold.d.ts.map +1 -0
  1090. package/dist/structure/tier-threshold.js +170 -0
  1091. package/dist/structure/tier-threshold.js.map +1 -0
  1092. package/dist/structure/time-range.d.ts +18 -0
  1093. package/dist/structure/time-range.d.ts.map +1 -0
  1094. package/dist/structure/time-range.js +62 -0
  1095. package/dist/structure/time-range.js.map +1 -0
  1096. package/dist/structure/total-line.d.ts +48 -0
  1097. package/dist/structure/total-line.d.ts.map +1 -0
  1098. package/dist/structure/total-line.js +165 -0
  1099. package/dist/structure/total-line.js.map +1 -0
  1100. package/dist/structure/total-row-blank.d.ts +10 -0
  1101. package/dist/structure/total-row-blank.d.ts.map +1 -0
  1102. package/dist/structure/total-row-blank.js +15 -0
  1103. package/dist/structure/total-row-blank.js.map +1 -0
  1104. package/dist/structure/total.d.ts +17 -1
  1105. package/dist/structure/total.d.ts.map +1 -1
  1106. package/dist/structure/total.js +103 -7
  1107. package/dist/structure/total.js.map +1 -1
  1108. package/dist/structure/unlisted-items.d.ts +70 -0
  1109. package/dist/structure/unlisted-items.d.ts.map +1 -0
  1110. package/dist/structure/unlisted-items.js +152 -0
  1111. package/dist/structure/unlisted-items.js.map +1 -0
  1112. package/dist/structure/variance-table.d.ts +34 -0
  1113. package/dist/structure/variance-table.d.ts.map +1 -0
  1114. package/dist/structure/variance-table.js +130 -0
  1115. package/dist/structure/variance-table.js.map +1 -0
  1116. package/dist/structure/walk-time.d.ts +87 -0
  1117. package/dist/structure/walk-time.d.ts.map +1 -0
  1118. package/dist/structure/walk-time.js +195 -0
  1119. package/dist/structure/walk-time.js.map +1 -0
  1120. package/dist/table-names.d.ts +4 -3
  1121. package/dist/table-names.d.ts.map +1 -1
  1122. package/dist/table-names.js +6 -6
  1123. package/dist/table-names.js.map +1 -1
  1124. package/dist/unlabelled-references.d.ts +16 -0
  1125. package/dist/unlabelled-references.d.ts.map +1 -0
  1126. package/dist/unlabelled-references.js +73 -0
  1127. package/dist/unlabelled-references.js.map +1 -0
  1128. package/dist/vehicle-plates.d.ts +28 -0
  1129. package/dist/vehicle-plates.d.ts.map +1 -0
  1130. package/dist/vehicle-plates.js +116 -0
  1131. package/dist/vehicle-plates.js.map +1 -0
  1132. package/dist/whole-word-runs.d.ts +24 -0
  1133. package/dist/whole-word-runs.d.ts.map +1 -0
  1134. package/dist/whole-word-runs.js +26 -0
  1135. package/dist/whole-word-runs.js.map +1 -0
  1136. package/package.json +4 -3
  1137. package/profiles/listing.yaml +20 -0
  1138. package/rules/absolute-exception.yaml +1 -1
  1139. package/rules/ai-generated-composite.yaml +1 -1
  1140. package/rules/ai-tell.yaml +1 -1
  1141. package/rules/amount-range-reversed.yaml +1 -1
  1142. package/rules/amount-scale-consistency.yaml +1 -1
  1143. package/rules/announced-count-mismatch.yaml +2 -2
  1144. package/rules/announcing-opener.yaml +1 -1
  1145. package/rules/annual-holidays-mismatch.yaml +65 -0
  1146. package/rules/annual-pay-mismatch.yaml +64 -0
  1147. package/rules/article-sound.yaml +1 -1
  1148. package/rules/assistant-residue.yaml +1 -1
  1149. package/rules/attachment-not-attached.yaml +1 -1
  1150. package/rules/backorder-mismatch.yaml +57 -0
  1151. package/rules/bmi-mismatch.yaml +63 -0
  1152. package/rules/bold-label-list.yaml +1 -1
  1153. package/rules/broken-link.yaml +1 -1
  1154. package/rules/capacity-runtime-mismatch.yaml +66 -0
  1155. package/rules/change-rate-mismatch.yaml +6 -6
  1156. package/rules/chat-citation-residue.yaml +2 -2
  1157. package/rules/cliche.yaml +2 -2
  1158. package/rules/closing-balance-mismatch.yaml +63 -0
  1159. package/rules/colon-lead-in.yaml +1 -1
  1160. package/rules/comparative-without-baseline.yaml +1 -1
  1161. package/rules/concrete-evidence-density.yaml +1 -1
  1162. package/rules/connection-time-short.yaml +1 -1
  1163. package/rules/contact-variant.yaml +76 -0
  1164. package/rules/contrast-framing.yaml +2 -2
  1165. package/rules/count-over-capacity.yaml +55 -0
  1166. package/rules/cross-doc-broken-link.yaml +1 -1
  1167. package/rules/cross-doc-fact-conflict.yaml +1 -1
  1168. package/rules/cross-doc-term-variant.yaml +1 -1
  1169. package/rules/cumulative-below-current.yaml +59 -0
  1170. package/rules/currency-column-mix.yaml +70 -0
  1171. package/rules/currency-notation-consistency.yaml +2 -2
  1172. package/rules/cushion-phrase-density.yaml +1 -1
  1173. package/rules/dangling-participle.yaml +2 -2
  1174. package/rules/dangling-reference.yaml +1 -1
  1175. package/rules/date-format-consistency.yaml +1 -1
  1176. package/rules/date-outside-period.yaml +5 -5
  1177. package/rules/date-range-reversed.yaml +2 -2
  1178. package/rules/date-stamp-order.yaml +82 -0
  1179. package/rules/date-without-year.yaml +12 -12
  1180. package/rules/deadline-after-event.yaml +72 -0
  1181. package/rules/deductible-exceeds-limit.yaml +54 -0
  1182. package/rules/defined-name-repeated.yaml +3 -3
  1183. package/rules/defined-term-form.yaml +2 -2
  1184. package/rules/delivered-over-ordered.yaml +57 -0
  1185. package/rules/demonstrative-opener-run.yaml +1 -1
  1186. package/rules/discount-rate-mismatch.yaml +66 -0
  1187. package/rules/due-before-issue.yaml +36 -11
  1188. package/rules/duration-mismatch.yaml +16 -7
  1189. package/rules/duration-product-mismatch.yaml +11 -3
  1190. package/rules/elapsed-years-mismatch.yaml +11 -6
  1191. package/rules/email-greeting-closing.yaml +2 -2
  1192. package/rules/empty-conclusion.yaml +1 -1
  1193. package/rules/empty-intensifier.yaml +1 -1
  1194. package/rules/empty-list-item.yaml +1 -1
  1195. package/rules/empty-section.yaml +1 -1
  1196. package/rules/empty-table-cell.yaml +2 -2
  1197. package/rules/expletive-construction.yaml +1 -1
  1198. package/rules/fact-conflict.yaml +21 -4
  1199. package/rules/figurative-density.yaml +1 -1
  1200. package/rules/figure-reference-order.yaml +1 -1
  1201. package/rules/footnote-mismatch.yaml +1 -1
  1202. package/rules/fullwidth-alnum-consistency.yaml +1 -1
  1203. package/rules/gpa-mismatch.yaml +80 -0
  1204. package/rules/heading-echo.yaml +2 -2
  1205. package/rules/heading-end-punctuation-mix.yaml +1 -1
  1206. package/rules/heading-level-skip.yaml +1 -1
  1207. package/rules/heading-numbering-mix.yaml +3 -3
  1208. package/rules/homophone-slip.yaml +1 -1
  1209. package/rules/humble-for-others.yaml +1 -1
  1210. package/rules/idiom-misuse.yaml +1 -1
  1211. package/rules/ime-residue.yaml +1 -1
  1212. package/rules/impossible-date.yaml +10 -6
  1213. package/rules/installment-total-mismatch.yaml +58 -0
  1214. package/rules/interest-mismatch.yaml +50 -0
  1215. package/rules/interval-count-mismatch.yaml +54 -0
  1216. package/rules/invisible-character.yaml +1 -1
  1217. package/rules/kana-function-word.yaml +2 -2
  1218. package/rules/katakana-density.yaml +1 -1
  1219. package/rules/katakana-long-vowel.yaml +2 -2
  1220. package/rules/kutoten-consistency.yaml +1 -1
  1221. package/rules/latin-spacing.yaml +20 -6
  1222. package/rules/layout-code-mismatch.yaml +68 -0
  1223. package/rules/less-for-fewer.yaml +1 -1
  1224. package/rules/line-amount-mismatch.yaml +8 -7
  1225. package/rules/link-text-url-mismatch.yaml +1 -1
  1226. package/rules/list-item-form-mix.yaml +1 -1
  1227. package/rules/lookalike-character.yaml +1 -1
  1228. package/rules/max-kanji-continuous.yaml +1 -1
  1229. package/rules/meter-usage-mismatch.yaml +64 -0
  1230. package/rules/misconversion.yaml +1 -1
  1231. package/rules/modal-conflict.yaml +1 -1
  1232. package/rules/name-variant.yaml +18 -3
  1233. package/rules/net-amount-mismatch.yaml +57 -0
  1234. package/rules/net-over-gross.yaml +57 -0
  1235. package/rules/no-doubled-joshi.yaml +1 -1
  1236. package/rules/no-em-dash.yaml +2 -2
  1237. package/rules/no-mixed-desumasu.yaml +1 -1
  1238. package/rules/no-nakaguro-parallel.yaml +1 -1
  1239. package/rules/nominalization.yaml +1 -1
  1240. package/rules/nonstandard-word.yaml +1 -1
  1241. package/rules/number-style-consistency.yaml +3 -3
  1242. package/rules/number-without-unit.yaml +1 -1
  1243. package/rules/number-word-figure-mismatch.yaml +1 -1
  1244. package/rules/numbering-gap.yaml +1 -1
  1245. package/rules/obligation-without-deadline.yaml +1 -1
  1246. package/rules/ordinal-suffix-mismatch.yaml +1 -1
  1247. package/rules/orthographic-variant.yaml +2 -2
  1248. package/rules/outside-announced-list.yaml +1 -1
  1249. package/rules/padded-intro.yaml +1 -1
  1250. package/rules/paragraph-restatement.yaml +1 -1
  1251. package/rules/party-role-name.yaml +3 -3
  1252. package/rules/percent-sum-mismatch.yaml +2 -2
  1253. package/rules/period-label-conflict.yaml +68 -0
  1254. package/rules/period-multiple-mismatch.yaml +61 -0
  1255. package/rules/period-part-exceeds-whole.yaml +62 -0
  1256. package/rules/person-consistency.yaml +1 -1
  1257. package/rules/phone-number-variant.yaml +3 -3
  1258. package/rules/preamble-length.yaml +2 -2
  1259. package/rules/preferred-term.yaml +2 -2
  1260. package/rules/prerequisite-after-step.yaml +1 -1
  1261. package/rules/product-exceeds-maximum.yaml +49 -0
  1262. package/rules/proper-noun-density.yaml +1 -1
  1263. package/rules/quantity-range-reversed.yaml +53 -0
  1264. package/rules/range-band-mismatch.yaml +70 -0
  1265. package/rules/ratio-mismatch.yaml +64 -0
  1266. package/rules/reference-flag-mismatch.yaml +74 -0
  1267. package/rules/reference-number-repeated.yaml +63 -0
  1268. package/rules/reference-number-variant.yaml +81 -0
  1269. package/rules/reference-title-mismatch.yaml +1 -1
  1270. package/rules/reference-topic-missing.yaml +1 -1
  1271. package/rules/reference-unit-mismatch.yaml +62 -0
  1272. package/rules/relative-date-mismatch.yaml +1 -1
  1273. package/rules/rent-multiple-mismatch.yaml +61 -0
  1274. package/rules/request-without-deadline.yaml +3 -3
  1275. package/rules/required-listed-as-preferred.yaml +1 -1
  1276. package/rules/required-sections.yaml +2 -2
  1277. package/rules/requirement-modal.yaml +2 -2
  1278. package/rules/requirement-smell.yaml +1 -1
  1279. package/rules/revision-direction-mismatch.yaml +66 -0
  1280. package/rules/risk-disclosure.yaml +1 -1
  1281. package/rules/running-balance-mismatch.yaml +59 -0
  1282. package/rules/scaled-quantity-mismatch.yaml +69 -0
  1283. package/rules/serial-range-reversed.yaml +52 -0
  1284. package/rules/share-amount-mismatch.yaml +58 -0
  1285. package/rules/share-over-hundred.yaml +1 -1
  1286. package/rules/shell-prompt-mix.yaml +1 -1
  1287. package/rules/space-before-punctuation.yaml +1 -1
  1288. package/rules/spelling-consistency.yaml +1 -1
  1289. package/rules/step-statement-mix.yaml +3 -3
  1290. package/rules/step-time-sum-mismatch.yaml +65 -0
  1291. package/rules/stock-transition.yaml +1 -1
  1292. package/rules/summary-fact-mismatch.yaml +1 -1
  1293. package/rules/table-header-variant.yaml +1 -1
  1294. package/rules/table-unit-mix.yaml +82 -0
  1295. package/rules/taigen-dome-in-prose.yaml +1 -1
  1296. package/rules/tax-mismatch.yaml +13 -7
  1297. package/rules/tier-threshold-mismatch.yaml +73 -0
  1298. package/rules/time-order.yaml +7 -4
  1299. package/rules/time-range-reversed.yaml +53 -0
  1300. package/rules/title-case-consistency.yaml +2 -2
  1301. package/rules/toc-heading-mismatch.yaml +1 -1
  1302. package/rules/topic-predicate-distance.yaml +1 -1
  1303. package/rules/total-mismatch.yaml +5 -5
  1304. package/rules/ui-label-variant.yaml +1 -1
  1305. package/rules/unclosed-code-fence.yaml +1 -1
  1306. package/rules/uncomparable-graded.yaml +2 -2
  1307. package/rules/undefined-term.yaml +2 -2
  1308. package/rules/unfilled-placeholder.yaml +2 -2
  1309. package/rules/unit-mismatch.yaml +13 -5
  1310. package/rules/unit-spacing-consistency.yaml +1 -1
  1311. package/rules/unknown-word.yaml +1 -1
  1312. package/rules/unlisted-item-used.yaml +90 -0
  1313. package/rules/unused-definition.yaml +2 -2
  1314. package/rules/url-run-on.yaml +1 -1
  1315. package/rules/use-before-definition.yaml +2 -2
  1316. package/rules/vague-deadline.yaml +1 -1
  1317. package/rules/vague-figure-reference.yaml +1 -1
  1318. package/rules/vague-word-density.yaml +2 -2
  1319. package/rules/variance-mismatch.yaml +67 -0
  1320. package/rules/very-adjective.yaml +1 -1
  1321. package/rules/walk-time-distance-mismatch.yaml +55 -0
  1322. package/rules/warning-without-action.yaml +1 -1
  1323. package/rules/weasel-word.yaml +2 -2
  1324. package/rules/wordy-phrase.yaml +2 -2
  1325. package/rules/yori-as-from.yaml +1 -1
  1326. package/skills/chaff/SKILL.md +59 -9
  1327. package/src/announced-count.ts +6 -3
  1328. package/src/company-kana-spelling.ts +105 -0
  1329. package/src/company-names.ts +159 -26
  1330. package/src/contacts/addresses.ts +179 -0
  1331. package/src/contacts/emails.ts +63 -0
  1332. package/src/contacts/table-rows.ts +51 -0
  1333. package/src/contacts/variants.ts +33 -0
  1334. package/src/derived/age-on-date.ts +161 -0
  1335. package/src/derived/battery-runtime.ts +284 -0
  1336. package/src/derived/durations.ts +83 -12
  1337. package/src/derived/hours-and-minutes.ts +41 -0
  1338. package/src/derived/hyphenated-counts.ts +38 -0
  1339. package/src/derived/marked-dates.ts +61 -0
  1340. package/src/derived/money-span.ts +10 -0
  1341. package/src/derived/period-counts.ts +178 -0
  1342. package/src/derived/period-parts.ts +360 -0
  1343. package/src/derived/readable-date.ts +63 -0
  1344. package/src/derived/stays.ts +7 -2
  1345. package/src/derived/time-lengths.ts +12 -9
  1346. package/src/derived/timesheet-hours.ts +112 -0
  1347. package/src/derived/use-interval.ts +151 -0
  1348. package/src/derived/use-maximum.ts +158 -0
  1349. package/src/derived/working-hours.ts +2 -2
  1350. package/src/detectors/announced-count.ts +1 -0
  1351. package/src/detectors/annual-holidays-mismatch.ts +41 -0
  1352. package/src/detectors/annual-pay-mismatch.ts +71 -0
  1353. package/src/detectors/blank-structure.ts +54 -14
  1354. package/src/detectors/bmi-mismatch.ts +82 -0
  1355. package/src/detectors/capacity-runtime.ts +128 -0
  1356. package/src/detectors/change-rate.ts +27 -4
  1357. package/src/detectors/closing-balance-mismatch.ts +52 -0
  1358. package/src/detectors/contact-variant.ts +30 -0
  1359. package/src/detectors/count-over-capacity.ts +37 -0
  1360. package/src/detectors/cumulative-below-current.ts +30 -0
  1361. package/src/detectors/currency-column.ts +37 -0
  1362. package/src/detectors/date-any-year.ts +130 -0
  1363. package/src/detectors/date-outside-period.ts +5 -10
  1364. package/src/detectors/date-stamp-order.ts +29 -0
  1365. package/src/detectors/date-year.ts +55 -13
  1366. package/src/detectors/deductible-exceeds-limit.ts +55 -0
  1367. package/src/detectors/defined-term-form.ts +48 -9
  1368. package/src/detectors/definition-use.ts +6 -2
  1369. package/src/detectors/derived-numbers.ts +52 -91
  1370. package/src/detectors/discount-rate.ts +41 -0
  1371. package/src/detectors/due-date.ts +28 -6
  1372. package/src/detectors/email-letter.ts +45 -15
  1373. package/src/detectors/en-shape.ts +11 -4
  1374. package/src/detectors/event-deadline.ts +39 -0
  1375. package/src/detectors/fact-consistency.ts +206 -7
  1376. package/src/detectors/gloss-year.ts +21 -0
  1377. package/src/detectors/gpa-mismatch.ts +43 -0
  1378. package/src/detectors/heading-case.ts +13 -4
  1379. package/src/detectors/heading-echo.ts +17 -1
  1380. package/src/detectors/impossible-date.ts +25 -3
  1381. package/src/detectors/installment-total-mismatch.ts +68 -0
  1382. package/src/detectors/interest.ts +43 -0
  1383. package/src/detectors/lab-columns.ts +9 -0
  1384. package/src/detectors/labelled-age.ts +154 -0
  1385. package/src/detectors/layout-code.ts +174 -0
  1386. package/src/detectors/line-amount.ts +58 -3
  1387. package/src/detectors/measured-facts.ts +20 -0
  1388. package/src/detectors/meter-usage.ts +49 -0
  1389. package/src/detectors/name-field.ts +43 -0
  1390. package/src/detectors/name-variant-model-codes.ts +27 -0
  1391. package/src/detectors/name-variant.ts +190 -20
  1392. package/src/detectors/net-amount-mismatch.ts +86 -0
  1393. package/src/detectors/net-gross-weight.ts +39 -0
  1394. package/src/detectors/nominal-step.ts +35 -0
  1395. package/src/detectors/number-style.ts +11 -2
  1396. package/src/detectors/order-quantity.ts +46 -0
  1397. package/src/detectors/orthographic-variant.ts +118 -19
  1398. package/src/detectors/orthography.ts +34 -8
  1399. package/src/detectors/period-label-conflict.ts +43 -0
  1400. package/src/detectors/period-multiple-mismatch.ts +54 -0
  1401. package/src/detectors/period-part.ts +71 -0
  1402. package/src/detectors/quantity-range.ts +47 -0
  1403. package/src/detectors/range-band.ts +125 -0
  1404. package/src/detectors/range-words.ts +17 -0
  1405. package/src/detectors/ratio-mismatch.ts +116 -0
  1406. package/src/detectors/readable-dates.ts +36 -0
  1407. package/src/detectors/reference-flag.ts +36 -0
  1408. package/src/detectors/reference-number-repeated.ts +25 -0
  1409. package/src/detectors/reference-number-variant.ts +44 -0
  1410. package/src/detectors/reference-unit.ts +24 -0
  1411. package/src/detectors/registry/annual-holidays-mismatch.ts +4 -0
  1412. package/src/detectors/registry/annual-pay-mismatch.ts +4 -0
  1413. package/src/detectors/registry/backorder-mismatch.ts +4 -0
  1414. package/src/detectors/registry/bmi-mismatch.ts +4 -0
  1415. package/src/detectors/registry/capacity-runtime-mismatch.ts +4 -0
  1416. package/src/detectors/registry/closing-balance-mismatch.ts +4 -0
  1417. package/src/detectors/registry/contact-variant.ts +4 -0
  1418. package/src/detectors/registry/count-over-capacity.ts +4 -0
  1419. package/src/detectors/registry/cumulative-below-current.ts +4 -0
  1420. package/src/detectors/registry/currency-column-mix.ts +4 -0
  1421. package/src/detectors/registry/date-stamp-order.ts +4 -0
  1422. package/src/detectors/registry/deductible-exceeds-limit.ts +4 -0
  1423. package/src/detectors/registry/delivered-over-ordered.ts +4 -0
  1424. package/src/detectors/registry/discount-rate.ts +4 -0
  1425. package/src/detectors/registry/elapsed-years-mismatch.ts +1 -1
  1426. package/src/detectors/registry/event-deadline.ts +4 -0
  1427. package/src/detectors/registry/gpa-mismatch.ts +4 -0
  1428. package/src/detectors/registry/installment-total-mismatch.ts +4 -0
  1429. package/src/detectors/registry/interest.ts +4 -0
  1430. package/src/detectors/registry/interval-count-mismatch.ts +4 -0
  1431. package/src/detectors/registry/layout-code-mismatch.ts +4 -0
  1432. package/src/detectors/registry/meter-usage.ts +4 -0
  1433. package/src/detectors/registry/net-amount-mismatch.ts +4 -0
  1434. package/src/detectors/registry/net-over-gross.ts +4 -0
  1435. package/src/detectors/registry/period-label-conflict.ts +4 -0
  1436. package/src/detectors/registry/period-multiple-mismatch.ts +4 -0
  1437. package/src/detectors/registry/period-part-exceeds-whole.ts +4 -0
  1438. package/src/detectors/registry/product-exceeds-maximum.ts +4 -0
  1439. package/src/detectors/registry/quantity-range.ts +4 -0
  1440. package/src/detectors/registry/range-band-mismatch.ts +4 -0
  1441. package/src/detectors/registry/ratio-mismatch.ts +4 -0
  1442. package/src/detectors/registry/reference-flag-mismatch.ts +4 -0
  1443. package/src/detectors/registry/reference-number-repeated.ts +4 -0
  1444. package/src/detectors/registry/reference-number-variant.ts +4 -0
  1445. package/src/detectors/registry/reference-unit.ts +4 -0
  1446. package/src/detectors/registry/rent-multiple-mismatch.ts +4 -0
  1447. package/src/detectors/registry/revision-direction.ts +4 -0
  1448. package/src/detectors/registry/running-balance.ts +4 -0
  1449. package/src/detectors/registry/scaled-quantity-mismatch.ts +4 -0
  1450. package/src/detectors/registry/serial-range.ts +4 -0
  1451. package/src/detectors/registry/share-amount.ts +4 -0
  1452. package/src/detectors/registry/step-time-sum-mismatch.ts +4 -0
  1453. package/src/detectors/registry/table-unit-mix.ts +4 -0
  1454. package/src/detectors/registry/tier-threshold.ts +4 -0
  1455. package/src/detectors/registry/time-range-reversed.ts +4 -0
  1456. package/src/detectors/registry/unlisted-item-used.ts +4 -0
  1457. package/src/detectors/registry/variance-mismatch.ts +4 -0
  1458. package/src/detectors/registry/walk-time-distance-mismatch.ts +4 -0
  1459. package/src/detectors/relative-dates.ts +2 -1
  1460. package/src/detectors/relative-day-words.ts +2 -1
  1461. package/src/detectors/rent-multiple-mismatch.ts +57 -0
  1462. package/src/detectors/request-owner.ts +5 -2
  1463. package/src/detectors/revision-direction.ts +44 -0
  1464. package/src/detectors/row-sentence-amounts.ts +96 -0
  1465. package/src/detectors/running-balance.ts +31 -0
  1466. package/src/detectors/scaled-quantity.ts +49 -0
  1467. package/src/detectors/serial-range.ts +37 -0
  1468. package/src/detectors/share-amount.ts +51 -0
  1469. package/src/detectors/signals.ts +3 -1
  1470. package/src/detectors/step-time-sum.ts +55 -0
  1471. package/src/detectors/structure-tree.ts +82 -9
  1472. package/src/detectors/structure.ts +1 -1
  1473. package/src/detectors/table-scale.ts +37 -0
  1474. package/src/detectors/tax-amount.ts +45 -13
  1475. package/src/detectors/technical-docs.ts +16 -2
  1476. package/src/detectors/tier-threshold.ts +108 -0
  1477. package/src/detectors/time-order.ts +55 -17
  1478. package/src/detectors/unit-consistency.ts +50 -38
  1479. package/src/detectors/unlisted-items.ts +72 -0
  1480. package/src/detectors/use-count-words.ts +32 -0
  1481. package/src/detectors/use-interval.ts +51 -0
  1482. package/src/detectors/use-maximum.ts +38 -0
  1483. package/src/detectors/variance.ts +33 -0
  1484. package/src/detectors/walk-time-distance-mismatch.ts +45 -0
  1485. package/src/detectors/whole-count-findings.ts +48 -0
  1486. package/src/detectors/working-hours-findings.ts +100 -0
  1487. package/src/facts/age-values.ts +124 -0
  1488. package/src/facts/approximate-tolerance.ts +19 -0
  1489. package/src/facts/cell-keys.ts +21 -0
  1490. package/src/facts/count-labels.ts +28 -0
  1491. package/src/facts/document-terms.ts +107 -0
  1492. package/src/facts/duration-scale.ts +22 -0
  1493. package/src/facts/duration-values.ts +44 -0
  1494. package/src/facts/fact-values.ts +36 -7
  1495. package/src/facts/item-amounts.ts +94 -0
  1496. package/src/facts/labelled-facts.ts +92 -13
  1497. package/src/facts/measure-units.ts +49 -0
  1498. package/src/facts/measures.ts +114 -26
  1499. package/src/facts/qualified-labels.ts +126 -0
  1500. package/src/facts/rate-values.ts +117 -0
  1501. package/src/facts/retention-periods.ts +216 -0
  1502. package/src/facts/row-sentence-amounts.ts +113 -0
  1503. package/src/facts/superscript-power.ts +5 -0
  1504. package/src/facts/table-facts.ts +35 -7
  1505. package/src/facts/term-values.ts +236 -0
  1506. package/src/facts/unit-conflicts.ts +22 -9
  1507. package/src/facts/unit-equivalents.ts +70 -0
  1508. package/src/facts/unit-tolerance.ts +17 -0
  1509. package/src/facts/unit-word.ts +48 -0
  1510. package/src/facts/verb-quantity-facts.ts +84 -0
  1511. package/src/facts/whole-counts.ts +183 -0
  1512. package/src/facts/written-precision.ts +23 -0
  1513. package/src/kana-spelling.ts +25 -0
  1514. package/src/model-codes.ts +104 -0
  1515. package/src/name-char-reading.ts +24 -0
  1516. package/src/name-line-block.ts +40 -0
  1517. package/src/name-lookalike-chars.ts +53 -0
  1518. package/src/name-neighbours.ts +58 -0
  1519. package/src/name-ordinary-word.ts +68 -0
  1520. package/src/name-person.ts +31 -0
  1521. package/src/name-separator.ts +48 -0
  1522. package/src/name-spelling-chars.ts +34 -0
  1523. package/src/name-variants.ts +49 -92
  1524. package/src/name-weight.ts +12 -0
  1525. package/src/person-field.ts +43 -0
  1526. package/src/person-full-name.ts +70 -0
  1527. package/src/phone-numbers.ts +76 -20
  1528. package/src/place-names.ts +53 -14
  1529. package/src/plugin.ts +4 -0
  1530. package/src/preamble-paragraphs.ts +21 -2
  1531. package/src/product-names.ts +98 -0
  1532. package/src/profile/parse.ts +10 -0
  1533. package/src/reference-numbers.ts +55 -0
  1534. package/src/spaced-person-name.ts +97 -0
  1535. package/src/spacing-code.ts +47 -0
  1536. package/src/structure/amount-range.ts +16 -7
  1537. package/src/structure/annual-holidays.ts +222 -0
  1538. package/src/structure/annual-pay.ts +339 -0
  1539. package/src/structure/bmi.ts +133 -0
  1540. package/src/structure/capacity-count.ts +196 -0
  1541. package/src/structure/change-rate-table.ts +135 -0
  1542. package/src/structure/change-rate.ts +54 -17
  1543. package/src/structure/closing-balance.ts +104 -0
  1544. package/src/structure/column-date-order.ts +73 -0
  1545. package/src/structure/compound-hours.ts +49 -0
  1546. package/src/structure/counted-amounts.ts +5 -4
  1547. package/src/structure/cumulative-below-current.ts +66 -0
  1548. package/src/structure/currency-column.ts +97 -0
  1549. package/src/structure/date-deadline-mark.ts +30 -0
  1550. package/src/structure/date-outside-period.ts +28 -15
  1551. package/src/structure/date-range.ts +7 -10
  1552. package/src/structure/deadline-after-event.ts +184 -0
  1553. package/src/structure/deductible-limit.ts +255 -0
  1554. package/src/structure/definition-use.ts +59 -2
  1555. package/src/structure/discount-rate.ts +209 -0
  1556. package/src/structure/due-date.ts +8 -32
  1557. package/src/structure/generic-role.ts +8 -0
  1558. package/src/structure/gpa.ts +218 -0
  1559. package/src/structure/installment-total.ts +343 -0
  1560. package/src/structure/interest.ts +133 -0
  1561. package/src/structure/key-value-row.ts +45 -0
  1562. package/src/structure/lab-columns.ts +21 -0
  1563. package/src/structure/labelled-date-order.ts +100 -0
  1564. package/src/structure/labelled-order.ts +122 -0
  1565. package/src/structure/labelled-time-order.ts +100 -0
  1566. package/src/structure/layout-codes.ts +210 -0
  1567. package/src/structure/line-amount-label.ts +100 -0
  1568. package/src/structure/line-amount-rate.ts +178 -0
  1569. package/src/structure/line-amount-unit.ts +16 -0
  1570. package/src/structure/line-amount.ts +200 -48
  1571. package/src/structure/measured-amounts.ts +138 -0
  1572. package/src/structure/meter-usage-read.ts +139 -0
  1573. package/src/structure/meter-usage.ts +224 -0
  1574. package/src/structure/net-amount.ts +243 -0
  1575. package/src/structure/net-gross-weight.ts +97 -0
  1576. package/src/structure/order-quantity.ts +125 -0
  1577. package/src/structure/party-role.ts +4 -1
  1578. package/src/structure/percent-sum.ts +3 -0
  1579. package/src/structure/period-label-conflict.ts +174 -0
  1580. package/src/structure/period-labels.ts +147 -0
  1581. package/src/structure/period-multiple.ts +186 -0
  1582. package/src/structure/quantity-range.ts +47 -0
  1583. package/src/structure/range-bands.ts +316 -0
  1584. package/src/structure/range-years.ts +75 -0
  1585. package/src/structure/ratio.ts +296 -0
  1586. package/src/structure/reference-flags.ts +156 -0
  1587. package/src/structure/reference-number-repeated.ts +57 -0
  1588. package/src/structure/reference-unit.ts +105 -0
  1589. package/src/structure/rent-multiple.ts +207 -0
  1590. package/src/structure/revision-direction.ts +214 -0
  1591. package/src/structure/running-balance.ts +157 -0
  1592. package/src/structure/scaled-quantities.ts +239 -0
  1593. package/src/structure/serial-range.ts +52 -0
  1594. package/src/structure/share-amount.ts +206 -0
  1595. package/src/structure/shift-times.ts +136 -0
  1596. package/src/structure/span-label.ts +26 -0
  1597. package/src/structure/stamp-order.ts +100 -0
  1598. package/src/structure/stated-multiple.ts +82 -0
  1599. package/src/structure/stated-period.ts +23 -11
  1600. package/src/structure/step-times.ts +169 -0
  1601. package/src/structure/table-scale.ts +239 -0
  1602. package/src/structure/tax-price.ts +136 -0
  1603. package/src/structure/tax.ts +55 -20
  1604. package/src/structure/term-deadline.ts +35 -0
  1605. package/src/structure/tier-threshold.ts +218 -0
  1606. package/src/structure/time-range.ts +70 -0
  1607. package/src/structure/total-line.ts +232 -0
  1608. package/src/structure/total-row-blank.ts +23 -0
  1609. package/src/structure/total.ts +156 -12
  1610. package/src/structure/unlisted-items.ts +207 -0
  1611. package/src/structure/variance-table.ts +167 -0
  1612. package/src/structure/walk-time.ts +285 -0
  1613. package/src/table-names.ts +6 -6
  1614. package/src/unlabelled-references.ts +83 -0
  1615. package/src/vehicle-plates.ts +142 -0
  1616. package/src/whole-word-runs.ts +38 -0
@@ -0,0 +1,296 @@
1
+ /**
2
+ * ratio-mismatch: the deciding half. A ratio written in percent (営業利益率 7.3%, Operating margin 7.5%) against the numerator
3
+ * and the denominator it names (営業利益 ÷ 売上高), in a results table or in one sentence. Which ratio names which two rows is
4
+ * data (lexicons ratio-label and ratio-term); nothing here knows a word of accounting. Pure.
5
+ */
6
+ import type { StructureNode } from "../plugin.ts";
7
+ import { inDocumentOrder } from "./issues.ts";
8
+
9
+ /** An amount as written: its value in the unit it is written in, the step of its last written digit, and that unit. */
10
+ export type Figure = { readonly start: number; readonly value: number; readonly step: number; readonly unit: string };
11
+
12
+ /** A ratio as written: its value in percent and the number of its decimals. */
13
+ export type WrittenRate = { readonly start: number; readonly value: number; readonly decimals: number };
14
+
15
+ /** A ratio label and the names of the terms it divides (営業利益率 → operating-profit / sales). */
16
+ export type RatioLabel = { readonly pattern: string; readonly numerator: string; readonly denominator: string };
17
+
18
+ export type RatioTerm = { readonly pattern: string; readonly term: string };
19
+
20
+ export type RatioWords = { readonly labels: readonly RatioLabel[]; readonly terms: readonly RatioTerm[]; readonly percentUnits: readonly string[] };
21
+
22
+ export type RatioIssue = { readonly offset: number; readonly values: Readonly<Record<string, string>> };
23
+
24
+ const PERCENT = 100;
25
+ const HALF = 0.5;
26
+ const DECIMAL_BASE = 10;
27
+ /** Floating error must not push a ratio that sits on the edge of its rounding out of it. */
28
+ const FLOAT_SLACK = 1e-9;
29
+
30
+ /** The ratio written as a decimal-point string of the written precision (7.3, 12.50). */
31
+ const shown = (value: number, decimals: number): string => value.toFixed(decimals);
32
+
33
+ /**
34
+ * The ratio the two amounts give, when the written ratio cannot be it; undefined when it can or when they cannot be compared.
35
+ * The written ratio stands for the half step of its last digit around it (7.3% is 7.25% to 7.35%). Each amount may be off by a
36
+ * whole step of its last digit, not half: results tables round down (百万円未満切捨て) as often as to nearest, and the margin is
37
+ * worked out from the unrounded amounts.
38
+ */
39
+ export const ratioDisagreement = (rate: WrittenRate, numerator: Figure, denominator: Figure): string | undefined => {
40
+ if (numerator.unit !== denominator.unit || numerator.value < 0 || denominator.value - denominator.step <= 0) return undefined;
41
+ const lowest = (Math.max(0, numerator.value - numerator.step) / (denominator.value + denominator.step)) * PERCENT;
42
+ const highest = ((numerator.value + numerator.step) / (denominator.value - denominator.step)) * PERCENT;
43
+ const half = HALF * DECIMAL_BASE ** -rate.decimals + FLOAT_SLACK;
44
+ if (rate.value + half >= lowest && rate.value - half <= highest) return undefined;
45
+ return shown((numerator.value / denominator.value) * PERCENT, rate.decimals);
46
+ };
47
+
48
+ /** The words compared: NFKC, lower case, one space. */
49
+ export const keyOf = (text: string): string => text.normalize("NFKC").toLowerCase().replace(/\s+/gu, " ").trim();
50
+
51
+ const PREFIX = /^[^\d\s]*/u;
52
+ const NUMBER = /^(\d{1,3}(?:,\d{3})+|\d+)(?:\.(\d+))?/u;
53
+ /** Marks that make an amount negative or a note ((1,200), ▲50, -50, +3%): such a cell is not read. */
54
+ const SIGNED = /[-−▲△++((]/u;
55
+ const DIGIT = /\d/u;
56
+
57
+ /** The value of a number written with grouping commas and its decimals apart ("1,320" and "5"). */
58
+ const numberOf = (integer: string, decimals: string): number => Number([integer.replaceAll(",", ""), decimals].filter((part) => part !== "").join("."));
59
+
60
+ export type ReadCell = { readonly prefix: string; readonly value: number; readonly decimals: number; readonly suffix: string };
61
+
62
+ /** A cell holding one number with what is written before and after it ("$2,400 million", "1,320百万円", "7.3%"). */
63
+ export const readNumber = (text: string): ReadCell | undefined => {
64
+ const plain = text.normalize("NFKC").trim();
65
+ const prefix = PREFIX.exec(plain)?.[0] ?? "";
66
+ const number = NUMBER.exec(plain.slice(prefix.length));
67
+ if (number === null || SIGNED.test(prefix)) return undefined;
68
+ const suffix = plain.slice(prefix.length + number[0].length).trim();
69
+ if (DIGIT.test(suffix) || SIGNED.test(suffix)) return undefined;
70
+ const decimals = number[2] ?? "";
71
+ return { prefix, value: numberOf(number[1] ?? "", decimals), decimals: decimals.length, suffix };
72
+ };
73
+
74
+ /** A cell read as a percentage: a percent unit after the number, or nothing after it when the row says it is in percent. */
75
+ export const cellRate = (text: string, start: number, percentUnits: readonly string[], rowInPercent: boolean): WrittenRate | undefined => {
76
+ const cell = readNumber(text);
77
+ if (cell === undefined || cell.prefix !== "") return undefined;
78
+ const inPercent = percentUnits.some((unit) => keyOf(unit) === keyOf(cell.suffix)) || (rowInPercent && cell.suffix === "");
79
+ return inPercent ? { start, value: cell.value, decimals: cell.decimals } : undefined;
80
+ };
81
+
82
+ /** A cell read as an amount, in the unit written around its number. A percentage is not an amount. */
83
+ export const cellFigure = (text: string, start: number, percentUnits: readonly string[]): Figure | undefined => {
84
+ const cell = readNumber(text);
85
+ if (cell === undefined || percentUnits.some((unit) => keyOf(unit) === keyOf(cell.suffix))) return undefined;
86
+ return { start, value: cell.value, step: DECIMAL_BASE ** -cell.decimals, unit: `${keyOf(cell.prefix)}|${keyOf(cell.suffix)}` };
87
+ };
88
+
89
+ export type TableCell = { readonly start: number; readonly text: string };
90
+
91
+ /** A table row: its label (the first cell, as written) and the cells after it. */
92
+ export type TableRow = { readonly label: string; readonly cells: readonly TableCell[] };
93
+
94
+ /** A note in brackets after a row label (営業利益率(%), Net sales (millions)): not part of the label. */
95
+ const LABEL_NOTE = /[((][^()()]*[))]$/u;
96
+
97
+ export const labelKey = (label: string): string => keyOf(label.replace(LABEL_NOTE, ""));
98
+
99
+ export const noteOf = (label: string): string => LABEL_NOTE.exec(label.normalize("NFKC").trim())?.[0] ?? "";
100
+
101
+ /** The one row whose label is a term of the name; undefined when no row or more than one row is. */
102
+ const onlyRow = (rows: readonly TableRow[], terms: readonly RatioTerm[], name: string): TableRow | undefined => {
103
+ const patterns = terms.filter((term) => term.term === name).map((term) => keyOf(term.pattern));
104
+ const found = rows.filter((row) => patterns.includes(labelKey(row.label)));
105
+ return found.length === 1 ? found[0] : undefined;
106
+ };
107
+
108
+ /** An amount cell, in its unit and the unit its row label notes (Net sales (thousand yen)): rows noted differently differ. */
109
+ const rowFigure = (cell: TableCell, row: TableRow, percentUnits: readonly string[]): Figure | undefined => {
110
+ const figure = cellFigure(cell.text, cell.start, percentUnits);
111
+ return figure === undefined ? undefined : { ...figure, unit: `${figure.unit}|${keyOf(noteOf(row.label))}` };
112
+ };
113
+
114
+ const sameWidth = (rows: readonly TableRow[]): boolean => rows.every((row) => row.cells.length === rows[0]?.cells.length);
115
+
116
+ const columnIssues = (ratioRow: TableRow, numeratorRow: TableRow, denominatorRow: TableRow, words: RatioWords): RatioIssue[] => {
117
+ const inPercent = words.percentUnits.some((unit) => noteOf(ratioRow.label).includes(unit.normalize("NFKC")));
118
+ return ratioRow.cells.flatMap((cell, column) => {
119
+ const rate = cellRate(cell.text, cell.start, words.percentUnits, inPercent);
120
+ const top = numeratorRow.cells[column];
121
+ const bottom = denominatorRow.cells[column];
122
+ const numerator = top === undefined ? undefined : rowFigure(top, numeratorRow, words.percentUnits);
123
+ const denominator = bottom === undefined ? undefined : rowFigure(bottom, denominatorRow, words.percentUnits);
124
+ if (rate === undefined || numerator === undefined || denominator === undefined) return [];
125
+ const computed = ratioDisagreement(rate, numerator, denominator);
126
+ return computed === undefined ? [] : [{ offset: rate.start, values: { written: shown(rate.value, rate.decimals), computed } }];
127
+ });
128
+ };
129
+
130
+ /**
131
+ * In one table, each row labelled with a ratio against the one row of its numerator and the one row of its denominator,
132
+ * column by column. A table whose three rows do not have the same number of cells is not read: its columns may not line up.
133
+ */
134
+ export const tableRatioMismatches = (rows: readonly TableRow[], words: RatioWords): RatioIssue[] =>
135
+ rows.flatMap((ratioRow) => {
136
+ const label = words.labels.find((entry) => keyOf(entry.pattern) === labelKey(ratioRow.label));
137
+ if (label === undefined) return [];
138
+ const numeratorRow = onlyRow(rows, words.terms, label.numerator);
139
+ const denominatorRow = onlyRow(rows, words.terms, label.denominator);
140
+ if (numeratorRow === undefined || denominatorRow === undefined || !sameWidth([ratioRow, numeratorRow, denominatorRow])) return [];
141
+ return columnIssues(ratioRow, numeratorRow, denominatorRow, words).map((issue) => ({
142
+ offset: issue.offset,
143
+ values: { ...issue.values, ratio: ratioRow.label.trim() },
144
+ }));
145
+ });
146
+
147
+ /** How amounts are written around their number: currency marks before and after it, and words of magnitude (million, 万). */
148
+ export type AmountWords = {
149
+ readonly before: readonly string[];
150
+ readonly after: readonly string[];
151
+ readonly multipliers: readonly string[];
152
+ readonly percentUnits: readonly string[];
153
+ };
154
+
155
+ /** A quantity the structure tree read: where it stands in the document and the unit it names (円, $, %, 社). */
156
+ export type ProseQuantity = { readonly start: number; readonly end: number; readonly unit: string };
157
+
158
+ /** The tree's quantities, in document order. */
159
+ export const proseQuantitiesOf = (tree: StructureNode | undefined): ProseQuantity[] =>
160
+ tree === undefined
161
+ ? []
162
+ : inDocumentOrder(tree).flatMap((node) =>
163
+ node.kind === "quantity" ? [{ start: node.span.start, end: node.span.end, unit: String(node.attrs["unit"] ?? "") }] : [],
164
+ );
165
+
166
+ const PROSE_NUMBER = /(?<![\d.,])(\d{1,3}(?:,\d{3})+|\d+)(?:\.(\d+))?(?![\d,.]\d)/gu;
167
+ const NEGATIVE_BEFORE = /[-−▲△]$/u;
168
+ /** Words after the quantity ("$198 million", "1,320 million yen"). */
169
+ const WORDS_AFTER = /^\s+([A-Za-z]+)(?:\s+([A-Za-z]+))?/u;
170
+
171
+ /** The currency mark before a number, which may stand one space apart ($5, € 5, US$5), and the text before that mark. */
172
+ const markBefore = (before: string, marks: readonly string[]): { readonly mark: string; readonly rest: string } => {
173
+ const gapped = before.endsWith(" ") ? before.slice(0, -1) : before;
174
+ const mark = marks.filter((entry) => gapped.endsWith(entry)).toSorted((left, right) => right.length - left.length)[0];
175
+ return mark === undefined ? { mark: "", rest: before } : { mark, rest: gapped.slice(0, gapped.length - mark.length) };
176
+ };
177
+
178
+ /**
179
+ * An amount of money as written in prose. The mark is the currency written before the number ($, US$); the suffix is what is
180
+ * written after it: the magnitude and the mark inside the quantity (百万円 of 96百万円), or up to two words of magnitude or
181
+ * currency (million, million yen). Both are compared as written (NFKC, lower case), so US$ and $ differ, and so do 百万円 and
182
+ * 億円. writtenStart and writtenEnd are where the whole amount, its marks and words included, stands.
183
+ */
184
+ export type ProseFigure = Figure & { readonly mark: string; readonly suffix: string; readonly writtenStart: number; readonly writtenEnd: number };
185
+
186
+ /** Up to two words of magnitude or currency after the quantity, and where they end. */
187
+ const wordsAfter = (after: string, words: AmountWords): { readonly named: string; readonly length: number } => {
188
+ const units = [...words.multipliers, ...words.after].map((word) => word.toLowerCase());
189
+ const found = WORDS_AFTER.exec(after);
190
+ const [first = "", second = ""] = [found?.[1] ?? "", found?.[2] ?? ""];
191
+ if (found === null || !units.includes(first.toLowerCase())) return { named: "", length: 0 };
192
+ if (!units.includes(second.toLowerCase())) return { named: first, length: after.indexOf(first) + first.length };
193
+ return { named: `${first} ${second}`, length: found[0].length };
194
+ };
195
+
196
+ /** What a piece of text holds: amounts of money, percentages, and the other numbers (years, counts), by where they start. */
197
+ export type ProseValues = { readonly figures: readonly ProseFigure[]; readonly rates: readonly WrittenRate[]; readonly others: readonly number[] };
198
+
199
+ type ProseNumber = { readonly figure: ProseFigure } | { readonly rate: WrittenRate } | { readonly other: number };
200
+
201
+ type NumberRead = { readonly start: number; readonly value: number; readonly decimals: number };
202
+
203
+ const figureOf = (text: string, offset: number, match: RegExpExecArray, quantity: ProseQuantity, words: AmountWords): ProseFigure => {
204
+ const { mark, rest } = markBefore(text.slice(0, match.index), words.before);
205
+ const [end, quantityEnd] = [match.index + match[0].length, quantity.end - offset];
206
+ const after = wordsAfter(text.slice(quantityEnd), words);
207
+ const [mine, suffix] = [keyOf(mark), keyOf(`${text.slice(end, quantityEnd)} ${after.named}`)];
208
+ const decimals = match[2] ?? "";
209
+ const written = { writtenStart: offset + (mark === "" ? match.index : rest.length), writtenEnd: offset + quantityEnd + after.length };
210
+ const value = numberOf(match[1] ?? "", decimals);
211
+ return { start: offset + match.index, value, step: DECIMAL_BASE ** -decimals.length, unit: `${mine}|${suffix}`, mark: mine, suffix, ...written };
212
+ };
213
+
214
+ const proseNumber = (text: string, offset: number, match: RegExpExecArray, quantities: readonly ProseQuantity[], words: AmountWords): ProseNumber[] => {
215
+ if (NEGATIVE_BEFORE.test(markBefore(text.slice(0, match.index), words.before).rest)) return [];
216
+ const decimals = match[2] ?? "";
217
+ const read: NumberRead = { start: offset + match.index, value: numberOf(match[1] ?? "", decimals), decimals: decimals.length };
218
+ const quantity = quantities.find((entry) => entry.start === read.start);
219
+ if (quantity === undefined) return [{ other: read.start }];
220
+ if (words.percentUnits.includes(quantity.unit)) return [{ rate: read }];
221
+ if (![...words.before, ...words.after].includes(quantity.unit)) return [{ other: read.start }];
222
+ return [{ figure: figureOf(text, offset, match, quantity, words) }];
223
+ };
224
+
225
+ /**
226
+ * The numbers of a piece of text, read with the tree's quantities (offset is where the text starts in the document, and the
227
+ * quantities are in the same coordinates). A quantity in a currency is an amount of money and one in a percent unit a
228
+ * percentage; any other number (a count, a year, the first of a range) is kept only by where it starts. Signed numbers (-5,
229
+ * ▲5, -$5) are not read at all.
230
+ */
231
+ export const proseValues = (text: string, offset: number, quantities: readonly ProseQuantity[], words: AmountWords): ProseValues => {
232
+ const numbers = [...text.matchAll(PROSE_NUMBER)].flatMap((match) => proseNumber(text, offset, match, quantities, words));
233
+ return {
234
+ figures: numbers.flatMap((number) => ("figure" in number ? [number.figure] : [])),
235
+ rates: numbers.flatMap((number) => ("rate" in number ? [number.rate] : [])),
236
+ others: numbers.flatMap((number) => ("other" in number ? [number.other] : [])),
237
+ };
238
+ };
239
+
240
+ /** A word of the lexicons found in a sentence. */
241
+ export type LabelHit = { readonly start: number; readonly end: number } & ({ readonly label: RatioLabel } | { readonly term: string });
242
+
243
+ /** What one sentence holds: where it ends, the words found in it, and its numbers. */
244
+ export type RatioSentence = Omit<ProseValues, "figures"> & {
245
+ readonly figures: readonly Figure[];
246
+ readonly end: number;
247
+ readonly hits: readonly LabelHit[];
248
+ };
249
+
250
+ /** How far after its word a value may start (「営業利益は」, "net sales of", "an operating margin of"). */
251
+ const MAX_GAP = 16;
252
+
253
+ type Value = { readonly start: number } & ({ readonly figure: Figure } | { readonly rate: WrittenRate } | { readonly other: true });
254
+
255
+ const valuesOf = (sentence: RatioSentence): Value[] => [
256
+ ...sentence.figures.map((figure) => ({ start: figure.start, figure })),
257
+ ...sentence.rates.map((rate) => ({ start: rate.start, rate })),
258
+ ...sentence.others.map((start): Value => ({ start, other: true })),
259
+ ];
260
+
261
+ /**
262
+ * The value of a word: the only number between it and the next word of the lexicons (or the end of the sentence), close to
263
+ * it. Two numbers there (「前期の84百万円から96百万円に」, "in 2026 was $198 million") leave it unknown.
264
+ */
265
+ const valueAfter = (hit: LabelHit, sentence: RatioSentence): Value | undefined => {
266
+ const until = Math.min(sentence.end, ...sentence.hits.filter((other) => other.start >= hit.end).map((other) => other.start));
267
+ const between = valuesOf(sentence).filter((value) => value.start >= hit.end && value.start < until);
268
+ const only = between.length === 1 ? between[0] : undefined;
269
+ return only !== undefined && only.start - hit.end <= MAX_GAP ? only : undefined;
270
+ };
271
+
272
+ const termHits = (sentence: RatioSentence, name: string): LabelHit[] => sentence.hits.filter((hit) => "term" in hit && hit.term === name);
273
+
274
+ const figureAfter = (hits: readonly LabelHit[], sentence: RatioSentence): Figure | undefined => {
275
+ const hit = hits.length === 1 ? hits[0] : undefined;
276
+ const value = hit === undefined ? undefined : valueAfter(hit, sentence);
277
+ return value !== undefined && "figure" in value ? value.figure : undefined;
278
+ };
279
+
280
+ /**
281
+ * One sentence that names a ratio, its numerator and its denominator, each once, each with its value right after it
282
+ * (「営業利益は96百万円、売上高は1,320百万円で、営業利益率は7.3%」). Any other shape is not read.
283
+ */
284
+ export const sentenceRatioMismatch = (sentence: RatioSentence): RatioIssue | undefined => {
285
+ const ratios = sentence.hits.filter((hit) => "label" in hit);
286
+ const ratio = ratios.length === 1 ? ratios[0] : undefined;
287
+ if (ratio === undefined || !("label" in ratio)) return undefined;
288
+ const value = valueAfter(ratio, sentence);
289
+ const numerator = figureAfter(termHits(sentence, ratio.label.numerator), sentence);
290
+ const denominator = figureAfter(termHits(sentence, ratio.label.denominator), sentence);
291
+ if (value === undefined || !("rate" in value) || numerator === undefined || denominator === undefined) return undefined;
292
+ const computed = ratioDisagreement(value.rate, numerator, denominator);
293
+ return computed === undefined
294
+ ? undefined
295
+ : { offset: value.start, values: { written: shown(value.rate.value, value.rate.decimals), computed, ratio: ratio.label.pattern } };
296
+ };
@@ -0,0 +1,156 @@
1
+ // reference-flag-mismatch: a row of a lab or checkup results table whose flag (H, L, 高, 低, 基準内, Normal) says the opposite of
2
+ // where its value stands against the reference range on the same row. The column headings, the flags and the bound marks come
3
+ // from the lexicons (lab-result-column with reference-column-heading, reference-flag, range-band-word, reference-bound-mark). Pure.
4
+ import { cellsOf, tablesOf, type Cell } from "../facts/table-facts.ts";
5
+ import { withoutEdgeMarks } from "../facts/trim-marks.ts";
6
+ import { labColumnsOf, type LabColumnWord } from "./lab-columns.ts";
7
+ import { linesOf, type Line } from "./lines.ts";
8
+ import { parseBand, type Band, type BandWords, type Bound } from "./range-bands.ts";
9
+
10
+ /** What a flag says: above the range, below it, inside it, or outside it on either side (基準外, *). */
11
+ export type FlagMeaning = "high" | "low" | "normal" | "outside";
12
+
13
+ export type ReferenceWords = {
14
+ readonly headings: readonly LabColumnWord[];
15
+ readonly flags: readonly { readonly pattern: string; readonly meaning: FlagMeaning }[];
16
+ /** How a range is read: range-band-word with the reference marks (≤, >), and no units (the row's own unit is taken out first). */
17
+ readonly band: BandWords;
18
+ };
19
+
20
+ export type Position = "below" | "inside" | "above";
21
+
22
+ /**
23
+ * "inside": flagged high, low or outside although inside the range. "outside": flagged normal although outside it. "below": flagged
24
+ * high although below the range; "above": flagged low although above it.
25
+ */
26
+ export type FlagSlipKind = "inside" | "outside" | "below" | "above";
27
+
28
+ export type FlagSlip = {
29
+ readonly kind: FlagSlipKind;
30
+ readonly item: string;
31
+ readonly value: string;
32
+ readonly range: string;
33
+ readonly flag: Cell;
34
+ };
35
+
36
+ /** A result cell: one number and what follows it (its unit, possibly nothing). */
37
+ export type ReadValue = { readonly number: number; readonly unit: string };
38
+
39
+ const DIGITS = /^(?:\d{1,3}(?:,\d{3})+|\d+)(?:\.\d+)?/u;
40
+ const STARTS_NUMERIC = /^[\d.,]/u;
41
+ /** A unit has no figure and no note: 1.2/1, 88 (fasting) and 3.5 x10^4/μL are not a number and its unit. */
42
+ const NOT_A_UNIT = /[\d()[\]]/u;
43
+ const NOTE_OPEN = /[([]/u;
44
+ /** A unit is a whole word when no Latin or Greek letter runs on from it: cm in 90 cm未満, not the l of less. */
45
+ const LETTER = /[\p{Script=Latin}\p{Script=Greek}]/u;
46
+ const SPACES = /\s+/gu;
47
+
48
+ const normalized = (text: string): string => withoutEdgeMarks(text.normalize("NFKC").toLowerCase().replace(SPACES, " ").trim());
49
+
50
+ /** The number of a result cell and the unit after it; undefined when the cell is not a plain number (<0.5, 陰性, —). */
51
+ export const valueOf = (text: string): ReadValue | undefined => {
52
+ const plain = normalized(text);
53
+ const digits = DIGITS.exec(plain)?.[0];
54
+ if (digits === undefined) return undefined;
55
+ const unit = plain.slice(digits.length).trim();
56
+ if (STARTS_NUMERIC.test(unit) || NOT_A_UNIT.test(unit)) return undefined;
57
+ return { number: Number(digits.replaceAll(",", "")), unit };
58
+ };
59
+
60
+ const isLetterAt = (text: string, index: number): boolean => LETTER.test(text.charAt(index));
61
+
62
+ /** The text with every whole occurrence of the unit blanked out: mg/dL in "30〜149 mg/dL", not the l of "less". */
63
+ const withoutUnit = (text: string, unit: string): string => {
64
+ if (unit === "") return text;
65
+ const at = text.indexOf(unit);
66
+ if (at === -1) return text;
67
+ const end = at + unit.length;
68
+ const whole = !(LETTER.test(unit.charAt(0)) && isLetterAt(text, at - 1)) && !(LETTER.test(unit.charAt(unit.length - 1)) && isLetterAt(text, end));
69
+ const head = text.slice(0, at) + (whole ? " " : unit);
70
+ return head + withoutUnit(text.slice(end), unit);
71
+ };
72
+
73
+ /**
74
+ * The reference range of a row, read once the row's unit is taken out: 30〜149 mg/dL, 79 U/L 以下, ≤79, below 102 cm. undefined
75
+ * when anything else is left (another unit, a range for men and one for women, a note), so a row in two units is not read.
76
+ */
77
+ export const rangeOf = (text: string, unit: string, words: ReferenceWords): Band | undefined => {
78
+ const bare = withoutUnit(normalized(text), unit);
79
+ return NOTE_OPEN.test(bare) ? undefined : parseBand(bare, words.band);
80
+ };
81
+
82
+ /** A heading without the unit in brackets at its end: Result (mg/dL), 結果(mg/dL). */
83
+ const headingKeyOf = (heading: string): string => {
84
+ const key = normalized(heading);
85
+ const open = key.lastIndexOf("(");
86
+ return key.endsWith(")") && open > 0 ? key.slice(0, open).trim() : key;
87
+ };
88
+
89
+ /** A flag compared as written: emphasis marks dropped, unless the flag is only such a mark (*). */
90
+ const flagKeyOf = (text: string): string => {
91
+ const plain = normalized(text);
92
+ return plain === "" ? text.normalize("NFKC").trim().toLowerCase() : plain;
93
+ };
94
+
95
+ /** What a flag cell says, by the flag lexicon; undefined for a flag chaff does not know (A, 要再検査, —). */
96
+ export const flagOf = (text: string, words: ReferenceWords): FlagMeaning | undefined => {
97
+ const key = flagKeyOf(text);
98
+ return key === "" ? undefined : words.flags.find((flag) => flagKeyOf(flag.pattern) === key)?.meaning;
99
+ };
100
+
101
+ /**
102
+ * A two-sided range written with only a range mark (30〜149, 4.0–5.6) includes its ends: a reference interval names the lowest
103
+ * and the highest value counted as within it, so 149 against 30〜149 is inside. 未満, 超, under and < leave their end out.
104
+ */
105
+ const belowLow = (value: number, low: Bound | undefined): boolean => low !== undefined && (low.kind === "exclusive" ? value <= low.value : value < low.value);
106
+ const aboveHigh = (value: number, high: Bound | undefined): boolean =>
107
+ high !== undefined && (high.kind === "exclusive" ? value >= high.value : value > high.value);
108
+
109
+ export const positionOf = (value: number, range: Band): Position => {
110
+ if (belowLow(value, range.low)) return "below";
111
+ return aboveHigh(value, range.high) ? "above" : "inside";
112
+ };
113
+
114
+ /** Whether a flag contradicts the value's place against its range, and how. */
115
+ export const slipKindOf = (flag: FlagMeaning, position: Position): FlagSlipKind | undefined => {
116
+ if (position === "inside") return flag === "normal" ? undefined : "inside";
117
+ if (flag === "normal") return "outside";
118
+ if (flag === "high" && position === "below") return "below";
119
+ return flag === "low" && position === "above" ? "above" : undefined;
120
+ };
121
+
122
+ type Columns = { readonly result: number; readonly range: number; readonly flag: number };
123
+
124
+ const COLUMNS = ["result", "range", "flag"] as const;
125
+
126
+ /** The column of each kind, by its heading; undefined unless each kind names exactly one column. */
127
+ export const columnsOf = (headings: readonly string[], words: ReferenceWords): Columns | undefined => {
128
+ const kinds = labColumnsOf(headings, words.headings, headingKeyOf);
129
+ const found = COLUMNS.map((column) => kinds.flatMap((kind, index) => (kind === column ? [index] : [])));
130
+ const [result, range, flag] = found.map((indexes) => (indexes.length === 1 ? indexes[0] : undefined));
131
+ return result === undefined || range === undefined || flag === undefined ? undefined : { result, range, flag };
132
+ };
133
+
134
+ const rowSlip = (row: Line, columns: Columns, words: ReferenceWords): FlagSlip[] => {
135
+ const cells = cellsOf(row);
136
+ const [valueCell, rangeCell, flagCell] = [cells[columns.result], cells[columns.range], cells[columns.flag]];
137
+ if (valueCell === undefined || rangeCell === undefined || flagCell === undefined) return [];
138
+ const flag = flagOf(flagCell.text, words);
139
+ const value = valueOf(valueCell.text);
140
+ const range = value === undefined ? undefined : rangeOf(rangeCell.text, value.unit, words);
141
+ if (flag === undefined || value === undefined || range === undefined) return [];
142
+ const kind = slipKindOf(flag, positionOf(value.number, range));
143
+ if (kind === undefined) return [];
144
+ const item = withoutEdgeMarks((cells[0]?.text ?? "").trim());
145
+ return [{ kind, item, value: valueCell.text.trim(), range: rangeCell.text.trim(), flag: flagCell }];
146
+ };
147
+
148
+ /** Every row of every results table of the text whose flag contradicts its value and reference range. */
149
+ export const referenceFlagSlips = (text: string, words: ReferenceWords): FlagSlip[] =>
150
+ tablesOf(linesOf(text)).flatMap((table) => {
151
+ const columns = columnsOf(
152
+ cellsOf(table.header).map((cell) => cell.text),
153
+ words,
154
+ );
155
+ return columns === undefined ? [] : table.rows.flatMap((row) => rowSlip(row, columns, words));
156
+ });
@@ -0,0 +1,57 @@
1
+ // reference-number-repeated: in a table of separate items (expense lines, invoice lines), the same receipt, invoice or slip
2
+ // number on two rows. The column is found by its heading words only (lexicon reference-column). Pure.
3
+ import type { ChangeTable, TableCell } from "./change-rate-table.ts";
4
+ import { plain } from "./change-rate-table.ts";
5
+
6
+ /** The second row that carries a number, and the first row that already did (both as offsets into the source). */
7
+ export type RepeatedReference = { readonly offset: number; readonly firstOffset: number; readonly number: string; readonly heading: string };
8
+
9
+ /** A heading or a number compared without case, width or spaces: 「領収書 No.」 is 「領収書No.」, "t-0384" is "T-0384". */
10
+ const keyOf = (text: string): string => plain(text).toLowerCase().replace(/\s+/gu, "");
11
+
12
+ const DIGIT = /\d/u;
13
+
14
+ /** The one column whose heading is a reference-number heading; undefined when none or several are. */
15
+ export const referenceColumnOf = (headings: readonly string[], words: readonly string[]): number | undefined => {
16
+ const wanted = new Set(words.map(keyOf));
17
+ const indexes = headings.flatMap((heading, index) => (wanted.has(keyOf(heading)) ? [index] : []));
18
+ return indexes.length === 1 ? indexes[0] : undefined;
19
+ };
20
+
21
+ const offsetOf = (cell: TableCell): number => cell.start + (cell.text.length - cell.text.trimStart().length);
22
+
23
+ /** The cells of the column that hold a number: blank, a dash, 「なし」 and "N/A" hold no digit and are not numbers. */
24
+ const numberCells = (rows: readonly (readonly TableCell[])[], column: number): TableCell[] =>
25
+ rows.flatMap((row) => {
26
+ const cell = row[column];
27
+ return cell !== undefined && DIGIT.test(plain(cell.text)) ? [cell] : [];
28
+ });
29
+
30
+ /**
31
+ * A table's one repeated number. Only a table where exactly one number is written exactly twice is read: when several
32
+ * numbers repeat, or one three times, the rows are grouped by slip (the lines of one invoice, an invoice and its payment),
33
+ * and a repeat is how the table is meant to be read.
34
+ */
35
+ const repeatOf = (cells: readonly TableCell[], heading: string): RepeatedReference[] => {
36
+ const byKey = cells.reduce((groups, cell) => {
37
+ const key = keyOf(cell.text);
38
+ return groups.set(key, [...(groups.get(key) ?? []), cell]);
39
+ }, new Map<string, TableCell[]>());
40
+ const repeated = [...byKey.values()].filter((group) => group.length > 1);
41
+ const [only] = repeated;
42
+ if (repeated.length !== 1 || only?.length !== 2) return [];
43
+ const [first, second] = only;
44
+ if (first === undefined || second === undefined) return [];
45
+ return [{ offset: offsetOf(second), firstOffset: offsetOf(first), number: plain(second.text), heading: plain(heading) }];
46
+ };
47
+
48
+ export const repeatedReferences = (tables: readonly ChangeTable[], words: readonly string[]): RepeatedReference[] =>
49
+ tables.flatMap((table) => {
50
+ const column = referenceColumnOf(
51
+ table.header.map((cell) => cell.text),
52
+ words,
53
+ );
54
+ const heading = column === undefined ? undefined : table.header[column];
55
+ if (column === undefined || heading === undefined) return [];
56
+ return repeatOf(numberCells(table.rows, column), heading.text);
57
+ });
@@ -0,0 +1,105 @@
1
+ import type { StructureIssue } from "./issues.ts";
2
+ import { linesOf, type Line } from "./lines.ts";
3
+ import { cellsOf, tablesOf, type Cell } from "../facts/table-facts.ts";
4
+ import { withoutEdgeMarks } from "../facts/trim-marks.ts";
5
+ import { escapeRegExp } from "../orthography.ts";
6
+ import { labColumnsOf, type LabColumn, type LabColumnWord } from "./lab-columns.ts";
7
+
8
+ /**
9
+ * 検査結果の表で、結果の単位と基準値の単位が違う行(64 mmol/L と 40〜96 mg/dL)。結果・基準値・単位の列は見出しの語
10
+ * (lab-result-column と reference-unit-column)で見つけ、単位は語彙表 reference-unit で読む。group が同じ単位
11
+ * (mg/dL と mg/dl、×10⁴/µL と 万/µL)は同じ単位。升に単位が無ければ、列の見出しの単位、次にその行の単位の列を使う。どちらかの単位が読めなければ比べない。Pure.
12
+ */
13
+ export type UnitWord = { readonly pattern: string; readonly unit: string };
14
+ type ColumnRole = Exclude<LabColumn, "flag">;
15
+ export type ReferenceUnitWords = { readonly units: readonly UnitWord[]; readonly columns: readonly LabColumnWord[] };
16
+
17
+ type UnitsIn = (text: string) => ReadonlySet<string>;
18
+ type Column = { readonly index: number; readonly role: ColumnRole; readonly units: ReadonlySet<string> };
19
+
20
+ const NO_UNITS: ReadonlySet<string> = new Set();
21
+ const DIGIT = /\d/u;
22
+ const BRACKET_OPEN = /[([]/u;
23
+ const SPACES = /\s+/gu;
24
+
25
+ const fold = (text: string): string => text.normalize("NFKC").toLowerCase();
26
+
27
+ /** A unit written as a count per volume ("/µL") is not read right after a scale it does not include ("× 10⁴/µL" is not "/µL"). */
28
+ const AFTER_SCALE = "(?<![×x]\\s*10\\^?\\d*\\s*)";
29
+
30
+ const alternationOf = (patterns: readonly string[]): string => patterns.map(escapeRegExp).join("|");
31
+
32
+ /** The units written in a text, by their group, never inside a longer word or unit ("mol/L" is not in "mmol/L", "mg" not in "mg/kg"). */
33
+ export const unitMatcher = (units: readonly UnitWord[]): UnitsIn => {
34
+ const unitOf = new Map(units.map((word) => [fold(word.pattern), word.unit]));
35
+ if (unitOf.size === 0) return () => NO_UNITS;
36
+ const patterns = [...unitOf.keys()];
37
+ const perVolume = alternationOf(patterns.filter((pattern) => pattern.startsWith("/")));
38
+ const others = alternationOf(patterns.filter((pattern) => !pattern.startsWith("/")));
39
+ const alternation = [others, perVolume === "" ? "" : `${AFTER_SCALE}(?:${perVolume})`].filter((part) => part !== "").join("|");
40
+ const pattern = new RegExp(`(?<!\\p{L})(?:${alternation})(?![\\p{L}\\d/])`, "gu");
41
+ return (text) => new Set([...fold(text).matchAll(pattern)].map((match) => unitOf.get(match[0]) ?? match[0]));
42
+ };
43
+
44
+ /** Two units are said to disagree only when both are known and the two share none (a cell may give a conversion too). */
45
+ export const unitsDisagree = (result: ReadonlySet<string>, range: ReadonlySet<string>): boolean =>
46
+ result.size > 0 && range.size > 0 && ![...result].some((unit) => range.has(unit));
47
+
48
+ /** A heading without what it says in brackets ("結果(mg/dL)" is 結果, "Reference range (adult)" is reference range). */
49
+ const headingKey = (text: string): string => {
50
+ const folded = fold(withoutEdgeMarks(text));
51
+ const bracket = folded.search(BRACKET_OPEN);
52
+ return (bracket === -1 ? folded : folded.slice(0, bracket)).replace(SPACES, " ").trim();
53
+ };
54
+
55
+ const columnsOf = (header: Line, words: ReferenceUnitWords, unitsIn: UnitsIn): Column[] => {
56
+ const cells = cellsOf(header);
57
+ const kinds = labColumnsOf(
58
+ cells.map((cell) => cell.text),
59
+ words.columns,
60
+ headingKey,
61
+ );
62
+ return cells.flatMap((cell, index) => {
63
+ const role = kinds[index];
64
+ return role === undefined || role === "flag" ? [] : [{ index, role, units: unitsIn(cell.text) }];
65
+ });
66
+ };
67
+
68
+ /** A cell's units: its own, else its column heading's, else the row's unit column. None when the cell holds no number. */
69
+ const unitsOfCell = (cell: Cell | undefined, fallbacks: readonly ReadonlySet<string>[], unitsIn: UnitsIn): ReadonlySet<string> => {
70
+ if (cell === undefined || !DIGIT.test(fold(cell.text))) return NO_UNITS;
71
+ const own = unitsIn(cell.text);
72
+ return own.size > 0 ? own : (fallbacks.find((units) => units.size > 0) ?? NO_UNITS);
73
+ };
74
+
75
+ const issueAt = (cell: Cell, item: string, range: Cell): StructureIssue => ({
76
+ offset: cell.start + (cell.text.length - cell.text.trimStart().length),
77
+ values: { item, result: withoutEdgeMarks(cell.text), range: withoutEdgeMarks(range.text) },
78
+ });
79
+
80
+ /** Each result cell against each reference range cell (two ranges, for men and women, are two comparisons); one issue a result. */
81
+ const rowIssues = (row: Line, columns: readonly Column[], unitsIn: UnitsIn): StructureIssue[] => {
82
+ const cells = cellsOf(row);
83
+ const unitColumn = columns.find((column) => column.role === "unit");
84
+ const rowUnits = unitColumn === undefined ? NO_UNITS : unitsIn(cells[unitColumn.index]?.text ?? "");
85
+ const unitsAt = (column: Column): ReadonlySet<string> => unitsOfCell(cells[column.index], [column.units, rowUnits], unitsIn);
86
+ const ranges = columns.filter((column) => column.role === "range");
87
+ const item = withoutEdgeMarks(cells[0]?.text ?? "");
88
+ return columns.flatMap((column) => {
89
+ const cell = cells[column.index];
90
+ if (column.role !== "result" || cell === undefined) return [];
91
+ const range = ranges.find((candidate) => unitsDisagree(unitsAt(column), unitsAt(candidate)));
92
+ const rangeCell = range === undefined ? undefined : cells[range.index];
93
+ return rangeCell === undefined ? [] : [issueAt(cell, item, rangeCell)];
94
+ });
95
+ };
96
+
97
+ /** The rows of every result table whose result is in another unit than its reference range. */
98
+ export const referenceUnitMismatches = (source: string, words: ReferenceUnitWords): StructureIssue[] => {
99
+ const unitsIn = unitMatcher(words.units);
100
+ return tablesOf(linesOf(source)).flatMap((table) => {
101
+ const columns = columnsOf(table.header, words, unitsIn);
102
+ if (!columns.some((column) => column.role === "result") || !columns.some((column) => column.role === "range")) return [];
103
+ return table.rows.flatMap((row) => rowIssues(row, columns, unitsIn));
104
+ });
105
+ };