chaffjs 0.31.0 → 0.33.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.
- package/README.ja.md +330 -0
- package/README.md +124 -255
- package/dist/cli-text.js +2 -2
- package/dist/company-kana-spelling.d.ts +31 -0
- package/dist/company-kana-spelling.d.ts.map +1 -0
- package/dist/company-kana-spelling.js +79 -0
- package/dist/company-kana-spelling.js.map +1 -0
- package/dist/company-names.d.ts +32 -1
- package/dist/company-names.d.ts.map +1 -1
- package/dist/company-names.js +129 -22
- package/dist/company-names.js.map +1 -1
- package/dist/contacts/table-rows.d.ts +7 -0
- package/dist/contacts/table-rows.d.ts.map +1 -0
- package/dist/contacts/table-rows.js +42 -0
- package/dist/contacts/table-rows.js.map +1 -0
- package/dist/cross-run.d.ts.map +1 -1
- package/dist/cross-run.js +1 -0
- package/dist/cross-run.js.map +1 -1
- package/dist/derived/age-on-date.d.ts +53 -0
- package/dist/derived/age-on-date.d.ts.map +1 -0
- package/dist/derived/age-on-date.js +114 -0
- package/dist/derived/age-on-date.js.map +1 -0
- package/dist/derived/durations.d.ts +17 -2
- package/dist/derived/durations.d.ts.map +1 -1
- package/dist/derived/durations.js +61 -10
- package/dist/derived/durations.js.map +1 -1
- package/dist/derived/hours-and-minutes.d.ts +26 -0
- package/dist/derived/hours-and-minutes.d.ts.map +1 -0
- package/dist/derived/hours-and-minutes.js +24 -0
- package/dist/derived/hours-and-minutes.js.map +1 -0
- package/dist/derived/hyphenated-counts.d.ts +15 -0
- package/dist/derived/hyphenated-counts.d.ts.map +1 -0
- package/dist/derived/hyphenated-counts.js +31 -0
- package/dist/derived/hyphenated-counts.js.map +1 -0
- package/dist/derived/marked-dates.d.ts +15 -0
- package/dist/derived/marked-dates.d.ts.map +1 -0
- package/dist/derived/marked-dates.js +41 -0
- package/dist/derived/marked-dates.js.map +1 -0
- package/dist/derived/money-span.d.ts +9 -0
- package/dist/derived/money-span.d.ts.map +1 -0
- package/dist/derived/money-span.js +6 -0
- package/dist/derived/money-span.js.map +1 -0
- package/dist/derived/period-parts.d.ts +55 -0
- package/dist/derived/period-parts.d.ts.map +1 -0
- package/dist/derived/period-parts.js +283 -0
- package/dist/derived/period-parts.js.map +1 -0
- package/dist/derived/readable-date.d.ts +20 -0
- package/dist/derived/readable-date.d.ts.map +1 -0
- package/dist/derived/readable-date.js +50 -0
- package/dist/derived/readable-date.js.map +1 -0
- package/dist/derived/stays.d.ts +3 -1
- package/dist/derived/stays.d.ts.map +1 -1
- package/dist/derived/stays.js +3 -0
- package/dist/derived/stays.js.map +1 -1
- package/dist/derived/timesheet-hours.d.ts +27 -0
- package/dist/derived/timesheet-hours.d.ts.map +1 -0
- package/dist/derived/timesheet-hours.js +86 -0
- package/dist/derived/timesheet-hours.js.map +1 -0
- package/dist/derived/use-maximum.d.ts +27 -0
- package/dist/derived/use-maximum.d.ts.map +1 -0
- package/dist/derived/use-maximum.js +104 -0
- package/dist/derived/use-maximum.js.map +1 -0
- package/dist/derived/working-hours.d.ts +4 -5
- package/dist/derived/working-hours.d.ts.map +1 -1
- package/dist/detectors/agreement-slip.d.ts.map +1 -1
- package/dist/detectors/agreement-slip.js +4 -0
- package/dist/detectors/agreement-slip.js.map +1 -1
- package/dist/detectors/annual-holidays-mismatch.d.ts +3 -0
- package/dist/detectors/annual-holidays-mismatch.d.ts.map +1 -0
- package/dist/detectors/annual-holidays-mismatch.js +29 -0
- package/dist/detectors/annual-holidays-mismatch.js.map +1 -0
- package/dist/detectors/annual-pay-mismatch.d.ts +3 -0
- package/dist/detectors/annual-pay-mismatch.d.ts.map +1 -0
- package/dist/detectors/annual-pay-mismatch.js +52 -0
- package/dist/detectors/annual-pay-mismatch.js.map +1 -0
- package/dist/detectors/blank-structure.d.ts +3 -1
- package/dist/detectors/blank-structure.d.ts.map +1 -1
- package/dist/detectors/blank-structure.js +45 -12
- package/dist/detectors/blank-structure.js.map +1 -1
- package/dist/detectors/bmi-mismatch.d.ts +3 -0
- package/dist/detectors/bmi-mismatch.d.ts.map +1 -0
- package/dist/detectors/bmi-mismatch.js +70 -0
- package/dist/detectors/bmi-mismatch.js.map +1 -0
- package/dist/detectors/change-rate.d.ts.map +1 -1
- package/dist/detectors/change-rate.js +24 -9
- package/dist/detectors/change-rate.js.map +1 -1
- package/dist/detectors/closing-balance-mismatch.d.ts +3 -0
- package/dist/detectors/closing-balance-mismatch.d.ts.map +1 -0
- package/dist/detectors/closing-balance-mismatch.js +42 -0
- package/dist/detectors/closing-balance-mismatch.js.map +1 -0
- package/dist/detectors/contact-variant.d.ts.map +1 -1
- package/dist/detectors/contact-variant.js +6 -2
- package/dist/detectors/contact-variant.js.map +1 -1
- package/dist/detectors/cumulative-below-current.d.ts +3 -0
- package/dist/detectors/cumulative-below-current.d.ts.map +1 -0
- package/dist/detectors/cumulative-below-current.js +25 -0
- package/dist/detectors/cumulative-below-current.js.map +1 -0
- package/dist/detectors/currency-column.d.ts +3 -0
- package/dist/detectors/currency-column.d.ts.map +1 -0
- package/dist/detectors/currency-column.js +32 -0
- package/dist/detectors/currency-column.js.map +1 -0
- package/dist/detectors/date-any-year.d.ts +24 -0
- package/dist/detectors/date-any-year.d.ts.map +1 -0
- package/dist/detectors/date-any-year.js +103 -0
- package/dist/detectors/date-any-year.js.map +1 -0
- package/dist/detectors/date-outside-period.d.ts.map +1 -1
- package/dist/detectors/date-outside-period.js +4 -10
- package/dist/detectors/date-outside-period.js.map +1 -1
- package/dist/detectors/date-stamp-order.d.ts.map +1 -1
- package/dist/detectors/date-stamp-order.js +2 -1
- package/dist/detectors/date-stamp-order.js.map +1 -1
- package/dist/detectors/date-year.d.ts +18 -6
- package/dist/detectors/date-year.d.ts.map +1 -1
- package/dist/detectors/date-year.js +39 -11
- package/dist/detectors/date-year.js.map +1 -1
- package/dist/detectors/deductible-exceeds-limit.d.ts +4 -0
- package/dist/detectors/deductible-exceeds-limit.d.ts.map +1 -0
- package/dist/detectors/deductible-exceeds-limit.js +46 -0
- package/dist/detectors/deductible-exceeds-limit.js.map +1 -0
- package/dist/detectors/defined-term-form.d.ts.map +1 -1
- package/dist/detectors/defined-term-form.js +6 -20
- package/dist/detectors/defined-term-form.js.map +1 -1
- package/dist/detectors/derived-numbers.d.ts +4 -3
- package/dist/detectors/derived-numbers.d.ts.map +1 -1
- package/dist/detectors/derived-numbers.js +43 -70
- package/dist/detectors/derived-numbers.js.map +1 -1
- package/dist/detectors/discount-rate.d.ts +3 -0
- package/dist/detectors/discount-rate.d.ts.map +1 -0
- package/dist/detectors/discount-rate.js +35 -0
- package/dist/detectors/discount-rate.js.map +1 -0
- package/dist/detectors/due-date.d.ts.map +1 -1
- package/dist/detectors/due-date.js +11 -4
- package/dist/detectors/due-date.js.map +1 -1
- package/dist/detectors/email-letter.d.ts +10 -2
- package/dist/detectors/email-letter.d.ts.map +1 -1
- package/dist/detectors/email-letter.js +24 -5
- package/dist/detectors/email-letter.js.map +1 -1
- package/dist/detectors/event-deadline.d.ts.map +1 -1
- package/dist/detectors/event-deadline.js +11 -2
- package/dist/detectors/event-deadline.js.map +1 -1
- package/dist/detectors/fact-consistency.d.ts.map +1 -1
- package/dist/detectors/fact-consistency.js +112 -5
- package/dist/detectors/fact-consistency.js.map +1 -1
- package/dist/detectors/formula-amount.d.ts +3 -0
- package/dist/detectors/formula-amount.d.ts.map +1 -0
- package/dist/detectors/formula-amount.js +41 -0
- package/dist/detectors/formula-amount.js.map +1 -0
- package/dist/detectors/gloss-year.d.ts +11 -0
- package/dist/detectors/gloss-year.d.ts.map +1 -0
- package/dist/detectors/gloss-year.js +14 -0
- package/dist/detectors/gloss-year.js.map +1 -0
- package/dist/detectors/gpa-mismatch.d.ts +3 -0
- package/dist/detectors/gpa-mismatch.d.ts.map +1 -0
- package/dist/detectors/gpa-mismatch.js +39 -0
- package/dist/detectors/gpa-mismatch.js.map +1 -0
- package/dist/detectors/impossible-date.d.ts.map +1 -1
- package/dist/detectors/impossible-date.js +22 -6
- package/dist/detectors/impossible-date.js.map +1 -1
- package/dist/detectors/installment-total-mismatch.d.ts +3 -0
- package/dist/detectors/installment-total-mismatch.d.ts.map +1 -0
- package/dist/detectors/installment-total-mismatch.js +68 -0
- package/dist/detectors/installment-total-mismatch.js.map +1 -0
- package/dist/detectors/interest.d.ts +3 -0
- package/dist/detectors/interest.d.ts.map +1 -0
- package/dist/detectors/interest.js +38 -0
- package/dist/detectors/interest.js.map +1 -0
- package/dist/detectors/lab-columns.d.ts +4 -0
- package/dist/detectors/lab-columns.d.ts.map +1 -0
- package/dist/detectors/lab-columns.js +3 -0
- package/dist/detectors/lab-columns.js.map +1 -0
- package/dist/detectors/labelled-age.d.ts +4 -0
- package/dist/detectors/labelled-age.d.ts.map +1 -0
- package/dist/detectors/labelled-age.js +110 -0
- package/dist/detectors/labelled-age.js.map +1 -0
- package/dist/detectors/line-amount.d.ts.map +1 -1
- package/dist/detectors/line-amount.js +45 -2
- package/dist/detectors/line-amount.js.map +1 -1
- package/dist/detectors/measured-facts.d.ts +1 -1
- package/dist/detectors/measured-facts.d.ts.map +1 -1
- package/dist/detectors/measured-facts.js.map +1 -1
- package/dist/detectors/meter-usage.d.ts +3 -0
- package/dist/detectors/meter-usage.d.ts.map +1 -0
- package/dist/detectors/meter-usage.js +37 -0
- package/dist/detectors/meter-usage.js.map +1 -0
- package/dist/detectors/name-field.d.ts +13 -0
- package/dist/detectors/name-field.d.ts.map +1 -0
- package/dist/detectors/name-field.js +38 -0
- package/dist/detectors/name-field.js.map +1 -0
- package/dist/detectors/name-variant.d.ts.map +1 -1
- package/dist/detectors/name-variant.js +128 -14
- package/dist/detectors/name-variant.js.map +1 -1
- package/dist/detectors/net-amount-mismatch.d.ts +10 -0
- package/dist/detectors/net-amount-mismatch.d.ts.map +1 -0
- package/dist/detectors/net-amount-mismatch.js +70 -0
- package/dist/detectors/net-amount-mismatch.js.map +1 -0
- package/dist/detectors/net-gross-weight.d.ts +3 -0
- package/dist/detectors/net-gross-weight.d.ts.map +1 -0
- package/dist/detectors/net-gross-weight.js +35 -0
- package/dist/detectors/net-gross-weight.js.map +1 -0
- package/dist/detectors/nominal-step.d.ts +3 -0
- package/dist/detectors/nominal-step.d.ts.map +1 -0
- package/dist/detectors/nominal-step.js +28 -0
- package/dist/detectors/nominal-step.js.map +1 -0
- package/dist/detectors/number-style.d.ts +2 -0
- package/dist/detectors/number-style.d.ts.map +1 -1
- package/dist/detectors/number-style.js +8 -2
- package/dist/detectors/number-style.js.map +1 -1
- package/dist/detectors/order-quantity.d.ts +10 -0
- package/dist/detectors/order-quantity.d.ts.map +1 -0
- package/dist/detectors/order-quantity.js +35 -0
- package/dist/detectors/order-quantity.js.map +1 -0
- package/dist/detectors/orthographic-variant.d.ts.map +1 -1
- package/dist/detectors/orthographic-variant.js +37 -11
- package/dist/detectors/orthographic-variant.js.map +1 -1
- package/dist/detectors/orthography.d.ts.map +1 -1
- package/dist/detectors/orthography.js +15 -7
- package/dist/detectors/orthography.js.map +1 -1
- package/dist/detectors/period-label-conflict.d.ts +4 -0
- package/dist/detectors/period-label-conflict.d.ts.map +1 -0
- package/dist/detectors/period-label-conflict.js +34 -0
- package/dist/detectors/period-label-conflict.js.map +1 -0
- package/dist/detectors/period-multiple-mismatch.d.ts +3 -0
- package/dist/detectors/period-multiple-mismatch.d.ts.map +1 -0
- package/dist/detectors/period-multiple-mismatch.js +36 -0
- package/dist/detectors/period-multiple-mismatch.js.map +1 -0
- package/dist/detectors/period-part.d.ts +4 -0
- package/dist/detectors/period-part.d.ts.map +1 -0
- package/dist/detectors/period-part.js +58 -0
- package/dist/detectors/period-part.js.map +1 -0
- package/dist/detectors/range-words.d.ts +5 -0
- package/dist/detectors/range-words.d.ts.map +1 -0
- package/dist/detectors/range-words.js +14 -0
- package/dist/detectors/range-words.js.map +1 -0
- package/dist/detectors/ratio-mismatch.d.ts +7 -0
- package/dist/detectors/ratio-mismatch.d.ts.map +1 -0
- package/dist/detectors/ratio-mismatch.js +89 -0
- package/dist/detectors/ratio-mismatch.js.map +1 -0
- package/dist/detectors/readable-dates.d.ts +9 -0
- package/dist/detectors/readable-dates.d.ts.map +1 -0
- package/dist/detectors/readable-dates.js +23 -0
- package/dist/detectors/readable-dates.js.map +1 -0
- package/dist/detectors/reference-flag.d.ts +3 -0
- package/dist/detectors/reference-flag.d.ts.map +1 -0
- package/dist/detectors/reference-flag.js +31 -0
- package/dist/detectors/reference-flag.js.map +1 -0
- package/dist/detectors/reference-number-repeated.d.ts +3 -0
- package/dist/detectors/reference-number-repeated.d.ts.map +1 -0
- package/dist/detectors/reference-number-repeated.js +22 -0
- package/dist/detectors/reference-number-repeated.js.map +1 -0
- package/dist/detectors/reference-number-variant.d.ts +3 -0
- package/dist/detectors/reference-number-variant.d.ts.map +1 -0
- package/dist/detectors/reference-number-variant.js +40 -0
- package/dist/detectors/reference-number-variant.js.map +1 -0
- package/dist/detectors/reference-unit.d.ts +3 -0
- package/dist/detectors/reference-unit.d.ts.map +1 -0
- package/dist/detectors/reference-unit.js +19 -0
- package/dist/detectors/reference-unit.js.map +1 -0
- package/dist/detectors/registry/annual-holidays-mismatch.d.ts +3 -0
- package/dist/detectors/registry/annual-holidays-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/annual-holidays-mismatch.js +3 -0
- package/dist/detectors/registry/annual-holidays-mismatch.js.map +1 -0
- package/dist/detectors/registry/annual-pay-mismatch.d.ts +3 -0
- package/dist/detectors/registry/annual-pay-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/annual-pay-mismatch.js +3 -0
- package/dist/detectors/registry/annual-pay-mismatch.js.map +1 -0
- package/dist/detectors/registry/backorder-mismatch.d.ts +3 -0
- package/dist/detectors/registry/backorder-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/backorder-mismatch.js +3 -0
- package/dist/detectors/registry/backorder-mismatch.js.map +1 -0
- package/dist/detectors/registry/bmi-mismatch.d.ts +3 -0
- package/dist/detectors/registry/bmi-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/bmi-mismatch.js +3 -0
- package/dist/detectors/registry/bmi-mismatch.js.map +1 -0
- package/dist/detectors/registry/closing-balance-mismatch.d.ts +3 -0
- package/dist/detectors/registry/closing-balance-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/closing-balance-mismatch.js +3 -0
- package/dist/detectors/registry/closing-balance-mismatch.js.map +1 -0
- package/dist/detectors/registry/cumulative-below-current.d.ts +3 -0
- package/dist/detectors/registry/cumulative-below-current.d.ts.map +1 -0
- package/dist/detectors/registry/cumulative-below-current.js +3 -0
- package/dist/detectors/registry/cumulative-below-current.js.map +1 -0
- package/dist/detectors/registry/currency-column-mix.d.ts +3 -0
- package/dist/detectors/registry/currency-column-mix.d.ts.map +1 -0
- package/dist/detectors/registry/currency-column-mix.js +3 -0
- package/dist/detectors/registry/currency-column-mix.js.map +1 -0
- package/dist/detectors/registry/deductible-exceeds-limit.d.ts +3 -0
- package/dist/detectors/registry/deductible-exceeds-limit.d.ts.map +1 -0
- package/dist/detectors/registry/deductible-exceeds-limit.js +3 -0
- package/dist/detectors/registry/deductible-exceeds-limit.js.map +1 -0
- package/dist/detectors/registry/delivered-over-ordered.d.ts +3 -0
- package/dist/detectors/registry/delivered-over-ordered.d.ts.map +1 -0
- package/dist/detectors/registry/delivered-over-ordered.js +3 -0
- package/dist/detectors/registry/delivered-over-ordered.js.map +1 -0
- package/dist/detectors/registry/discount-rate.d.ts +3 -0
- package/dist/detectors/registry/discount-rate.d.ts.map +1 -0
- package/dist/detectors/registry/discount-rate.js +3 -0
- package/dist/detectors/registry/discount-rate.js.map +1 -0
- package/dist/detectors/registry/elapsed-years-mismatch.js +1 -1
- package/dist/detectors/registry/elapsed-years-mismatch.js.map +1 -1
- package/dist/detectors/registry/formula-amount.d.ts +3 -0
- package/dist/detectors/registry/formula-amount.d.ts.map +1 -0
- package/dist/detectors/registry/formula-amount.js +3 -0
- package/dist/detectors/registry/formula-amount.js.map +1 -0
- package/dist/detectors/registry/gpa-mismatch.d.ts +3 -0
- package/dist/detectors/registry/gpa-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/gpa-mismatch.js +3 -0
- package/dist/detectors/registry/gpa-mismatch.js.map +1 -0
- package/dist/detectors/registry/installment-total-mismatch.d.ts +3 -0
- package/dist/detectors/registry/installment-total-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/installment-total-mismatch.js +3 -0
- package/dist/detectors/registry/installment-total-mismatch.js.map +1 -0
- package/dist/detectors/registry/interest.d.ts +3 -0
- package/dist/detectors/registry/interest.d.ts.map +1 -0
- package/dist/detectors/registry/interest.js +3 -0
- package/dist/detectors/registry/interest.js.map +1 -0
- package/dist/detectors/registry/meter-usage.d.ts +3 -0
- package/dist/detectors/registry/meter-usage.d.ts.map +1 -0
- package/dist/detectors/registry/meter-usage.js +3 -0
- package/dist/detectors/registry/meter-usage.js.map +1 -0
- package/dist/detectors/registry/net-amount-mismatch.d.ts +3 -0
- package/dist/detectors/registry/net-amount-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/net-amount-mismatch.js +3 -0
- package/dist/detectors/registry/net-amount-mismatch.js.map +1 -0
- package/dist/detectors/registry/net-over-gross.d.ts +3 -0
- package/dist/detectors/registry/net-over-gross.d.ts.map +1 -0
- package/dist/detectors/registry/net-over-gross.js +3 -0
- package/dist/detectors/registry/net-over-gross.js.map +1 -0
- package/dist/detectors/registry/period-label-conflict.d.ts +3 -0
- package/dist/detectors/registry/period-label-conflict.d.ts.map +1 -0
- package/dist/detectors/registry/period-label-conflict.js +3 -0
- package/dist/detectors/registry/period-label-conflict.js.map +1 -0
- package/dist/detectors/registry/period-multiple-mismatch.d.ts +3 -0
- package/dist/detectors/registry/period-multiple-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/period-multiple-mismatch.js +3 -0
- package/dist/detectors/registry/period-multiple-mismatch.js.map +1 -0
- package/dist/detectors/registry/period-part-exceeds-whole.d.ts +3 -0
- package/dist/detectors/registry/period-part-exceeds-whole.d.ts.map +1 -0
- package/dist/detectors/registry/period-part-exceeds-whole.js +3 -0
- package/dist/detectors/registry/period-part-exceeds-whole.js.map +1 -0
- package/dist/detectors/registry/product-exceeds-maximum.d.ts +3 -0
- package/dist/detectors/registry/product-exceeds-maximum.d.ts.map +1 -0
- package/dist/detectors/registry/product-exceeds-maximum.js +3 -0
- package/dist/detectors/registry/product-exceeds-maximum.js.map +1 -0
- package/dist/detectors/registry/ratio-mismatch.d.ts +3 -0
- package/dist/detectors/registry/ratio-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/ratio-mismatch.js +3 -0
- package/dist/detectors/registry/ratio-mismatch.js.map +1 -0
- package/dist/detectors/registry/reference-flag-mismatch.d.ts +3 -0
- package/dist/detectors/registry/reference-flag-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/reference-flag-mismatch.js +3 -0
- package/dist/detectors/registry/reference-flag-mismatch.js.map +1 -0
- package/dist/detectors/registry/reference-number-repeated.d.ts +3 -0
- package/dist/detectors/registry/reference-number-repeated.d.ts.map +1 -0
- package/dist/detectors/registry/reference-number-repeated.js +3 -0
- package/dist/detectors/registry/reference-number-repeated.js.map +1 -0
- package/dist/detectors/registry/reference-number-variant.d.ts +3 -0
- package/dist/detectors/registry/reference-number-variant.d.ts.map +1 -0
- package/dist/detectors/registry/reference-number-variant.js +3 -0
- package/dist/detectors/registry/reference-number-variant.js.map +1 -0
- package/dist/detectors/registry/reference-unit.d.ts +3 -0
- package/dist/detectors/registry/reference-unit.d.ts.map +1 -0
- package/dist/detectors/registry/reference-unit.js +3 -0
- package/dist/detectors/registry/reference-unit.js.map +1 -0
- package/dist/detectors/registry/revision-direction.d.ts +3 -0
- package/dist/detectors/registry/revision-direction.d.ts.map +1 -0
- package/dist/detectors/registry/revision-direction.js +3 -0
- package/dist/detectors/registry/revision-direction.js.map +1 -0
- package/dist/detectors/registry/running-balance.d.ts +3 -0
- package/dist/detectors/registry/running-balance.d.ts.map +1 -0
- package/dist/detectors/registry/running-balance.js +3 -0
- package/dist/detectors/registry/running-balance.js.map +1 -0
- package/dist/detectors/registry/serial-range.d.ts +3 -0
- package/dist/detectors/registry/serial-range.d.ts.map +1 -0
- package/dist/detectors/registry/serial-range.js +3 -0
- package/dist/detectors/registry/serial-range.js.map +1 -0
- package/dist/detectors/registry/share-amount.d.ts +3 -0
- package/dist/detectors/registry/share-amount.d.ts.map +1 -0
- package/dist/detectors/registry/share-amount.js +3 -0
- package/dist/detectors/registry/share-amount.js.map +1 -0
- package/dist/detectors/registry/table-unit-mix.d.ts +3 -0
- package/dist/detectors/registry/table-unit-mix.d.ts.map +1 -0
- package/dist/detectors/registry/table-unit-mix.js +3 -0
- package/dist/detectors/registry/table-unit-mix.js.map +1 -0
- package/dist/detectors/registry/tier-threshold.d.ts +3 -0
- package/dist/detectors/registry/tier-threshold.d.ts.map +1 -0
- package/dist/detectors/registry/tier-threshold.js +3 -0
- package/dist/detectors/registry/tier-threshold.js.map +1 -0
- package/dist/detectors/registry/variance-mismatch.d.ts +3 -0
- package/dist/detectors/registry/variance-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/variance-mismatch.js +3 -0
- package/dist/detectors/registry/variance-mismatch.js.map +1 -0
- package/dist/detectors/relative-dates.d.ts.map +1 -1
- package/dist/detectors/relative-dates.js +2 -1
- package/dist/detectors/relative-dates.js.map +1 -1
- package/dist/detectors/relative-day-words.d.ts.map +1 -1
- package/dist/detectors/relative-day-words.js +2 -1
- package/dist/detectors/relative-day-words.js.map +1 -1
- package/dist/detectors/rent-multiple-mismatch.d.ts.map +1 -1
- package/dist/detectors/rent-multiple-mismatch.js.map +1 -1
- package/dist/detectors/request-owner.d.ts +3 -1
- package/dist/detectors/request-owner.d.ts.map +1 -1
- package/dist/detectors/request-owner.js +5 -2
- package/dist/detectors/request-owner.js.map +1 -1
- package/dist/detectors/revision-direction.d.ts +3 -0
- package/dist/detectors/revision-direction.d.ts.map +1 -0
- package/dist/detectors/revision-direction.js +32 -0
- package/dist/detectors/revision-direction.js.map +1 -0
- package/dist/detectors/row-sentence-amounts.d.ts +5 -0
- package/dist/detectors/row-sentence-amounts.d.ts.map +1 -0
- package/dist/detectors/row-sentence-amounts.js +71 -0
- package/dist/detectors/row-sentence-amounts.js.map +1 -0
- package/dist/detectors/running-balance.d.ts +3 -0
- package/dist/detectors/running-balance.d.ts.map +1 -0
- package/dist/detectors/running-balance.js +26 -0
- package/dist/detectors/running-balance.js.map +1 -0
- package/dist/detectors/scaled-quantity.js +1 -1
- package/dist/detectors/scaled-quantity.js.map +1 -1
- package/dist/detectors/serial-range.d.ts +3 -0
- package/dist/detectors/serial-range.d.ts.map +1 -0
- package/dist/detectors/serial-range.js +29 -0
- package/dist/detectors/serial-range.js.map +1 -0
- package/dist/detectors/share-amount.d.ts +3 -0
- package/dist/detectors/share-amount.d.ts.map +1 -0
- package/dist/detectors/share-amount.js +45 -0
- package/dist/detectors/share-amount.js.map +1 -0
- package/dist/detectors/structure-tree.d.ts +1 -1
- package/dist/detectors/structure-tree.d.ts.map +1 -1
- package/dist/detectors/structure-tree.js +46 -12
- package/dist/detectors/structure-tree.js.map +1 -1
- package/dist/detectors/table-scale.d.ts +3 -0
- package/dist/detectors/table-scale.d.ts.map +1 -0
- package/dist/detectors/table-scale.js +32 -0
- package/dist/detectors/table-scale.js.map +1 -0
- package/dist/detectors/tax-amount.d.ts.map +1 -1
- package/dist/detectors/tax-amount.js +34 -10
- package/dist/detectors/tax-amount.js.map +1 -1
- package/dist/detectors/technical-docs.d.ts +1 -1
- package/dist/detectors/technical-docs.d.ts.map +1 -1
- package/dist/detectors/technical-docs.js +3 -2
- package/dist/detectors/technical-docs.js.map +1 -1
- package/dist/detectors/tier-threshold.d.ts +3 -0
- package/dist/detectors/tier-threshold.d.ts.map +1 -0
- package/dist/detectors/tier-threshold.js +86 -0
- package/dist/detectors/tier-threshold.js.map +1 -0
- package/dist/detectors/time-order.d.ts +1 -0
- package/dist/detectors/time-order.d.ts.map +1 -1
- package/dist/detectors/time-order.js +43 -13
- package/dist/detectors/time-order.js.map +1 -1
- package/dist/detectors/use-maximum.d.ts +3 -0
- package/dist/detectors/use-maximum.d.ts.map +1 -0
- package/dist/detectors/use-maximum.js +32 -0
- package/dist/detectors/use-maximum.js.map +1 -0
- package/dist/detectors/variance.d.ts +3 -0
- package/dist/detectors/variance.d.ts.map +1 -0
- package/dist/detectors/variance.js +28 -0
- package/dist/detectors/variance.js.map +1 -0
- package/dist/detectors/whole-count-findings.d.ts +4 -0
- package/dist/detectors/whole-count-findings.d.ts.map +1 -0
- package/dist/detectors/whole-count-findings.js +38 -0
- package/dist/detectors/whole-count-findings.js.map +1 -0
- package/dist/detectors/working-hours-findings.d.ts +9 -0
- package/dist/detectors/working-hours-findings.d.ts.map +1 -0
- package/dist/detectors/working-hours-findings.js +79 -0
- package/dist/detectors/working-hours-findings.js.map +1 -0
- package/dist/eval.js +3 -3
- package/dist/eval.js.map +1 -1
- package/dist/facts/age-values.d.ts +22 -0
- package/dist/facts/age-values.d.ts.map +1 -0
- package/dist/facts/age-values.js +76 -0
- package/dist/facts/age-values.js.map +1 -0
- package/dist/facts/cell-keys.d.ts +12 -0
- package/dist/facts/cell-keys.d.ts.map +1 -0
- package/dist/facts/cell-keys.js +19 -0
- package/dist/facts/cell-keys.js.map +1 -0
- package/dist/facts/count-labels.d.ts +15 -0
- package/dist/facts/count-labels.d.ts.map +1 -0
- package/dist/facts/count-labels.js +19 -0
- package/dist/facts/count-labels.js.map +1 -0
- package/dist/facts/document-terms.d.ts +43 -0
- package/dist/facts/document-terms.d.ts.map +1 -0
- package/dist/facts/document-terms.js +74 -0
- package/dist/facts/document-terms.js.map +1 -0
- package/dist/facts/duration-scale.d.ts +11 -0
- package/dist/facts/duration-scale.d.ts.map +1 -0
- package/dist/facts/duration-scale.js +14 -0
- package/dist/facts/duration-scale.js.map +1 -0
- package/dist/facts/duration-values.d.ts +15 -0
- package/dist/facts/duration-values.d.ts.map +1 -0
- package/dist/facts/duration-values.js +29 -0
- package/dist/facts/duration-values.js.map +1 -0
- package/dist/facts/fact-values.d.ts +9 -1
- package/dist/facts/fact-values.d.ts.map +1 -1
- package/dist/facts/fact-values.js +19 -6
- package/dist/facts/fact-values.js.map +1 -1
- package/dist/facts/labelled-facts.d.ts +15 -1
- package/dist/facts/labelled-facts.d.ts.map +1 -1
- package/dist/facts/labelled-facts.js +51 -8
- package/dist/facts/labelled-facts.js.map +1 -1
- package/dist/facts/measure-units.d.ts.map +1 -1
- package/dist/facts/measure-units.js +23 -8
- package/dist/facts/measure-units.js.map +1 -1
- package/dist/facts/measures.js +11 -9
- package/dist/facts/measures.js.map +1 -1
- package/dist/facts/qualified-labels.d.ts +28 -0
- package/dist/facts/qualified-labels.d.ts.map +1 -0
- package/dist/facts/qualified-labels.js +96 -0
- package/dist/facts/qualified-labels.js.map +1 -0
- package/dist/facts/rate-values.d.ts +40 -0
- package/dist/facts/rate-values.d.ts.map +1 -0
- package/dist/facts/rate-values.js +68 -0
- package/dist/facts/rate-values.js.map +1 -0
- package/dist/facts/row-sentence-amounts.d.ts +51 -0
- package/dist/facts/row-sentence-amounts.d.ts.map +1 -0
- package/dist/facts/row-sentence-amounts.js +71 -0
- package/dist/facts/row-sentence-amounts.js.map +1 -0
- package/dist/facts/superscript-power.d.ts +3 -0
- package/dist/facts/superscript-power.d.ts.map +1 -0
- package/dist/facts/superscript-power.js +5 -0
- package/dist/facts/superscript-power.js.map +1 -0
- package/dist/facts/table-facts.d.ts +18 -2
- package/dist/facts/table-facts.d.ts.map +1 -1
- package/dist/facts/table-facts.js +16 -6
- package/dist/facts/table-facts.js.map +1 -1
- package/dist/facts/term-values.d.ts +34 -0
- package/dist/facts/term-values.d.ts.map +1 -0
- package/dist/facts/term-values.js +195 -0
- package/dist/facts/term-values.js.map +1 -0
- package/dist/facts/unit-word.d.ts +5 -0
- package/dist/facts/unit-word.d.ts.map +1 -1
- package/dist/facts/unit-word.js +9 -0
- package/dist/facts/unit-word.js.map +1 -1
- package/dist/facts/verb-quantity-facts.d.ts +22 -0
- package/dist/facts/verb-quantity-facts.d.ts.map +1 -0
- package/dist/facts/verb-quantity-facts.js +58 -0
- package/dist/facts/verb-quantity-facts.js.map +1 -0
- package/dist/facts/whole-counts.d.ts +58 -0
- package/dist/facts/whole-counts.d.ts.map +1 -0
- package/dist/facts/whole-counts.js +118 -0
- package/dist/facts/whole-counts.js.map +1 -0
- package/dist/fix-plan/text.js +2 -2
- package/dist/fix-plan/text.js.map +1 -1
- package/dist/lexicon-genres.d.ts +7 -0
- package/dist/lexicon-genres.d.ts.map +1 -0
- package/dist/lexicon-genres.js +8 -0
- package/dist/lexicon-genres.js.map +1 -0
- package/dist/name-char-reading.d.ts +16 -0
- package/dist/name-char-reading.d.ts.map +1 -0
- package/dist/name-char-reading.js +18 -0
- package/dist/name-char-reading.js.map +1 -0
- package/dist/name-line-block.d.ts +6 -0
- package/dist/name-line-block.d.ts.map +1 -0
- package/dist/name-line-block.js +35 -0
- package/dist/name-line-block.js.map +1 -0
- package/dist/name-lookalike-chars.d.ts +16 -0
- package/dist/name-lookalike-chars.d.ts.map +1 -0
- package/dist/name-lookalike-chars.js +41 -0
- package/dist/name-lookalike-chars.js.map +1 -0
- package/dist/name-neighbours.d.ts +7 -0
- package/dist/name-neighbours.d.ts.map +1 -0
- package/dist/name-neighbours.js +55 -0
- package/dist/name-neighbours.js.map +1 -0
- package/dist/name-ordinary-word.d.ts +13 -0
- package/dist/name-ordinary-word.d.ts.map +1 -0
- package/dist/name-ordinary-word.js +54 -0
- package/dist/name-ordinary-word.js.map +1 -0
- package/dist/name-person.d.ts +9 -0
- package/dist/name-person.d.ts.map +1 -0
- package/dist/name-person.js +25 -0
- package/dist/name-person.js.map +1 -0
- package/dist/name-separator.d.ts +14 -0
- package/dist/name-separator.d.ts.map +1 -0
- package/dist/name-separator.js +33 -0
- package/dist/name-separator.js.map +1 -0
- package/dist/name-variants.d.ts +8 -8
- package/dist/name-variants.d.ts.map +1 -1
- package/dist/name-variants.js +28 -81
- package/dist/name-variants.js.map +1 -1
- package/dist/name-weight.d.ts +10 -0
- package/dist/name-weight.d.ts.map +1 -0
- package/dist/name-weight.js +7 -0
- package/dist/name-weight.js.map +1 -0
- package/dist/person-field.d.ts +6 -0
- package/dist/person-field.d.ts.map +1 -0
- package/dist/person-field.js +40 -0
- package/dist/person-field.js.map +1 -0
- package/dist/person-full-name.d.ts +12 -0
- package/dist/person-full-name.d.ts.map +1 -0
- package/dist/person-full-name.js +52 -0
- package/dist/person-full-name.js.map +1 -0
- package/dist/phone-numbers.d.ts +23 -3
- package/dist/phone-numbers.d.ts.map +1 -1
- package/dist/phone-numbers.js +49 -21
- package/dist/phone-numbers.js.map +1 -1
- package/dist/plugin.d.ts +8 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/product-names.d.ts +33 -0
- package/dist/product-names.d.ts.map +1 -0
- package/dist/product-names.js +74 -0
- package/dist/product-names.js.map +1 -0
- package/dist/profile/parse.d.ts.map +1 -1
- package/dist/profile/parse.js +5 -0
- package/dist/profile/parse.js.map +1 -1
- package/dist/reference-numbers.d.ts +26 -0
- package/dist/reference-numbers.d.ts.map +1 -0
- package/dist/reference-numbers.js +43 -0
- package/dist/reference-numbers.js.map +1 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +1 -0
- package/dist/run.js.map +1 -1
- package/dist/spaced-person-name.d.ts +17 -0
- package/dist/spaced-person-name.d.ts.map +1 -0
- package/dist/spaced-person-name.js +82 -0
- package/dist/spaced-person-name.js.map +1 -0
- package/dist/spacing-code.d.ts +1 -0
- package/dist/spacing-code.d.ts.map +1 -1
- package/dist/spacing-code.js +15 -1
- package/dist/spacing-code.js.map +1 -1
- package/dist/structure/annual-holidays.d.ts +56 -0
- package/dist/structure/annual-holidays.d.ts.map +1 -0
- package/dist/structure/annual-holidays.js +159 -0
- package/dist/structure/annual-holidays.js.map +1 -0
- package/dist/structure/annual-pay.d.ts +97 -0
- package/dist/structure/annual-pay.d.ts.map +1 -0
- package/dist/structure/annual-pay.js +236 -0
- package/dist/structure/annual-pay.js.map +1 -0
- package/dist/structure/bmi.d.ts +63 -0
- package/dist/structure/bmi.d.ts.map +1 -0
- package/dist/structure/bmi.js +106 -0
- package/dist/structure/bmi.js.map +1 -0
- package/dist/structure/change-rate-table.d.ts +46 -0
- package/dist/structure/change-rate-table.d.ts.map +1 -0
- package/dist/structure/change-rate-table.js +110 -0
- package/dist/structure/change-rate-table.js.map +1 -0
- package/dist/structure/change-rate.d.ts +13 -1
- package/dist/structure/change-rate.d.ts.map +1 -1
- package/dist/structure/change-rate.js +51 -19
- package/dist/structure/change-rate.js.map +1 -1
- package/dist/structure/closing-balance.d.ts +24 -0
- package/dist/structure/closing-balance.d.ts.map +1 -0
- package/dist/structure/closing-balance.js +79 -0
- package/dist/structure/closing-balance.js.map +1 -0
- package/dist/structure/column-date-order.d.ts +5 -0
- package/dist/structure/column-date-order.d.ts.map +1 -0
- package/dist/structure/column-date-order.js +57 -0
- package/dist/structure/column-date-order.js.map +1 -0
- package/dist/structure/compound-hours.d.ts +5 -0
- package/dist/structure/compound-hours.d.ts.map +1 -0
- package/dist/structure/compound-hours.js +45 -0
- package/dist/structure/compound-hours.js.map +1 -0
- package/dist/structure/cumulative-below-current.d.ts +21 -0
- package/dist/structure/cumulative-below-current.d.ts.map +1 -0
- package/dist/structure/cumulative-below-current.js +48 -0
- package/dist/structure/cumulative-below-current.js.map +1 -0
- package/dist/structure/currency-column.d.ts +21 -0
- package/dist/structure/currency-column.d.ts.map +1 -0
- package/dist/structure/currency-column.js +74 -0
- package/dist/structure/currency-column.js.map +1 -0
- package/dist/structure/date-deadline-mark.d.ts +15 -0
- package/dist/structure/date-deadline-mark.d.ts.map +1 -0
- package/dist/structure/date-deadline-mark.js +22 -0
- package/dist/structure/date-deadline-mark.js.map +1 -0
- package/dist/structure/date-outside-period.d.ts +5 -1
- package/dist/structure/date-outside-period.d.ts.map +1 -1
- package/dist/structure/date-outside-period.js +13 -9
- package/dist/structure/date-outside-period.js.map +1 -1
- package/dist/structure/date-range.d.ts +5 -3
- package/dist/structure/date-range.d.ts.map +1 -1
- package/dist/structure/date-range.js +7 -9
- package/dist/structure/date-range.js.map +1 -1
- package/dist/structure/deadline-after-event.d.ts +35 -2
- package/dist/structure/deadline-after-event.d.ts.map +1 -1
- package/dist/structure/deadline-after-event.js +77 -6
- package/dist/structure/deadline-after-event.js.map +1 -1
- package/dist/structure/deductible-limit.d.ts +69 -0
- package/dist/structure/deductible-limit.d.ts.map +1 -0
- package/dist/structure/deductible-limit.js +191 -0
- package/dist/structure/deductible-limit.js.map +1 -0
- package/dist/structure/discount-rate.d.ts +35 -0
- package/dist/structure/discount-rate.d.ts.map +1 -0
- package/dist/structure/discount-rate.js +172 -0
- package/dist/structure/discount-rate.js.map +1 -0
- package/dist/structure/formula-amount.d.ts +38 -0
- package/dist/structure/formula-amount.d.ts.map +1 -0
- package/dist/structure/formula-amount.js +187 -0
- package/dist/structure/formula-amount.js.map +1 -0
- package/dist/structure/generic-role.d.ts +2 -0
- package/dist/structure/generic-role.d.ts.map +1 -0
- package/dist/structure/generic-role.js +8 -0
- package/dist/structure/generic-role.js.map +1 -0
- package/dist/structure/gpa.d.ts +74 -0
- package/dist/structure/gpa.d.ts.map +1 -0
- package/dist/structure/gpa.js +170 -0
- package/dist/structure/gpa.js.map +1 -0
- package/dist/structure/installment-fee.d.ts +52 -0
- package/dist/structure/installment-fee.d.ts.map +1 -0
- package/dist/structure/installment-fee.js +110 -0
- package/dist/structure/installment-fee.js.map +1 -0
- package/dist/structure/installment-total.d.ts +117 -0
- package/dist/structure/installment-total.d.ts.map +1 -0
- package/dist/structure/installment-total.js +224 -0
- package/dist/structure/installment-total.js.map +1 -0
- package/dist/structure/interest.d.ts +22 -0
- package/dist/structure/interest.d.ts.map +1 -0
- package/dist/structure/interest.js +107 -0
- package/dist/structure/interest.js.map +1 -0
- package/dist/structure/key-value-row.d.ts +14 -0
- package/dist/structure/key-value-row.d.ts.map +1 -0
- package/dist/structure/key-value-row.js +38 -0
- package/dist/structure/key-value-row.js.map +1 -0
- package/dist/structure/lab-columns.d.ts +12 -0
- package/dist/structure/lab-columns.d.ts.map +1 -0
- package/dist/structure/lab-columns.js +11 -0
- package/dist/structure/lab-columns.js.map +1 -0
- package/dist/structure/labelled-date-order.d.ts +33 -16
- package/dist/structure/labelled-date-order.d.ts.map +1 -1
- package/dist/structure/labelled-date-order.js +38 -30
- package/dist/structure/labelled-date-order.js.map +1 -1
- package/dist/structure/labelled-order.d.ts +59 -0
- package/dist/structure/labelled-order.d.ts.map +1 -0
- package/dist/structure/labelled-order.js +65 -0
- package/dist/structure/labelled-order.js.map +1 -0
- package/dist/structure/labelled-time-order.d.ts +17 -0
- package/dist/structure/labelled-time-order.d.ts.map +1 -0
- package/dist/structure/labelled-time-order.js +79 -0
- package/dist/structure/labelled-time-order.js.map +1 -0
- package/dist/structure/line-amount-label.d.ts +31 -0
- package/dist/structure/line-amount-label.d.ts.map +1 -0
- package/dist/structure/line-amount-label.js +77 -0
- package/dist/structure/line-amount-label.js.map +1 -0
- package/dist/structure/line-amount-rate.d.ts +47 -0
- package/dist/structure/line-amount-rate.d.ts.map +1 -0
- package/dist/structure/line-amount-rate.js +141 -0
- package/dist/structure/line-amount-rate.js.map +1 -0
- package/dist/structure/line-amount-unit.d.ts +7 -0
- package/dist/structure/line-amount-unit.d.ts.map +1 -1
- package/dist/structure/line-amount-unit.js +11 -0
- package/dist/structure/line-amount-unit.js.map +1 -1
- package/dist/structure/line-amount.d.ts +33 -7
- package/dist/structure/line-amount.d.ts.map +1 -1
- package/dist/structure/line-amount.js +152 -42
- package/dist/structure/line-amount.js.map +1 -1
- package/dist/structure/meter-usage-read.d.ts +21 -0
- package/dist/structure/meter-usage-read.d.ts.map +1 -0
- package/dist/structure/meter-usage-read.js +116 -0
- package/dist/structure/meter-usage-read.js.map +1 -0
- package/dist/structure/meter-usage.d.ts +62 -0
- package/dist/structure/meter-usage.d.ts.map +1 -0
- package/dist/structure/meter-usage.js +157 -0
- package/dist/structure/meter-usage.js.map +1 -0
- package/dist/structure/net-amount.d.ts +81 -0
- package/dist/structure/net-amount.d.ts.map +1 -0
- package/dist/structure/net-amount.js +161 -0
- package/dist/structure/net-amount.js.map +1 -0
- package/dist/structure/net-gross-weight.d.ts +30 -0
- package/dist/structure/net-gross-weight.d.ts.map +1 -0
- package/dist/structure/net-gross-weight.js +79 -0
- package/dist/structure/net-gross-weight.js.map +1 -0
- package/dist/structure/order-quantity.d.ts +38 -0
- package/dist/structure/order-quantity.d.ts.map +1 -0
- package/dist/structure/order-quantity.js +104 -0
- package/dist/structure/order-quantity.js.map +1 -0
- package/dist/structure/party-role.d.ts.map +1 -1
- package/dist/structure/party-role.js +4 -1
- package/dist/structure/party-role.js.map +1 -1
- package/dist/structure/percent-sum.d.ts +2 -0
- package/dist/structure/percent-sum.d.ts.map +1 -1
- package/dist/structure/percent-sum.js +2 -0
- package/dist/structure/percent-sum.js.map +1 -1
- package/dist/structure/period-label-conflict.d.ts +52 -0
- package/dist/structure/period-label-conflict.d.ts.map +1 -0
- package/dist/structure/period-label-conflict.js +105 -0
- package/dist/structure/period-label-conflict.js.map +1 -0
- package/dist/structure/period-labels.d.ts +36 -0
- package/dist/structure/period-labels.d.ts.map +1 -0
- package/dist/structure/period-labels.js +86 -0
- package/dist/structure/period-labels.js.map +1 -0
- package/dist/structure/period-multiple.d.ts +46 -0
- package/dist/structure/period-multiple.d.ts.map +1 -0
- package/dist/structure/period-multiple.js +123 -0
- package/dist/structure/period-multiple.js.map +1 -0
- package/dist/structure/quantity-range.d.ts.map +1 -1
- package/dist/structure/quantity-range.js +1 -5
- package/dist/structure/quantity-range.js.map +1 -1
- package/dist/structure/range-bands.d.ts +2 -0
- package/dist/structure/range-bands.d.ts.map +1 -1
- package/dist/structure/range-bands.js +1 -1
- package/dist/structure/range-bands.js.map +1 -1
- package/dist/structure/range-years.d.ts +18 -0
- package/dist/structure/range-years.d.ts.map +1 -0
- package/dist/structure/range-years.js +60 -0
- package/dist/structure/range-years.js.map +1 -0
- package/dist/structure/ratio.d.ts +136 -0
- package/dist/structure/ratio.d.ts.map +1 -0
- package/dist/structure/ratio.js +214 -0
- package/dist/structure/ratio.js.map +1 -0
- package/dist/structure/reference-flags.d.ts +55 -0
- package/dist/structure/reference-flags.d.ts.map +1 -0
- package/dist/structure/reference-flags.js +116 -0
- package/dist/structure/reference-flags.js.map +1 -0
- package/dist/structure/reference-number-repeated.d.ts +12 -0
- package/dist/structure/reference-number-repeated.d.ts.map +1 -0
- package/dist/structure/reference-number-repeated.js +43 -0
- package/dist/structure/reference-number-repeated.js.map +1 -0
- package/dist/structure/reference-unit.d.ts +24 -0
- package/dist/structure/reference-unit.d.ts.map +1 -0
- package/dist/structure/reference-unit.js +80 -0
- package/dist/structure/reference-unit.js.map +1 -0
- package/dist/structure/rent-multiple.d.ts +2 -22
- package/dist/structure/rent-multiple.d.ts.map +1 -1
- package/dist/structure/rent-multiple.js +2 -49
- package/dist/structure/rent-multiple.js.map +1 -1
- package/dist/structure/revision-direction.d.ts +51 -0
- package/dist/structure/revision-direction.d.ts.map +1 -0
- package/dist/structure/revision-direction.js +163 -0
- package/dist/structure/revision-direction.js.map +1 -0
- package/dist/structure/running-balance.d.ts +36 -0
- package/dist/structure/running-balance.d.ts.map +1 -0
- package/dist/structure/running-balance.js +126 -0
- package/dist/structure/running-balance.js.map +1 -0
- package/dist/structure/scaled-quantities.d.ts +1 -1
- package/dist/structure/scaled-quantities.d.ts.map +1 -1
- package/dist/structure/scaled-quantities.js +23 -6
- package/dist/structure/scaled-quantities.js.map +1 -1
- package/dist/structure/serial-range.d.ts +9 -0
- package/dist/structure/serial-range.d.ts.map +1 -0
- package/dist/structure/serial-range.js +41 -0
- package/dist/structure/serial-range.js.map +1 -0
- package/dist/structure/share-amount.d.ts +55 -0
- package/dist/structure/share-amount.d.ts.map +1 -0
- package/dist/structure/share-amount.js +162 -0
- package/dist/structure/share-amount.js.map +1 -0
- package/dist/structure/shift-times.d.ts +32 -0
- package/dist/structure/shift-times.d.ts.map +1 -0
- package/dist/structure/shift-times.js +112 -0
- package/dist/structure/shift-times.js.map +1 -0
- package/dist/structure/span-label.d.ts +3 -0
- package/dist/structure/span-label.d.ts.map +1 -0
- package/dist/structure/span-label.js +27 -0
- package/dist/structure/span-label.js.map +1 -0
- package/dist/structure/start-end-range.d.ts +30 -0
- package/dist/structure/start-end-range.d.ts.map +1 -0
- package/dist/structure/start-end-range.js +79 -0
- package/dist/structure/start-end-range.js.map +1 -0
- package/dist/structure/stated-multiple.d.ts +39 -0
- package/dist/structure/stated-multiple.d.ts.map +1 -0
- package/dist/structure/stated-multiple.js +49 -0
- package/dist/structure/stated-multiple.js.map +1 -0
- package/dist/structure/stated-period.d.ts +3 -2
- package/dist/structure/stated-period.d.ts.map +1 -1
- package/dist/structure/stated-period.js +17 -11
- package/dist/structure/stated-period.js.map +1 -1
- package/dist/structure/table-scale.d.ts +45 -0
- package/dist/structure/table-scale.d.ts.map +1 -0
- package/dist/structure/table-scale.js +188 -0
- package/dist/structure/table-scale.js.map +1 -0
- package/dist/structure/tax-price.d.ts +29 -0
- package/dist/structure/tax-price.d.ts.map +1 -0
- package/dist/structure/tax-price.js +112 -0
- package/dist/structure/tax-price.js.map +1 -0
- package/dist/structure/tax.d.ts +2 -0
- package/dist/structure/tax.d.ts.map +1 -1
- package/dist/structure/tax.js +46 -23
- package/dist/structure/tax.js.map +1 -1
- package/dist/structure/tier-threshold.d.ts +65 -0
- package/dist/structure/tier-threshold.d.ts.map +1 -0
- package/dist/structure/tier-threshold.js +170 -0
- package/dist/structure/tier-threshold.js.map +1 -0
- package/dist/structure/time-range.d.ts +2 -0
- package/dist/structure/time-range.d.ts.map +1 -1
- package/dist/structure/time-range.js +7 -2
- package/dist/structure/time-range.js.map +1 -1
- package/dist/structure/total-line.d.ts +34 -2
- package/dist/structure/total-line.d.ts.map +1 -1
- package/dist/structure/total-line.js +124 -3
- package/dist/structure/total-line.js.map +1 -1
- package/dist/structure/total-row-blank.d.ts +10 -0
- package/dist/structure/total-row-blank.d.ts.map +1 -0
- package/dist/structure/total-row-blank.js +15 -0
- package/dist/structure/total-row-blank.js.map +1 -0
- package/dist/structure/total.d.ts +13 -3
- package/dist/structure/total.d.ts.map +1 -1
- package/dist/structure/total.js +80 -7
- package/dist/structure/total.js.map +1 -1
- package/dist/structure/variance-table.d.ts +34 -0
- package/dist/structure/variance-table.d.ts.map +1 -0
- package/dist/structure/variance-table.js +130 -0
- package/dist/structure/variance-table.js.map +1 -0
- package/dist/table-names.d.ts +4 -3
- package/dist/table-names.d.ts.map +1 -1
- package/dist/table-names.js +6 -6
- package/dist/table-names.js.map +1 -1
- package/dist/unlabelled-references.d.ts +16 -0
- package/dist/unlabelled-references.d.ts.map +1 -0
- package/dist/unlabelled-references.js +73 -0
- package/dist/unlabelled-references.js.map +1 -0
- package/dist/vehicle-plates.d.ts +28 -0
- package/dist/vehicle-plates.d.ts.map +1 -0
- package/dist/vehicle-plates.js +116 -0
- package/dist/vehicle-plates.js.map +1 -0
- package/dist/whole-word-runs.d.ts +24 -0
- package/dist/whole-word-runs.d.ts.map +1 -0
- package/dist/whole-word-runs.js +26 -0
- package/dist/whole-word-runs.js.map +1 -0
- package/package.json +5 -4
- package/profiles/property-sale.yaml +21 -0
- package/rules/absolute-exception.yaml +1 -1
- package/rules/ai-generated-composite.yaml +1 -1
- package/rules/ai-tell.yaml +1 -1
- package/rules/amount-range-reversed.yaml +1 -1
- package/rules/amount-scale-consistency.yaml +1 -1
- package/rules/announcing-opener.yaml +1 -1
- package/rules/annual-holidays-mismatch.yaml +65 -0
- package/rules/annual-pay-mismatch.yaml +64 -0
- package/rules/article-sound.yaml +1 -1
- package/rules/assistant-residue.yaml +1 -1
- package/rules/attachment-not-attached.yaml +1 -1
- package/rules/backorder-mismatch.yaml +57 -0
- package/rules/bmi-mismatch.yaml +63 -0
- package/rules/bold-label-list.yaml +1 -1
- package/rules/broken-link.yaml +1 -1
- package/rules/capacity-runtime-mismatch.yaml +1 -1
- package/rules/change-rate-mismatch.yaml +6 -6
- package/rules/chat-citation-residue.yaml +2 -2
- package/rules/cliche.yaml +2 -2
- package/rules/closing-balance-mismatch.yaml +63 -0
- package/rules/colon-lead-in.yaml +1 -1
- package/rules/comparative-without-baseline.yaml +1 -1
- package/rules/concrete-evidence-density.yaml +1 -1
- package/rules/connection-time-short.yaml +1 -1
- package/rules/contact-variant.yaml +4 -4
- package/rules/contrast-framing.yaml +2 -2
- package/rules/cross-doc-broken-link.yaml +1 -1
- package/rules/cross-doc-fact-conflict.yaml +1 -1
- package/rules/cross-doc-term-variant.yaml +1 -1
- package/rules/cumulative-below-current.yaml +59 -0
- package/rules/currency-column-mix.yaml +70 -0
- package/rules/currency-notation-consistency.yaml +2 -2
- package/rules/cushion-phrase-density.yaml +1 -1
- package/rules/dangling-participle.yaml +2 -2
- package/rules/dangling-reference.yaml +1 -1
- package/rules/date-format-consistency.yaml +1 -1
- package/rules/date-outside-period.yaml +5 -5
- package/rules/date-range-reversed.yaml +4 -4
- package/rules/date-stamp-order.yaml +2 -2
- package/rules/date-without-year.yaml +12 -12
- package/rules/deadline-after-event.yaml +11 -6
- package/rules/deductible-exceeds-limit.yaml +54 -0
- package/rules/defined-name-repeated.yaml +3 -3
- package/rules/defined-term-form.yaml +2 -2
- package/rules/delivered-over-ordered.yaml +57 -0
- package/rules/demonstrative-opener-run.yaml +1 -1
- package/rules/discount-rate-mismatch.yaml +66 -0
- package/rules/due-before-issue.yaml +33 -12
- package/rules/duration-mismatch.yaml +16 -7
- package/rules/duration-product-mismatch.yaml +11 -3
- package/rules/elapsed-years-mismatch.yaml +11 -6
- package/rules/email-greeting-closing.yaml +2 -2
- package/rules/empty-conclusion.yaml +1 -1
- package/rules/empty-intensifier.yaml +1 -1
- package/rules/empty-list-item.yaml +1 -1
- package/rules/empty-section.yaml +1 -1
- package/rules/empty-table-cell.yaml +2 -2
- package/rules/expletive-construction.yaml +1 -1
- package/rules/fact-conflict.yaml +16 -4
- package/rules/figurative-density.yaml +1 -1
- package/rules/figure-reference-order.yaml +1 -1
- package/rules/footnote-mismatch.yaml +1 -1
- package/rules/formula-amount-mismatch.yaml +67 -0
- package/rules/fullwidth-alnum-consistency.yaml +1 -1
- package/rules/gpa-mismatch.yaml +80 -0
- package/rules/heading-end-punctuation-mix.yaml +1 -1
- package/rules/heading-level-skip.yaml +1 -1
- package/rules/heading-numbering-mix.yaml +3 -3
- package/rules/homophone-slip.yaml +1 -1
- package/rules/humble-for-others.yaml +1 -1
- package/rules/idiom-misuse.yaml +1 -1
- package/rules/ime-residue.yaml +1 -1
- package/rules/impossible-date.yaml +10 -6
- package/rules/installment-total-mismatch.yaml +63 -0
- package/rules/interest-mismatch.yaml +50 -0
- package/rules/interval-count-mismatch.yaml +1 -1
- package/rules/invisible-character.yaml +1 -1
- package/rules/kana-function-word.yaml +2 -2
- package/rules/katakana-density.yaml +1 -1
- package/rules/katakana-long-vowel.yaml +2 -2
- package/rules/kutoten-consistency.yaml +1 -1
- package/rules/latin-spacing.yaml +20 -6
- package/rules/layout-code-mismatch.yaml +1 -1
- package/rules/less-for-fewer.yaml +1 -1
- package/rules/line-amount-mismatch.yaml +8 -7
- package/rules/link-text-url-mismatch.yaml +1 -1
- package/rules/list-item-form-mix.yaml +1 -1
- package/rules/lookalike-character.yaml +1 -1
- package/rules/max-kanji-continuous.yaml +1 -1
- package/rules/meter-usage-mismatch.yaml +64 -0
- package/rules/misconversion.yaml +1 -1
- package/rules/modal-conflict.yaml +1 -1
- package/rules/name-variant.yaml +12 -3
- package/rules/net-amount-mismatch.yaml +57 -0
- package/rules/net-over-gross.yaml +57 -0
- package/rules/no-doubled-joshi.yaml +1 -1
- package/rules/no-mixed-desumasu.yaml +1 -1
- package/rules/no-nakaguro-parallel.yaml +1 -1
- package/rules/nominalization.yaml +1 -1
- package/rules/nonstandard-word.yaml +1 -1
- package/rules/number-style-consistency.yaml +3 -3
- package/rules/number-without-unit.yaml +1 -1
- package/rules/number-word-figure-mismatch.yaml +1 -1
- package/rules/numbering-gap.yaml +1 -1
- package/rules/obligation-without-deadline.yaml +1 -1
- package/rules/ordinal-suffix-mismatch.yaml +1 -1
- package/rules/orthographic-variant.yaml +5 -5
- package/rules/outside-announced-list.yaml +1 -1
- package/rules/padded-intro.yaml +1 -1
- package/rules/paragraph-restatement.yaml +1 -1
- package/rules/party-role-name.yaml +3 -3
- package/rules/percent-sum-mismatch.yaml +2 -2
- package/rules/period-label-conflict.yaml +68 -0
- package/rules/period-multiple-mismatch.yaml +61 -0
- package/rules/period-part-exceeds-whole.yaml +62 -0
- package/rules/person-consistency.yaml +1 -1
- package/rules/phone-number-variant.yaml +3 -3
- package/rules/preferred-term.yaml +2 -2
- package/rules/prerequisite-after-step.yaml +1 -1
- package/rules/product-exceeds-maximum.yaml +49 -0
- package/rules/proper-noun-density.yaml +1 -1
- package/rules/quantity-range-reversed.yaml +2 -2
- package/rules/range-band-mismatch.yaml +1 -1
- package/rules/ratio-mismatch.yaml +64 -0
- package/rules/reference-flag-mismatch.yaml +74 -0
- package/rules/reference-number-repeated.yaml +63 -0
- package/rules/reference-number-variant.yaml +81 -0
- package/rules/reference-title-mismatch.yaml +1 -1
- package/rules/reference-topic-missing.yaml +1 -1
- package/rules/reference-unit-mismatch.yaml +62 -0
- package/rules/relative-date-mismatch.yaml +1 -1
- package/rules/request-without-deadline.yaml +3 -3
- package/rules/required-listed-as-preferred.yaml +1 -1
- package/rules/required-sections.yaml +2 -2
- package/rules/requirement-modal.yaml +2 -2
- package/rules/requirement-smell.yaml +1 -1
- package/rules/revision-direction-mismatch.yaml +66 -0
- package/rules/risk-disclosure.yaml +1 -1
- package/rules/running-balance-mismatch.yaml +59 -0
- package/rules/scaled-quantity-mismatch.yaml +1 -1
- package/rules/serial-range-reversed.yaml +52 -0
- package/rules/share-amount-mismatch.yaml +58 -0
- package/rules/share-over-hundred.yaml +1 -1
- package/rules/shell-prompt-mix.yaml +1 -1
- package/rules/space-before-punctuation.yaml +1 -1
- package/rules/spelling-consistency.yaml +1 -1
- package/rules/step-statement-mix.yaml +3 -3
- package/rules/stock-transition.yaml +1 -1
- package/rules/summary-fact-mismatch.yaml +1 -1
- package/rules/table-header-variant.yaml +1 -1
- package/rules/table-unit-mix.yaml +82 -0
- package/rules/taigen-dome-in-prose.yaml +1 -1
- package/rules/tax-mismatch.yaml +13 -7
- package/rules/tier-threshold-mismatch.yaml +73 -0
- package/rules/time-order.yaml +7 -4
- package/rules/time-range-reversed.yaml +9 -4
- package/rules/toc-heading-mismatch.yaml +1 -1
- package/rules/topic-predicate-distance.yaml +1 -1
- package/rules/total-mismatch.yaml +5 -5
- package/rules/ui-label-variant.yaml +1 -1
- package/rules/unclosed-code-fence.yaml +1 -1
- package/rules/uncomparable-graded.yaml +2 -2
- package/rules/undefined-term.yaml +2 -2
- package/rules/unfilled-placeholder.yaml +2 -2
- package/rules/unit-mismatch.yaml +1 -1
- package/rules/unit-spacing-consistency.yaml +1 -1
- package/rules/unknown-word.yaml +1 -1
- package/rules/url-run-on.yaml +1 -1
- package/rules/vague-deadline.yaml +1 -1
- package/rules/vague-figure-reference.yaml +1 -1
- package/rules/vague-word-density.yaml +2 -2
- package/rules/variance-mismatch.yaml +67 -0
- package/rules/very-adjective.yaml +1 -1
- package/rules/walk-time-distance-mismatch.yaml +1 -1
- package/rules/warning-without-action.yaml +1 -1
- package/rules/weasel-word.yaml +2 -2
- package/rules/wordy-phrase.yaml +2 -2
- package/rules/yori-as-from.yaml +1 -1
- package/skills/chaff/SKILL.md +59 -9
- package/src/cli-text.ts +2 -2
- package/src/company-kana-spelling.ts +105 -0
- package/src/company-names.ts +159 -26
- package/src/contacts/table-rows.ts +51 -0
- package/src/cross-run.ts +1 -0
- package/src/derived/age-on-date.ts +161 -0
- package/src/derived/durations.ts +83 -12
- package/src/derived/hours-and-minutes.ts +41 -0
- package/src/derived/hyphenated-counts.ts +38 -0
- package/src/derived/marked-dates.ts +61 -0
- package/src/derived/money-span.ts +10 -0
- package/src/derived/period-parts.ts +360 -0
- package/src/derived/readable-date.ts +63 -0
- package/src/derived/stays.ts +7 -2
- package/src/derived/timesheet-hours.ts +112 -0
- package/src/derived/use-maximum.ts +158 -0
- package/src/derived/working-hours.ts +2 -2
- package/src/detectors/agreement-slip.ts +3 -0
- package/src/detectors/annual-holidays-mismatch.ts +41 -0
- package/src/detectors/annual-pay-mismatch.ts +71 -0
- package/src/detectors/blank-structure.ts +54 -14
- package/src/detectors/bmi-mismatch.ts +82 -0
- package/src/detectors/change-rate.ts +27 -4
- package/src/detectors/closing-balance-mismatch.ts +52 -0
- package/src/detectors/contact-variant.ts +8 -2
- package/src/detectors/cumulative-below-current.ts +30 -0
- package/src/detectors/currency-column.ts +37 -0
- package/src/detectors/date-any-year.ts +130 -0
- package/src/detectors/date-outside-period.ts +4 -10
- package/src/detectors/date-stamp-order.ts +2 -1
- package/src/detectors/date-year.ts +55 -13
- package/src/detectors/deductible-exceeds-limit.ts +55 -0
- package/src/detectors/defined-term-form.ts +6 -23
- package/src/detectors/derived-numbers.ts +50 -89
- package/src/detectors/discount-rate.ts +41 -0
- package/src/detectors/due-date.ts +21 -7
- package/src/detectors/email-letter.ts +45 -15
- package/src/detectors/event-deadline.ts +13 -3
- package/src/detectors/fact-consistency.ts +145 -7
- package/src/detectors/formula-amount.ts +59 -0
- package/src/detectors/gloss-year.ts +21 -0
- package/src/detectors/gpa-mismatch.ts +43 -0
- package/src/detectors/impossible-date.ts +25 -3
- package/src/detectors/installment-total-mismatch.ts +94 -0
- package/src/detectors/interest.ts +43 -0
- package/src/detectors/lab-columns.ts +9 -0
- package/src/detectors/labelled-age.ts +154 -0
- package/src/detectors/line-amount.ts +58 -3
- package/src/detectors/measured-facts.ts +1 -1
- package/src/detectors/meter-usage.ts +49 -0
- package/src/detectors/name-field.ts +43 -0
- package/src/detectors/name-variant.ts +160 -16
- package/src/detectors/net-amount-mismatch.ts +86 -0
- package/src/detectors/net-gross-weight.ts +39 -0
- package/src/detectors/nominal-step.ts +35 -0
- package/src/detectors/number-style.ts +11 -2
- package/src/detectors/order-quantity.ts +46 -0
- package/src/detectors/orthographic-variant.ts +43 -11
- package/src/detectors/orthography.ts +27 -11
- package/src/detectors/period-label-conflict.ts +43 -0
- package/src/detectors/period-multiple-mismatch.ts +54 -0
- package/src/detectors/period-part.ts +71 -0
- package/src/detectors/range-words.ts +17 -0
- package/src/detectors/ratio-mismatch.ts +116 -0
- package/src/detectors/readable-dates.ts +36 -0
- package/src/detectors/reference-flag.ts +36 -0
- package/src/detectors/reference-number-repeated.ts +25 -0
- package/src/detectors/reference-number-variant.ts +44 -0
- package/src/detectors/reference-unit.ts +24 -0
- package/src/detectors/registry/annual-holidays-mismatch.ts +4 -0
- package/src/detectors/registry/annual-pay-mismatch.ts +4 -0
- package/src/detectors/registry/backorder-mismatch.ts +4 -0
- package/src/detectors/registry/bmi-mismatch.ts +4 -0
- package/src/detectors/registry/closing-balance-mismatch.ts +4 -0
- package/src/detectors/registry/cumulative-below-current.ts +4 -0
- package/src/detectors/registry/currency-column-mix.ts +4 -0
- package/src/detectors/registry/deductible-exceeds-limit.ts +4 -0
- package/src/detectors/registry/delivered-over-ordered.ts +4 -0
- package/src/detectors/registry/discount-rate.ts +4 -0
- package/src/detectors/registry/elapsed-years-mismatch.ts +1 -1
- package/src/detectors/registry/formula-amount.ts +4 -0
- package/src/detectors/registry/gpa-mismatch.ts +4 -0
- package/src/detectors/registry/installment-total-mismatch.ts +4 -0
- package/src/detectors/registry/interest.ts +4 -0
- package/src/detectors/registry/meter-usage.ts +4 -0
- package/src/detectors/registry/net-amount-mismatch.ts +4 -0
- package/src/detectors/registry/net-over-gross.ts +4 -0
- package/src/detectors/registry/period-label-conflict.ts +4 -0
- package/src/detectors/registry/period-multiple-mismatch.ts +4 -0
- package/src/detectors/registry/period-part-exceeds-whole.ts +4 -0
- package/src/detectors/registry/product-exceeds-maximum.ts +4 -0
- package/src/detectors/registry/ratio-mismatch.ts +4 -0
- package/src/detectors/registry/reference-flag-mismatch.ts +4 -0
- package/src/detectors/registry/reference-number-repeated.ts +4 -0
- package/src/detectors/registry/reference-number-variant.ts +4 -0
- package/src/detectors/registry/reference-unit.ts +4 -0
- package/src/detectors/registry/revision-direction.ts +4 -0
- package/src/detectors/registry/running-balance.ts +4 -0
- package/src/detectors/registry/serial-range.ts +4 -0
- package/src/detectors/registry/share-amount.ts +4 -0
- package/src/detectors/registry/table-unit-mix.ts +4 -0
- package/src/detectors/registry/tier-threshold.ts +4 -0
- package/src/detectors/registry/variance-mismatch.ts +4 -0
- package/src/detectors/relative-dates.ts +2 -1
- package/src/detectors/relative-day-words.ts +2 -1
- package/src/detectors/rent-multiple-mismatch.ts +3 -2
- package/src/detectors/request-owner.ts +5 -2
- package/src/detectors/revision-direction.ts +44 -0
- package/src/detectors/row-sentence-amounts.ts +96 -0
- package/src/detectors/running-balance.ts +31 -0
- package/src/detectors/scaled-quantity.ts +1 -1
- package/src/detectors/serial-range.ts +37 -0
- package/src/detectors/share-amount.ts +51 -0
- package/src/detectors/structure-tree.ts +62 -12
- package/src/detectors/table-scale.ts +37 -0
- package/src/detectors/tax-amount.ts +45 -13
- package/src/detectors/technical-docs.ts +4 -2
- package/src/detectors/tier-threshold.ts +108 -0
- package/src/detectors/time-order.ts +52 -18
- package/src/detectors/use-maximum.ts +38 -0
- package/src/detectors/variance.ts +33 -0
- package/src/detectors/whole-count-findings.ts +48 -0
- package/src/detectors/working-hours-findings.ts +100 -0
- package/src/eval.ts +3 -3
- package/src/facts/age-values.ts +124 -0
- package/src/facts/cell-keys.ts +21 -0
- package/src/facts/count-labels.ts +28 -0
- package/src/facts/document-terms.ts +107 -0
- package/src/facts/duration-scale.ts +22 -0
- package/src/facts/duration-values.ts +44 -0
- package/src/facts/fact-values.ts +36 -7
- package/src/facts/labelled-facts.ts +66 -9
- package/src/facts/measure-units.ts +28 -10
- package/src/facts/measures.ts +11 -11
- package/src/facts/qualified-labels.ts +126 -0
- package/src/facts/rate-values.ts +117 -0
- package/src/facts/row-sentence-amounts.ts +113 -0
- package/src/facts/superscript-power.ts +5 -0
- package/src/facts/table-facts.ts +35 -7
- package/src/facts/term-values.ts +236 -0
- package/src/facts/unit-word.ts +13 -0
- package/src/facts/verb-quantity-facts.ts +84 -0
- package/src/facts/whole-counts.ts +183 -0
- package/src/fix-plan/text.ts +2 -2
- package/src/lexicon-genres.ts +11 -0
- package/src/name-char-reading.ts +24 -0
- package/src/name-line-block.ts +40 -0
- package/src/name-lookalike-chars.ts +53 -0
- package/src/name-neighbours.ts +58 -0
- package/src/name-ordinary-word.ts +68 -0
- package/src/name-person.ts +31 -0
- package/src/name-separator.ts +48 -0
- package/src/name-variants.ts +42 -86
- package/src/name-weight.ts +12 -0
- package/src/person-field.ts +43 -0
- package/src/person-full-name.ts +70 -0
- package/src/phone-numbers.ts +54 -18
- package/src/plugin.ts +8 -0
- package/src/product-names.ts +98 -0
- package/src/profile/parse.ts +8 -0
- package/src/reference-numbers.ts +55 -0
- package/src/run.ts +1 -0
- package/src/spaced-person-name.ts +97 -0
- package/src/spacing-code.ts +22 -1
- package/src/structure/annual-holidays.ts +222 -0
- package/src/structure/annual-pay.ts +339 -0
- package/src/structure/bmi.ts +133 -0
- package/src/structure/change-rate-table.ts +135 -0
- package/src/structure/change-rate.ts +54 -17
- package/src/structure/closing-balance.ts +104 -0
- package/src/structure/column-date-order.ts +73 -0
- package/src/structure/compound-hours.ts +49 -0
- package/src/structure/cumulative-below-current.ts +66 -0
- package/src/structure/currency-column.ts +97 -0
- package/src/structure/date-deadline-mark.ts +30 -0
- package/src/structure/date-outside-period.ts +17 -9
- package/src/structure/date-range.ts +9 -11
- package/src/structure/deadline-after-event.ts +125 -8
- package/src/structure/deductible-limit.ts +255 -0
- package/src/structure/discount-rate.ts +209 -0
- package/src/structure/formula-amount.ts +236 -0
- package/src/structure/generic-role.ts +8 -0
- package/src/structure/gpa.ts +218 -0
- package/src/structure/installment-fee.ts +201 -0
- package/src/structure/installment-total.ts +343 -0
- package/src/structure/interest.ts +133 -0
- package/src/structure/key-value-row.ts +45 -0
- package/src/structure/lab-columns.ts +21 -0
- package/src/structure/labelled-date-order.ts +68 -52
- package/src/structure/labelled-order.ts +122 -0
- package/src/structure/labelled-time-order.ts +100 -0
- package/src/structure/line-amount-label.ts +100 -0
- package/src/structure/line-amount-rate.ts +178 -0
- package/src/structure/line-amount-unit.ts +16 -0
- package/src/structure/line-amount.ts +200 -48
- package/src/structure/meter-usage-read.ts +139 -0
- package/src/structure/meter-usage.ts +224 -0
- package/src/structure/net-amount.ts +243 -0
- package/src/structure/net-gross-weight.ts +97 -0
- package/src/structure/order-quantity.ts +125 -0
- package/src/structure/party-role.ts +4 -1
- package/src/structure/percent-sum.ts +3 -0
- package/src/structure/period-label-conflict.ts +174 -0
- package/src/structure/period-labels.ts +147 -0
- package/src/structure/period-multiple.ts +186 -0
- package/src/structure/quantity-range.ts +1 -8
- package/src/structure/range-bands.ts +1 -1
- package/src/structure/range-years.ts +75 -0
- package/src/structure/ratio.ts +296 -0
- package/src/structure/reference-flags.ts +156 -0
- package/src/structure/reference-number-repeated.ts +57 -0
- package/src/structure/reference-unit.ts +105 -0
- package/src/structure/rent-multiple.ts +12 -82
- package/src/structure/revision-direction.ts +214 -0
- package/src/structure/running-balance.ts +157 -0
- package/src/structure/scaled-quantities.ts +20 -6
- package/src/structure/serial-range.ts +52 -0
- package/src/structure/share-amount.ts +206 -0
- package/src/structure/shift-times.ts +136 -0
- package/src/structure/span-label.ts +26 -0
- package/src/structure/start-end-range.ts +120 -0
- package/src/structure/stated-multiple.ts +82 -0
- package/src/structure/stated-period.ts +23 -11
- package/src/structure/table-scale.ts +239 -0
- package/src/structure/tax-price.ts +136 -0
- package/src/structure/tax.ts +55 -20
- package/src/structure/tier-threshold.ts +218 -0
- package/src/structure/time-range.ts +9 -3
- package/src/structure/total-line.ts +174 -5
- package/src/structure/total-row-blank.ts +23 -0
- package/src/structure/total.ts +122 -13
- package/src/structure/variance-table.ts +167 -0
- package/src/table-names.ts +6 -6
- package/src/unlabelled-references.ts +83 -0
- package/src/vehicle-plates.ts +142 -0
- package/src/whole-word-runs.ts +38 -0
|
@@ -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
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { escapeRegExp } from "../orthography.ts";
|
|
2
1
|
import type { StructureIssue } from "./issues.ts";
|
|
2
|
+
import { alternation, intervalOf, isMultiple, isPlainGap, nearestStated, occurrences, type Interval, type StatedAmount } from "./stated-multiple.ts";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* rent-multiple-mismatch: a deposit, key money or guarantee given both as a number of months of rent and as an amount that
|
|
@@ -11,15 +11,6 @@ import type { StructureIssue } from "./issues.ts";
|
|
|
11
11
|
* range of months, and two different pairs in one statement are not compared. The words come from the lexicons. Pure.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
/** One amount of money as read: its currency, its value, and the value of the word of scale written in it (万), if any. */
|
|
15
|
-
export type RentAmount = {
|
|
16
|
-
readonly offset: number;
|
|
17
|
-
readonly end: number;
|
|
18
|
-
readonly currency: string;
|
|
19
|
-
readonly value: number;
|
|
20
|
-
readonly scale: number | undefined;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
14
|
export type RentMultipleWords = {
|
|
24
15
|
/** Labels of the monthly rent (賃料, Rent). */
|
|
25
16
|
readonly rents: readonly string[];
|
|
@@ -41,70 +32,21 @@ export type RentMultipleWords = {
|
|
|
41
32
|
readonly numberWords: readonly { readonly word: string; readonly value: number }[];
|
|
42
33
|
};
|
|
43
34
|
|
|
44
|
-
/** An amount read as the interval its written digits allow (9.8万円 is anything from 97,500 to 98,500). */
|
|
45
|
-
export type Interval = { readonly low: number; readonly high: number };
|
|
46
|
-
|
|
47
35
|
/** A rent or fee as stated. range is undefined when the label has amounts that are not one monthly amount (a change, per week). */
|
|
48
36
|
type Stated = { readonly offset: number; readonly currency: string; readonly range: Interval | undefined; readonly written: string };
|
|
49
37
|
|
|
50
38
|
type Months = { readonly start: number; readonly end: number; readonly count: number };
|
|
51
39
|
|
|
52
|
-
/** Rounding to the currency's unit (a yen, a dollar) is allowed on top of the written precision. */
|
|
53
|
-
const UNIT_SLACK = 1;
|
|
54
|
-
|
|
55
|
-
const LATIN = /[A-Za-z]/u;
|
|
56
|
-
const SEPARATORS = /[\s||::==、,,・//'’()()[\][]-]/gu;
|
|
57
|
-
const PARENTHETICAL_WITHOUT_DIGITS = /[((][^()()0-90-9]*[))]/gu;
|
|
58
|
-
/** The possessive after a months count (2 months' rent, 1 month's rent). */
|
|
59
|
-
const POSSESSIVE = /['’]s?(?![A-Za-z])/gu;
|
|
60
40
|
const RANGE_START = /[0-90-9A-Za-z一二三四五六七八九十]\s*$/u;
|
|
61
41
|
const SENTENCE_END = /[。!?;;]|[.!?](?=\s|$)/u;
|
|
62
42
|
const DIGITS = "[0-90-9]+(?:[..][0-90-9]+)?";
|
|
63
43
|
|
|
64
|
-
const wordPattern = (word: string): string => {
|
|
65
|
-
const edgeStart = LATIN.test(word.charAt(0)) ? "(?<![A-Za-z])" : "";
|
|
66
|
-
const edgeEnd = LATIN.test(word.charAt(word.length - 1)) ? "(?![A-Za-z])" : "";
|
|
67
|
-
return `${edgeStart}${escapeRegExp(word)}${edgeEnd}`;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
/** One alternation of the words, longest first so 月額賃料 wins over 賃料. Undefined when there are none. */
|
|
71
|
-
const alternation = (words: readonly string[]): string | undefined =>
|
|
72
|
-
words.length === 0
|
|
73
|
-
? undefined
|
|
74
|
-
: words
|
|
75
|
-
.toSorted((left, right) => right.length - left.length)
|
|
76
|
-
.map(wordPattern)
|
|
77
|
-
.join("|");
|
|
78
|
-
|
|
79
|
-
const occurrences = (text: string, words: readonly string[]): { readonly start: number; readonly end: number }[] => {
|
|
80
|
-
const pattern = alternation(words);
|
|
81
|
-
if (pattern === undefined) return [];
|
|
82
|
-
return [...text.matchAll(new RegExp(pattern, "giu"))].map((match) => ({ start: match.index, end: match.index + match[0].length }));
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
const withoutWords = (text: string, words: readonly string[]): string => {
|
|
86
|
-
const pattern = alternation(words);
|
|
87
|
-
return pattern === undefined ? text : text.replace(new RegExp(pattern, "giu"), "");
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/** Whether only separators, bracketed words and link words stand in the gap (「 | 」, " (monthly): ", "の", "'s rent ("). */
|
|
91
|
-
export const isPlainGap = (gap: string, words: readonly string[]): boolean =>
|
|
92
|
-
withoutWords(gap.replace(PARENTHETICAL_WITHOUT_DIGITS, "").replace(POSSESSIVE, ""), words).replace(SEPARATORS, "") === "";
|
|
93
|
-
|
|
94
|
-
const decimalsOf = (written: string): number => /[..]([0-90-9]+)/u.exec(written)?.[1]?.length ?? 0;
|
|
95
|
-
|
|
96
|
-
/** The interval an amount's digits allow: a word of scale (9.8万) leaves half its last digit either way; plain digits are exact. */
|
|
97
|
-
export const intervalOf = (amount: RentAmount, written: string): Interval => {
|
|
98
|
-
const half = amount.scale === undefined ? 0 : (amount.scale * 10 ** -decimalsOf(written)) / 2;
|
|
99
|
-
return { low: amount.value - half, high: amount.value + half };
|
|
100
|
-
};
|
|
101
|
-
|
|
102
44
|
const lineBounds = (text: string, offset: number): { readonly start: number; readonly end: number } => {
|
|
103
45
|
const end = text.indexOf("\n", offset);
|
|
104
46
|
return { start: text.lastIndexOf("\n", offset - 1) + 1, end: end === -1 ? text.length : end };
|
|
105
47
|
};
|
|
106
48
|
|
|
107
|
-
const amountsBetween = (amounts: readonly
|
|
49
|
+
const amountsBetween = (amounts: readonly StatedAmount[], start: number, end: number): StatedAmount[] =>
|
|
108
50
|
amounts.filter((amount) => amount.offset >= start && amount.end <= end);
|
|
109
51
|
|
|
110
52
|
/** A label preceded by a months count (2 months' rent, First month's rent) names a multiple, not the rent. */
|
|
@@ -114,7 +56,7 @@ const followsMonths = (before: string, words: RentMultipleWords): boolean => {
|
|
|
114
56
|
};
|
|
115
57
|
|
|
116
58
|
/** The second end of a range that starts with this amount (85,000円〜90,000円), if one follows. */
|
|
117
|
-
const rangeEnd = (text: string, first:
|
|
59
|
+
const rangeEnd = (text: string, first: StatedAmount, next: StatedAmount | undefined, words: RentMultipleWords): StatedAmount | undefined => {
|
|
118
60
|
if (next === undefined || next.currency !== first.currency || next.value < first.value) return undefined;
|
|
119
61
|
const joint = text.slice(first.end, next.offset).trim();
|
|
120
62
|
return words.connectors.some((connector) => connector.toLowerCase() === joint.toLowerCase()) ? next : undefined;
|
|
@@ -133,7 +75,7 @@ const labelledEnd = (text: string, from: number, lineEnd: number, words: RentMul
|
|
|
133
75
|
const statedAt = (
|
|
134
76
|
text: string,
|
|
135
77
|
label: { readonly start: number; readonly end: number },
|
|
136
|
-
amounts: readonly
|
|
78
|
+
amounts: readonly StatedAmount[],
|
|
137
79
|
words: RentMultipleWords,
|
|
138
80
|
): Stated[] => {
|
|
139
81
|
const line = lineBounds(text, label.start);
|
|
@@ -149,7 +91,7 @@ const statedAt = (
|
|
|
149
91
|
};
|
|
150
92
|
|
|
151
93
|
/** Each label of the kind followed on its line by an amount (賃料 | 98,000円, Rent: $1,600 to $1,700), in document order. */
|
|
152
|
-
const statedAmounts = (text: string, labels: readonly string[], amounts: readonly
|
|
94
|
+
const statedAmounts = (text: string, labels: readonly string[], amounts: readonly StatedAmount[], words: RentMultipleWords): Stated[] =>
|
|
153
95
|
occurrences(text, labels).flatMap((label) => statedAt(text, label, amounts, words));
|
|
154
96
|
|
|
155
97
|
const numberWordValue = (word: string, words: RentMultipleWords): number | undefined =>
|
|
@@ -177,13 +119,13 @@ const endsRange = (text: string, months: Months, words: RentMultipleWords): bool
|
|
|
177
119
|
return words.connectors.some((connector) => before.endsWith(connector) && RANGE_START.test(before.slice(0, -connector.length)));
|
|
178
120
|
};
|
|
179
121
|
|
|
180
|
-
type Pair = { readonly months: Months; readonly amount:
|
|
122
|
+
type Pair = { readonly months: Months; readonly amount: StatedAmount };
|
|
181
123
|
|
|
182
|
-
const gapBetween = (text: string, months: Months, amount:
|
|
124
|
+
const gapBetween = (text: string, months: Months, amount: StatedAmount): string =>
|
|
183
125
|
amount.offset >= months.end ? text.slice(months.end, amount.offset) : text.slice(amount.end, months.start);
|
|
184
126
|
|
|
185
127
|
/** A months count and an amount standing together, either way round (1か月(98,000円), $3,200 (2 months' rent)). */
|
|
186
|
-
const pairsIn = (text: string, months: readonly Months[], amounts: readonly
|
|
128
|
+
const pairsIn = (text: string, months: readonly Months[], amounts: readonly StatedAmount[], words: RentMultipleWords): Pair[] => {
|
|
187
129
|
const between = [...words.links, ...words.rents];
|
|
188
130
|
return months.flatMap((count) =>
|
|
189
131
|
amounts
|
|
@@ -206,7 +148,7 @@ const statementAt = (
|
|
|
206
148
|
text: string,
|
|
207
149
|
label: { readonly start: number; readonly end: number },
|
|
208
150
|
next: number | undefined,
|
|
209
|
-
amounts: readonly
|
|
151
|
+
amounts: readonly StatedAmount[],
|
|
210
152
|
words: RentMultipleWords,
|
|
211
153
|
): Statement[] => {
|
|
212
154
|
const end = statementEnd(text, label.end, next);
|
|
@@ -221,19 +163,11 @@ const statementAt = (
|
|
|
221
163
|
};
|
|
222
164
|
|
|
223
165
|
/** Every label of a multiple with one months count and one amount (敷金 | 2か月(98,000円)). */
|
|
224
|
-
const multipleStatements = (text: string, amounts: readonly
|
|
166
|
+
const multipleStatements = (text: string, amounts: readonly StatedAmount[], words: RentMultipleWords): Statement[] => {
|
|
225
167
|
const labels = occurrences(text, words.multiples);
|
|
226
168
|
return labels.flatMap((label, index) => statementAt(text, label, labels[index + 1]?.start, amounts, words));
|
|
227
169
|
};
|
|
228
170
|
|
|
229
|
-
/** The rent a statement at this offset is of: the nearest before it, or, before any, the one rent the document states. */
|
|
230
|
-
export const rentFor = <T extends Stated>(rents: readonly T[], offset: number): T | undefined => {
|
|
231
|
-
const before = rents.filter((rent) => rent.offset < offset).at(-1);
|
|
232
|
-
if (before !== undefined) return before;
|
|
233
|
-
const [first] = rents;
|
|
234
|
-
return rents.every((rent) => rent.range !== undefined && rent.range.low === first?.range?.low && rent.range.high === first.range.high) ? first : undefined;
|
|
235
|
-
};
|
|
236
|
-
|
|
237
171
|
/** The fees of the listing a rent belongs to: those after it and before the next rent; for the first rent, else those before it. */
|
|
238
172
|
export const feesFor = <T extends Stated>(rent: Stated, rents: readonly Stated[], fees: readonly T[]): T[] => {
|
|
239
173
|
const index = rents.indexOf(rent);
|
|
@@ -252,12 +186,8 @@ export const monthlyBases = (rent: Interval, fees: readonly Interval[]): Interva
|
|
|
252
186
|
return [rent, ...withEach, ...withAll];
|
|
253
187
|
};
|
|
254
188
|
|
|
255
|
-
/** Whether the amount is the count of months of one of the bases, within the written precision and a unit's rounding. */
|
|
256
|
-
export const isMultiple = (count: number, amount: Interval, bases: readonly Interval[]): boolean =>
|
|
257
|
-
bases.some((base) => count * base.low - UNIT_SLACK <= amount.high && amount.low <= count * base.high + UNIT_SLACK);
|
|
258
|
-
|
|
259
189
|
const mismatchOf = (text: string, statement: Statement, rents: readonly Stated[], fees: readonly Stated[]): StructureIssue[] => {
|
|
260
|
-
const rent =
|
|
190
|
+
const rent = nearestStated(rents, statement.label);
|
|
261
191
|
const { months, amount } = statement.pair;
|
|
262
192
|
if (rent?.range === undefined || rent.currency !== amount.currency) return [];
|
|
263
193
|
const feeRanges = feesFor(rent, rents, fees).map((fee) => fee.range);
|
|
@@ -269,7 +199,7 @@ const mismatchOf = (text: string, statement: Statement, rents: readonly Stated[]
|
|
|
269
199
|
};
|
|
270
200
|
|
|
271
201
|
/** Every multiple of rent whose amount is not that many months of the listing's rent (or of the rent and its fee). */
|
|
272
|
-
export const rentMultipleMismatches = (text: string, amounts: readonly
|
|
202
|
+
export const rentMultipleMismatches = (text: string, amounts: readonly StatedAmount[], words: RentMultipleWords): StructureIssue[] => {
|
|
273
203
|
const rents = statedAmounts(text, words.rents, amounts, words);
|
|
274
204
|
if (rents.length === 0) return [];
|
|
275
205
|
const fees = statedAmounts(text, words.fees, amounts, words);
|