chaffjs 0.30.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +330 -0
- package/README.md +119 -257
- package/dist/announced-count.d.ts +2 -0
- package/dist/announced-count.d.ts.map +1 -1
- package/dist/announced-count.js +4 -3
- package/dist/announced-count.js.map +1 -1
- 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/addresses.d.ts +21 -0
- package/dist/contacts/addresses.d.ts.map +1 -0
- package/dist/contacts/addresses.js +144 -0
- package/dist/contacts/addresses.js.map +1 -0
- package/dist/contacts/emails.d.ts +11 -0
- package/dist/contacts/emails.d.ts.map +1 -0
- package/dist/contacts/emails.js +51 -0
- package/dist/contacts/emails.js.map +1 -0
- 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/contacts/variants.d.ts +14 -0
- package/dist/contacts/variants.d.ts.map +1 -0
- package/dist/contacts/variants.js +25 -0
- package/dist/contacts/variants.js.map +1 -0
- 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/battery-runtime.d.ts +85 -0
- package/dist/derived/battery-runtime.d.ts.map +1 -0
- package/dist/derived/battery-runtime.js +217 -0
- package/dist/derived/battery-runtime.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-counts.d.ts +48 -0
- package/dist/derived/period-counts.d.ts.map +1 -0
- package/dist/derived/period-counts.js +128 -0
- package/dist/derived/period-counts.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/time-lengths.d.ts.map +1 -1
- package/dist/derived/time-lengths.js +12 -9
- package/dist/derived/time-lengths.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-interval.d.ts +33 -0
- package/dist/derived/use-interval.d.ts.map +1 -0
- package/dist/derived/use-interval.js +93 -0
- package/dist/derived/use-interval.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/announced-count.d.ts.map +1 -1
- package/dist/detectors/announced-count.js +1 -0
- package/dist/detectors/announced-count.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/capacity-runtime.d.ts +7 -0
- package/dist/detectors/capacity-runtime.d.ts.map +1 -0
- package/dist/detectors/capacity-runtime.js +98 -0
- package/dist/detectors/capacity-runtime.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 +3 -0
- package/dist/detectors/contact-variant.d.ts.map +1 -0
- package/dist/detectors/contact-variant.js +25 -0
- package/dist/detectors/contact-variant.js.map +1 -0
- package/dist/detectors/count-over-capacity.d.ts +4 -0
- package/dist/detectors/count-over-capacity.d.ts.map +1 -0
- package/dist/detectors/count-over-capacity.js +26 -0
- package/dist/detectors/count-over-capacity.js.map +1 -0
- 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 +5 -10
- package/dist/detectors/date-outside-period.js.map +1 -1
- package/dist/detectors/date-stamp-order.d.ts +3 -0
- package/dist/detectors/date-stamp-order.d.ts.map +1 -0
- package/dist/detectors/date-stamp-order.js +25 -0
- package/dist/detectors/date-stamp-order.js.map +1 -0
- 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 +45 -9
- package/dist/detectors/defined-term-form.js.map +1 -1
- package/dist/detectors/definition-use.d.ts +1 -1
- package/dist/detectors/definition-use.d.ts.map +1 -1
- package/dist/detectors/definition-use.js +4 -2
- package/dist/detectors/definition-use.js.map +1 -1
- package/dist/detectors/derived-numbers.d.ts +12 -3
- package/dist/detectors/derived-numbers.d.ts.map +1 -1
- package/dist/detectors/derived-numbers.js +45 -72
- 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 +16 -3
- 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/en-shape.d.ts.map +1 -1
- package/dist/detectors/en-shape.js +7 -4
- package/dist/detectors/en-shape.js.map +1 -1
- package/dist/detectors/event-deadline.d.ts +3 -0
- package/dist/detectors/event-deadline.d.ts.map +1 -0
- package/dist/detectors/event-deadline.js +33 -0
- package/dist/detectors/event-deadline.js.map +1 -0
- package/dist/detectors/fact-consistency.d.ts +1 -1
- package/dist/detectors/fact-consistency.d.ts.map +1 -1
- package/dist/detectors/fact-consistency.js +161 -5
- package/dist/detectors/fact-consistency.js.map +1 -1
- 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/heading-case.d.ts +5 -2
- package/dist/detectors/heading-case.d.ts.map +1 -1
- package/dist/detectors/heading-case.js +12 -4
- package/dist/detectors/heading-case.js.map +1 -1
- package/dist/detectors/heading-echo.d.ts +5 -0
- package/dist/detectors/heading-echo.d.ts.map +1 -1
- package/dist/detectors/heading-echo.js +14 -1
- package/dist/detectors/heading-echo.js.map +1 -1
- 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 +49 -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/layout-code.d.ts +5 -0
- package/dist/detectors/layout-code.d.ts.map +1 -0
- package/dist/detectors/layout-code.js +124 -0
- package/dist/detectors/layout-code.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 +8 -0
- package/dist/detectors/measured-facts.d.ts.map +1 -0
- package/dist/detectors/measured-facts.js +18 -0
- package/dist/detectors/measured-facts.js.map +1 -0
- 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-model-codes.d.ts +11 -0
- package/dist/detectors/name-variant-model-codes.d.ts.map +1 -0
- package/dist/detectors/name-variant-model-codes.js +21 -0
- package/dist/detectors/name-variant-model-codes.js.map +1 -0
- package/dist/detectors/name-variant.d.ts.map +1 -1
- package/dist/detectors/name-variant.js +151 -16
- 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 +97 -17
- package/dist/detectors/orthographic-variant.js.map +1 -1
- package/dist/detectors/orthography.d.ts.map +1 -1
- package/dist/detectors/orthography.js +21 -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/quantity-range.d.ts +3 -0
- package/dist/detectors/quantity-range.d.ts.map +1 -0
- package/dist/detectors/quantity-range.js +35 -0
- package/dist/detectors/quantity-range.js.map +1 -0
- package/dist/detectors/range-band.d.ts +5 -0
- package/dist/detectors/range-band.d.ts.map +1 -0
- package/dist/detectors/range-band.js +80 -0
- package/dist/detectors/range-band.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/capacity-runtime-mismatch.d.ts +3 -0
- package/dist/detectors/registry/capacity-runtime-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/capacity-runtime-mismatch.js +3 -0
- package/dist/detectors/registry/capacity-runtime-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/contact-variant.d.ts +3 -0
- package/dist/detectors/registry/contact-variant.d.ts.map +1 -0
- package/dist/detectors/registry/contact-variant.js +3 -0
- package/dist/detectors/registry/contact-variant.js.map +1 -0
- package/dist/detectors/registry/count-over-capacity.d.ts +3 -0
- package/dist/detectors/registry/count-over-capacity.d.ts.map +1 -0
- package/dist/detectors/registry/count-over-capacity.js +3 -0
- package/dist/detectors/registry/count-over-capacity.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/date-stamp-order.d.ts +3 -0
- package/dist/detectors/registry/date-stamp-order.d.ts.map +1 -0
- package/dist/detectors/registry/date-stamp-order.js +3 -0
- package/dist/detectors/registry/date-stamp-order.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/event-deadline.d.ts +3 -0
- package/dist/detectors/registry/event-deadline.d.ts.map +1 -0
- package/dist/detectors/registry/event-deadline.js +3 -0
- package/dist/detectors/registry/event-deadline.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/interval-count-mismatch.d.ts +3 -0
- package/dist/detectors/registry/interval-count-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/interval-count-mismatch.js +3 -0
- package/dist/detectors/registry/interval-count-mismatch.js.map +1 -0
- package/dist/detectors/registry/layout-code-mismatch.d.ts +3 -0
- package/dist/detectors/registry/layout-code-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/layout-code-mismatch.js +3 -0
- package/dist/detectors/registry/layout-code-mismatch.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/quantity-range.d.ts +3 -0
- package/dist/detectors/registry/quantity-range.d.ts.map +1 -0
- package/dist/detectors/registry/quantity-range.js +3 -0
- package/dist/detectors/registry/quantity-range.js.map +1 -0
- package/dist/detectors/registry/range-band-mismatch.d.ts +3 -0
- package/dist/detectors/registry/range-band-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/range-band-mismatch.js +3 -0
- package/dist/detectors/registry/range-band-mismatch.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/rent-multiple-mismatch.d.ts +3 -0
- package/dist/detectors/registry/rent-multiple-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/rent-multiple-mismatch.js +3 -0
- package/dist/detectors/registry/rent-multiple-mismatch.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/scaled-quantity-mismatch.d.ts +3 -0
- package/dist/detectors/registry/scaled-quantity-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/scaled-quantity-mismatch.js +3 -0
- package/dist/detectors/registry/scaled-quantity-mismatch.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/step-time-sum-mismatch.d.ts +3 -0
- package/dist/detectors/registry/step-time-sum-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/step-time-sum-mismatch.js +3 -0
- package/dist/detectors/registry/step-time-sum-mismatch.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/time-range-reversed.d.ts +3 -0
- package/dist/detectors/registry/time-range-reversed.d.ts.map +1 -0
- package/dist/detectors/registry/time-range-reversed.js +3 -0
- package/dist/detectors/registry/time-range-reversed.js.map +1 -0
- package/dist/detectors/registry/unlisted-item-used.d.ts +3 -0
- package/dist/detectors/registry/unlisted-item-used.d.ts.map +1 -0
- package/dist/detectors/registry/unlisted-item-used.js +3 -0
- package/dist/detectors/registry/unlisted-item-used.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/registry/walk-time-distance-mismatch.d.ts +3 -0
- package/dist/detectors/registry/walk-time-distance-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/walk-time-distance-mismatch.js +3 -0
- package/dist/detectors/registry/walk-time-distance-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 +3 -0
- package/dist/detectors/rent-multiple-mismatch.d.ts.map +1 -0
- package/dist/detectors/rent-multiple-mismatch.js +39 -0
- package/dist/detectors/rent-multiple-mismatch.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/detectors/scaled-quantity.d.ts.map +1 -0
- package/dist/detectors/scaled-quantity.js +37 -0
- package/dist/detectors/scaled-quantity.js.map +1 -0
- 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/signals.d.ts.map +1 -1
- package/dist/detectors/signals.js +3 -1
- package/dist/detectors/signals.js.map +1 -1
- package/dist/detectors/step-time-sum.d.ts +3 -0
- package/dist/detectors/step-time-sum.d.ts.map +1 -0
- package/dist/detectors/step-time-sum.js +46 -0
- package/dist/detectors/step-time-sum.js.map +1 -0
- package/dist/detectors/structure-tree.d.ts +2 -0
- package/dist/detectors/structure-tree.d.ts.map +1 -1
- package/dist/detectors/structure-tree.js +58 -9
- package/dist/detectors/structure-tree.js.map +1 -1
- package/dist/detectors/structure.js +1 -1
- package/dist/detectors/structure.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 +6 -1
- package/dist/detectors/technical-docs.d.ts.map +1 -1
- package/dist/detectors/technical-docs.js +15 -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 +2 -0
- package/dist/detectors/time-order.d.ts.map +1 -1
- package/dist/detectors/time-order.js +45 -13
- package/dist/detectors/time-order.js.map +1 -1
- package/dist/detectors/unit-consistency.d.ts +1 -1
- package/dist/detectors/unit-consistency.d.ts.map +1 -1
- package/dist/detectors/unit-consistency.js +46 -38
- package/dist/detectors/unit-consistency.js.map +1 -1
- package/dist/detectors/unlisted-items.d.ts +3 -0
- package/dist/detectors/unlisted-items.d.ts.map +1 -0
- package/dist/detectors/unlisted-items.js +57 -0
- package/dist/detectors/unlisted-items.js.map +1 -0
- package/dist/detectors/use-count-words.d.ts +8 -0
- package/dist/detectors/use-count-words.d.ts.map +1 -0
- package/dist/detectors/use-count-words.js +20 -0
- package/dist/detectors/use-count-words.js.map +1 -0
- package/dist/detectors/use-interval.d.ts +3 -0
- package/dist/detectors/use-interval.d.ts.map +1 -0
- package/dist/detectors/use-interval.js +39 -0
- package/dist/detectors/use-interval.js.map +1 -0
- 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/walk-time-distance-mismatch.d.ts +4 -0
- package/dist/detectors/walk-time-distance-mismatch.d.ts.map +1 -0
- package/dist/detectors/walk-time-distance-mismatch.js +38 -0
- package/dist/detectors/walk-time-distance-mismatch.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/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/approximate-tolerance.d.ts +7 -0
- package/dist/facts/approximate-tolerance.d.ts.map +1 -0
- package/dist/facts/approximate-tolerance.js +16 -0
- package/dist/facts/approximate-tolerance.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/item-amounts.d.ts +18 -0
- package/dist/facts/item-amounts.d.ts.map +1 -0
- package/dist/facts/item-amounts.js +67 -0
- package/dist/facts/item-amounts.js.map +1 -0
- package/dist/facts/labelled-facts.d.ts +18 -0
- package/dist/facts/labelled-facts.d.ts.map +1 -1
- package/dist/facts/labelled-facts.js +71 -13
- package/dist/facts/labelled-facts.js.map +1 -1
- package/dist/facts/measure-units.d.ts +5 -0
- package/dist/facts/measure-units.d.ts.map +1 -0
- package/dist/facts/measure-units.js +43 -0
- package/dist/facts/measure-units.js.map +1 -0
- package/dist/facts/measures.d.ts +23 -4
- package/dist/facts/measures.d.ts.map +1 -1
- package/dist/facts/measures.js +71 -20
- 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/retention-periods.d.ts +51 -0
- package/dist/facts/retention-periods.d.ts.map +1 -0
- package/dist/facts/retention-periods.js +148 -0
- package/dist/facts/retention-periods.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-conflicts.d.ts +3 -2
- package/dist/facts/unit-conflicts.d.ts.map +1 -1
- package/dist/facts/unit-conflicts.js +15 -7
- package/dist/facts/unit-conflicts.js.map +1 -1
- package/dist/facts/unit-equivalents.d.ts +13 -0
- package/dist/facts/unit-equivalents.d.ts.map +1 -0
- package/dist/facts/unit-equivalents.js +56 -0
- package/dist/facts/unit-equivalents.js.map +1 -0
- package/dist/facts/unit-tolerance.d.ts +4 -0
- package/dist/facts/unit-tolerance.d.ts.map +1 -0
- package/dist/facts/unit-tolerance.js +13 -0
- package/dist/facts/unit-tolerance.js.map +1 -0
- package/dist/facts/unit-word.d.ts +13 -0
- package/dist/facts/unit-word.d.ts.map +1 -0
- package/dist/facts/unit-word.js +43 -0
- package/dist/facts/unit-word.js.map +1 -0
- 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/facts/written-precision.d.ts +10 -0
- package/dist/facts/written-precision.d.ts.map +1 -0
- package/dist/facts/written-precision.js +20 -0
- package/dist/facts/written-precision.js.map +1 -0
- package/dist/kana-spelling.d.ts +12 -0
- package/dist/kana-spelling.d.ts.map +1 -1
- package/dist/kana-spelling.js +23 -0
- package/dist/kana-spelling.js.map +1 -1
- package/dist/model-codes.d.ts +23 -0
- package/dist/model-codes.d.ts.map +1 -0
- package/dist/model-codes.js +81 -0
- package/dist/model-codes.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-spelling-chars.d.ts +16 -0
- package/dist/name-spelling-chars.d.ts.map +1 -0
- package/dist/name-spelling-chars.js +14 -0
- package/dist/name-spelling-chars.js.map +1 -0
- package/dist/name-variants.d.ts +10 -9
- package/dist/name-variants.d.ts.map +1 -1
- package/dist/name-variants.js +32 -88
- 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 +68 -23
- package/dist/phone-numbers.js.map +1 -1
- package/dist/place-names.d.ts +12 -5
- package/dist/place-names.d.ts.map +1 -1
- package/dist/place-names.js +34 -14
- package/dist/place-names.js.map +1 -1
- package/dist/plugin.d.ts +7 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/preamble-paragraphs.d.ts +2 -1
- package/dist/preamble-paragraphs.d.ts.map +1 -1
- package/dist/preamble-paragraphs.js +16 -1
- package/dist/preamble-paragraphs.js.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 +11 -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/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 +7 -0
- package/dist/spacing-code.d.ts.map +1 -0
- package/dist/spacing-code.js +30 -0
- package/dist/spacing-code.js.map +1 -0
- package/dist/structure/amount-range.d.ts +2 -2
- package/dist/structure/amount-range.d.ts.map +1 -1
- package/dist/structure/amount-range.js +12 -5
- package/dist/structure/amount-range.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/capacity-count.d.ts +59 -0
- package/dist/structure/capacity-count.d.ts.map +1 -0
- package/dist/structure/capacity-count.js +118 -0
- package/dist/structure/capacity-count.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/counted-amounts.d.ts +6 -0
- package/dist/structure/counted-amounts.d.ts.map +1 -1
- package/dist/structure/counted-amounts.js +4 -4
- package/dist/structure/counted-amounts.js.map +1 -1
- 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 +8 -2
- package/dist/structure/date-outside-period.d.ts.map +1 -1
- package/dist/structure/date-outside-period.js +21 -14
- package/dist/structure/date-outside-period.js.map +1 -1
- package/dist/structure/date-range.d.ts +3 -1
- package/dist/structure/date-range.d.ts.map +1 -1
- package/dist/structure/date-range.js +5 -7
- package/dist/structure/date-range.js.map +1 -1
- package/dist/structure/deadline-after-event.d.ts +56 -0
- package/dist/structure/deadline-after-event.d.ts.map +1 -0
- package/dist/structure/deadline-after-event.js +113 -0
- package/dist/structure/deadline-after-event.js.map +1 -0
- 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/definition-use.d.ts +1 -1
- package/dist/structure/definition-use.d.ts.map +1 -1
- package/dist/structure/definition-use.js +55 -2
- package/dist/structure/definition-use.js.map +1 -1
- 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/due-date.d.ts.map +1 -1
- package/dist/structure/due-date.js +5 -27
- package/dist/structure/due-date.js.map +1 -1
- 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-total.d.ts +110 -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 +55 -0
- package/dist/structure/labelled-date-order.d.ts.map +1 -0
- package/dist/structure/labelled-date-order.js +49 -0
- package/dist/structure/labelled-date-order.js.map +1 -0
- 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/layout-codes.d.ts +68 -0
- package/dist/structure/layout-codes.d.ts.map +1 -0
- package/dist/structure/layout-codes.js +161 -0
- package/dist/structure/layout-codes.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/measured-amounts.d.ts +17 -0
- package/dist/structure/measured-amounts.d.ts.map +1 -0
- package/dist/structure/measured-amounts.js +110 -0
- package/dist/structure/measured-amounts.js.map +1 -0
- 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 +8 -0
- package/dist/structure/quantity-range.d.ts.map +1 -0
- package/dist/structure/quantity-range.js +32 -0
- package/dist/structure/quantity-range.js.map +1 -0
- package/dist/structure/range-bands.d.ts +77 -0
- package/dist/structure/range-bands.d.ts.map +1 -0
- package/dist/structure/range-bands.js +244 -0
- package/dist/structure/range-bands.js.map +1 -0
- 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 +56 -0
- package/dist/structure/rent-multiple.d.ts.map +1 -0
- package/dist/structure/rent-multiple.js +139 -0
- package/dist/structure/rent-multiple.js.map +1 -0
- 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 +50 -0
- package/dist/structure/scaled-quantities.d.ts.map +1 -0
- package/dist/structure/scaled-quantities.js +170 -0
- package/dist/structure/scaled-quantities.js.map +1 -0
- 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/stamp-order.d.ts +16 -0
- package/dist/structure/stamp-order.d.ts.map +1 -0
- package/dist/structure/stamp-order.js +78 -0
- package/dist/structure/stamp-order.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/step-times.d.ts +49 -0
- package/dist/structure/step-times.d.ts.map +1 -0
- package/dist/structure/step-times.js +128 -0
- package/dist/structure/step-times.js.map +1 -0
- 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/term-deadline.d.ts +19 -0
- package/dist/structure/term-deadline.d.ts.map +1 -0
- package/dist/structure/term-deadline.js +28 -0
- package/dist/structure/term-deadline.js.map +1 -0
- 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 +18 -0
- package/dist/structure/time-range.d.ts.map +1 -0
- package/dist/structure/time-range.js +62 -0
- package/dist/structure/time-range.js.map +1 -0
- package/dist/structure/total-line.d.ts +48 -0
- package/dist/structure/total-line.d.ts.map +1 -0
- package/dist/structure/total-line.js +165 -0
- package/dist/structure/total-line.js.map +1 -0
- 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 +17 -1
- package/dist/structure/total.d.ts.map +1 -1
- package/dist/structure/total.js +103 -7
- package/dist/structure/total.js.map +1 -1
- package/dist/structure/unlisted-items.d.ts +70 -0
- package/dist/structure/unlisted-items.d.ts.map +1 -0
- package/dist/structure/unlisted-items.js +152 -0
- package/dist/structure/unlisted-items.js.map +1 -0
- 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/structure/walk-time.d.ts +87 -0
- package/dist/structure/walk-time.d.ts.map +1 -0
- package/dist/structure/walk-time.js +195 -0
- package/dist/structure/walk-time.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 +4 -3
- package/profiles/listing.yaml +20 -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/announced-count-mismatch.yaml +2 -2
- 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 +66 -0
- 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 +76 -0
- package/rules/contrast-framing.yaml +2 -2
- package/rules/count-over-capacity.yaml +55 -0
- 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 +2 -2
- package/rules/date-stamp-order.yaml +82 -0
- package/rules/date-without-year.yaml +12 -12
- package/rules/deadline-after-event.yaml +72 -0
- 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 +36 -11
- 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 +21 -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/fullwidth-alnum-consistency.yaml +1 -1
- package/rules/gpa-mismatch.yaml +80 -0
- package/rules/heading-echo.yaml +2 -2
- 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 +58 -0
- package/rules/interest-mismatch.yaml +50 -0
- package/rules/interval-count-mismatch.yaml +54 -0
- 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 +68 -0
- 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 +18 -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-em-dash.yaml +2 -2
- 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 +2 -2
- 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/preamble-length.yaml +2 -2
- 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 +53 -0
- package/rules/range-band-mismatch.yaml +70 -0
- 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/rent-multiple-mismatch.yaml +61 -0
- 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 +69 -0
- 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/step-time-sum-mismatch.yaml +65 -0
- 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 +53 -0
- package/rules/title-case-consistency.yaml +2 -2
- 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 +13 -5
- package/rules/unit-spacing-consistency.yaml +1 -1
- package/rules/unknown-word.yaml +1 -1
- package/rules/unlisted-item-used.yaml +90 -0
- package/rules/unused-definition.yaml +2 -2
- package/rules/url-run-on.yaml +1 -1
- package/rules/use-before-definition.yaml +2 -2
- 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 +55 -0
- 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/announced-count.ts +6 -3
- package/src/company-kana-spelling.ts +105 -0
- package/src/company-names.ts +159 -26
- package/src/contacts/addresses.ts +179 -0
- package/src/contacts/emails.ts +63 -0
- package/src/contacts/table-rows.ts +51 -0
- package/src/contacts/variants.ts +33 -0
- package/src/derived/age-on-date.ts +161 -0
- package/src/derived/battery-runtime.ts +284 -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-counts.ts +178 -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/time-lengths.ts +12 -9
- package/src/derived/timesheet-hours.ts +112 -0
- package/src/derived/use-interval.ts +151 -0
- package/src/derived/use-maximum.ts +158 -0
- package/src/derived/working-hours.ts +2 -2
- package/src/detectors/announced-count.ts +1 -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/capacity-runtime.ts +128 -0
- package/src/detectors/change-rate.ts +27 -4
- package/src/detectors/closing-balance-mismatch.ts +52 -0
- package/src/detectors/contact-variant.ts +30 -0
- package/src/detectors/count-over-capacity.ts +37 -0
- 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 +5 -10
- package/src/detectors/date-stamp-order.ts +29 -0
- package/src/detectors/date-year.ts +55 -13
- package/src/detectors/deductible-exceeds-limit.ts +55 -0
- package/src/detectors/defined-term-form.ts +48 -9
- package/src/detectors/definition-use.ts +6 -2
- package/src/detectors/derived-numbers.ts +52 -91
- package/src/detectors/discount-rate.ts +41 -0
- package/src/detectors/due-date.ts +28 -6
- package/src/detectors/email-letter.ts +45 -15
- package/src/detectors/en-shape.ts +11 -4
- package/src/detectors/event-deadline.ts +39 -0
- package/src/detectors/fact-consistency.ts +206 -7
- package/src/detectors/gloss-year.ts +21 -0
- package/src/detectors/gpa-mismatch.ts +43 -0
- package/src/detectors/heading-case.ts +13 -4
- package/src/detectors/heading-echo.ts +17 -1
- package/src/detectors/impossible-date.ts +25 -3
- package/src/detectors/installment-total-mismatch.ts +68 -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/layout-code.ts +174 -0
- package/src/detectors/line-amount.ts +58 -3
- package/src/detectors/measured-facts.ts +20 -0
- package/src/detectors/meter-usage.ts +49 -0
- package/src/detectors/name-field.ts +43 -0
- package/src/detectors/name-variant-model-codes.ts +27 -0
- package/src/detectors/name-variant.ts +190 -20
- 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 +118 -19
- package/src/detectors/orthography.ts +34 -8
- 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/quantity-range.ts +47 -0
- package/src/detectors/range-band.ts +125 -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/capacity-runtime-mismatch.ts +4 -0
- package/src/detectors/registry/closing-balance-mismatch.ts +4 -0
- package/src/detectors/registry/contact-variant.ts +4 -0
- package/src/detectors/registry/count-over-capacity.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/date-stamp-order.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/event-deadline.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/interval-count-mismatch.ts +4 -0
- package/src/detectors/registry/layout-code-mismatch.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/quantity-range.ts +4 -0
- package/src/detectors/registry/range-band-mismatch.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/rent-multiple-mismatch.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/scaled-quantity-mismatch.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/step-time-sum-mismatch.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/time-range-reversed.ts +4 -0
- package/src/detectors/registry/unlisted-item-used.ts +4 -0
- package/src/detectors/registry/variance-mismatch.ts +4 -0
- package/src/detectors/registry/walk-time-distance-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 +57 -0
- 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 +49 -0
- package/src/detectors/serial-range.ts +37 -0
- package/src/detectors/share-amount.ts +51 -0
- package/src/detectors/signals.ts +3 -1
- package/src/detectors/step-time-sum.ts +55 -0
- package/src/detectors/structure-tree.ts +82 -9
- package/src/detectors/structure.ts +1 -1
- package/src/detectors/table-scale.ts +37 -0
- package/src/detectors/tax-amount.ts +45 -13
- package/src/detectors/technical-docs.ts +16 -2
- package/src/detectors/tier-threshold.ts +108 -0
- package/src/detectors/time-order.ts +55 -17
- package/src/detectors/unit-consistency.ts +50 -38
- package/src/detectors/unlisted-items.ts +72 -0
- package/src/detectors/use-count-words.ts +32 -0
- package/src/detectors/use-interval.ts +51 -0
- package/src/detectors/use-maximum.ts +38 -0
- package/src/detectors/variance.ts +33 -0
- package/src/detectors/walk-time-distance-mismatch.ts +45 -0
- package/src/detectors/whole-count-findings.ts +48 -0
- package/src/detectors/working-hours-findings.ts +100 -0
- package/src/facts/age-values.ts +124 -0
- package/src/facts/approximate-tolerance.ts +19 -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/item-amounts.ts +94 -0
- package/src/facts/labelled-facts.ts +92 -13
- package/src/facts/measure-units.ts +49 -0
- package/src/facts/measures.ts +114 -26
- package/src/facts/qualified-labels.ts +126 -0
- package/src/facts/rate-values.ts +117 -0
- package/src/facts/retention-periods.ts +216 -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-conflicts.ts +22 -9
- package/src/facts/unit-equivalents.ts +70 -0
- package/src/facts/unit-tolerance.ts +17 -0
- package/src/facts/unit-word.ts +48 -0
- package/src/facts/verb-quantity-facts.ts +84 -0
- package/src/facts/whole-counts.ts +183 -0
- package/src/facts/written-precision.ts +23 -0
- package/src/kana-spelling.ts +25 -0
- package/src/model-codes.ts +104 -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-spelling-chars.ts +34 -0
- package/src/name-variants.ts +49 -92
- 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 +76 -20
- package/src/place-names.ts +53 -14
- package/src/plugin.ts +4 -0
- package/src/preamble-paragraphs.ts +21 -2
- package/src/product-names.ts +98 -0
- package/src/profile/parse.ts +10 -0
- package/src/reference-numbers.ts +55 -0
- package/src/spaced-person-name.ts +97 -0
- package/src/spacing-code.ts +47 -0
- package/src/structure/amount-range.ts +16 -7
- 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/capacity-count.ts +196 -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/counted-amounts.ts +5 -4
- 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 +28 -15
- package/src/structure/date-range.ts +7 -10
- package/src/structure/deadline-after-event.ts +184 -0
- package/src/structure/deductible-limit.ts +255 -0
- package/src/structure/definition-use.ts +59 -2
- package/src/structure/discount-rate.ts +209 -0
- package/src/structure/due-date.ts +8 -32
- package/src/structure/generic-role.ts +8 -0
- package/src/structure/gpa.ts +218 -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 +100 -0
- package/src/structure/labelled-order.ts +122 -0
- package/src/structure/labelled-time-order.ts +100 -0
- package/src/structure/layout-codes.ts +210 -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/measured-amounts.ts +138 -0
- 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 +47 -0
- package/src/structure/range-bands.ts +316 -0
- 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 +207 -0
- package/src/structure/revision-direction.ts +214 -0
- package/src/structure/running-balance.ts +157 -0
- package/src/structure/scaled-quantities.ts +239 -0
- 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/stamp-order.ts +100 -0
- package/src/structure/stated-multiple.ts +82 -0
- package/src/structure/stated-period.ts +23 -11
- package/src/structure/step-times.ts +169 -0
- 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/term-deadline.ts +35 -0
- package/src/structure/tier-threshold.ts +218 -0
- package/src/structure/time-range.ts +70 -0
- package/src/structure/total-line.ts +232 -0
- package/src/structure/total-row-blank.ts +23 -0
- package/src/structure/total.ts +156 -12
- package/src/structure/unlisted-items.ts +207 -0
- package/src/structure/variance-table.ts +167 -0
- package/src/structure/walk-time.ts +285 -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,174 @@
|
|
|
1
|
+
import { escapeRegExp } from "../orthography.ts";
|
|
2
|
+
import { linesOf, type Line } from "./lines.ts";
|
|
3
|
+
import { periodLabelsIn, type CompiledFrame, type PeriodLabel } from "./period-labels.ts";
|
|
4
|
+
import { afterLabel } from "./stated-period.ts";
|
|
5
|
+
|
|
6
|
+
// 決算の文書が題で言った期間(2027年3月期 第2四半期、Q2 FY2026)と、今の業績を言う所に書いた同じ種類の別の期間(第3四半期、FY2025)。
|
|
7
|
+
// 純関数: 文書の字、文と見出しの範囲、語彙表の語を受け取る。
|
|
8
|
+
// 文書の期間は、題(最初の字のある行)が業績の語(決算、業績、Financial Results)と一緒に書いた期間の名前。
|
|
9
|
+
// 題に無い種類は、頭の「対象期間:」「Reporting period:」の一行から補う。題に同じ種類の違う期間が二つあれば、その種類は比べない。
|
|
10
|
+
// 書き方そのものが文書の年を言う名前(令和8年分、Tax Year 2026)は、業績の語が無い題からも読み、本文のどの文の中でも比べる。
|
|
11
|
+
|
|
12
|
+
export type ReportingWords = {
|
|
13
|
+
readonly frames: readonly CompiledFrame[];
|
|
14
|
+
/** 業績を言う語。題がこれを持つ文書だけを読み、文がこれを持てば今の業績を言う文と読む。 */
|
|
15
|
+
readonly results: readonly string[];
|
|
16
|
+
/** 文書の期間を書く行の頭の語(対象期間、Reporting period)。 */
|
|
17
|
+
readonly periodLines: readonly string[];
|
|
18
|
+
/** 比べる相手の期間を言う語(前年同期、prior year)。 */
|
|
19
|
+
readonly comparisons: readonly string[];
|
|
20
|
+
/** 先の期間の見込みを言う語(通期予想、outlook)。 */
|
|
21
|
+
readonly forecasts: readonly string[];
|
|
22
|
+
/** 今の期間を指す語(当期、当第、this quarter)。 */
|
|
23
|
+
readonly currents: readonly string[];
|
|
24
|
+
/** 今の期間の語を含むが期間を指さない語(当期純利益)。 */
|
|
25
|
+
readonly notCurrents: readonly string[];
|
|
26
|
+
/** 期間の名前の書き方を含むが名前ではない語(分担金の「年分担」)。 */
|
|
27
|
+
readonly notNames: readonly string[];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type Span = { readonly start: number; readonly end: number };
|
|
31
|
+
export type Heading = Span & { readonly text: string };
|
|
32
|
+
|
|
33
|
+
export type PeriodConflict = { readonly offset: number; readonly label: string; readonly stated: string };
|
|
34
|
+
|
|
35
|
+
type Unit = {
|
|
36
|
+
readonly start: number;
|
|
37
|
+
readonly text: string;
|
|
38
|
+
readonly headerCell: boolean;
|
|
39
|
+
/** 文書の期間の名前を探す範囲。表の見出しの升なら行全体(| FY2025 | FY2026 | の FY2025 は比べる相手)。 */
|
|
40
|
+
readonly context: string;
|
|
41
|
+
readonly section: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const HEAD_LINES = 12;
|
|
45
|
+
const ASCII_EDGE = /[A-Za-z0-9]/u;
|
|
46
|
+
|
|
47
|
+
const wordRegex = (word: string): RegExp => {
|
|
48
|
+
const before = ASCII_EDGE.test(word.charAt(0)) ? "(?<![A-Za-z0-9])" : "";
|
|
49
|
+
const after = ASCII_EDGE.test(word.charAt(word.length - 1)) ? "(?![A-Za-z0-9])" : "";
|
|
50
|
+
return new RegExp(`${before}${escapeRegExp(word).replaceAll(" ", "\\s+")}${after}`, "iu");
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const hasWord = (text: string, words: readonly string[]): boolean => words.some((word) => word !== "" && wordRegex(word).test(text));
|
|
54
|
+
|
|
55
|
+
const withoutWords = (text: string, words: readonly string[]): string =>
|
|
56
|
+
words.filter((word) => word !== "").reduce((rest, word) => rest.replace(new RegExp(wordRegex(word).source, "giu"), " "), text);
|
|
57
|
+
|
|
58
|
+
const occurrencesOf = (text: string, word: string): Span[] =>
|
|
59
|
+
word === "" ? [] : [...text.matchAll(new RegExp(escapeRegExp(word), "gu"))].map((match) => ({ start: match.index, end: match.index + word.length }));
|
|
60
|
+
|
|
61
|
+
/** 名前の終わりが、名前ではない語の途中に落ちるか(令和8年分担金の「令和8年分」)。 */
|
|
62
|
+
const endsInsideNotName = (text: string, label: PeriodLabel, notNames: readonly string[]): boolean =>
|
|
63
|
+
notNames.some((word) => occurrencesOf(text, word).some((span) => span.start < label.end && label.end < span.end));
|
|
64
|
+
|
|
65
|
+
const labelsIn = (text: string, words: ReportingWords): PeriodLabel[] =>
|
|
66
|
+
periodLabelsIn(text, words.frames).filter((label) => !endsInsideNotName(text, label, words.notNames));
|
|
67
|
+
|
|
68
|
+
const sameLabel = (left: PeriodLabel, right: PeriodLabel): boolean => left.kind === right.kind && left.shape === right.shape && left.value === right.value;
|
|
69
|
+
const sameSlot = (left: PeriodLabel, right: PeriodLabel): boolean => left.kind === right.kind && left.shape === right.shape;
|
|
70
|
+
|
|
71
|
+
/** 種類と形ごとに一つの期間。同じ種類と形の違う期間が並べば、どちらが文書の期間か決まらないので落とす。 */
|
|
72
|
+
const oneEach = (labels: readonly PeriodLabel[]): PeriodLabel[] =>
|
|
73
|
+
labels.filter(
|
|
74
|
+
(label, index) =>
|
|
75
|
+
labels.every((other) => !sameSlot(other, label) || sameLabel(other, label)) && labels.findIndex((other) => sameLabel(other, label)) === index,
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
/** 文書の期間。題が業績の語を持たなければ、書き方そのものが年を言う名前だけ。題に無い種類と形だけを、期間の行から補う。 */
|
|
79
|
+
export const statedPeriodOf = (title: string, periodLine: string, words: ReportingWords): PeriodLabel[] => {
|
|
80
|
+
const results = hasWord(title, words.results);
|
|
81
|
+
const readable = (text: string): PeriodLabel[] => oneEach(labelsIn(text, words).filter((label) => results || label.titleAlone));
|
|
82
|
+
const fromTitle = readable(title);
|
|
83
|
+
if (fromTitle.length === 0 && !results) return [];
|
|
84
|
+
const fromLine = readable(periodLine).filter((label) => !fromTitle.some((other) => sameSlot(other, label)));
|
|
85
|
+
return [...fromTitle, ...fromLine];
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/** 名前と同じ種類と形で、値の違う文書の期間。 */
|
|
89
|
+
export const conflictingStated = (label: PeriodLabel, stated: readonly PeriodLabel[]): PeriodLabel | undefined => {
|
|
90
|
+
const slot = stated.find((other) => sameSlot(other, label));
|
|
91
|
+
return slot === undefined || sameLabel(slot, label) ? undefined : slot;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 今の業績を言う所の名前か。書き方そのものが年を言う名前(2025年分)は、どこに書いても文書の年を言う。年の中の一部(四半期、半期)で文書の期間より前のものは、累計の中の一部や比べる相手のことが多いので、
|
|
96
|
+
* 今の期間を指す語(当第1四半期)があるときだけ。ほかは、表の見出しの升ならそれだけで、文なら今の期間か業績の語があるとき。
|
|
97
|
+
*/
|
|
98
|
+
export const refersToCurrent = (label: PeriodLabel, stated: PeriodLabel, unit: Pick<Unit, "text" | "headerCell">, words: ReportingWords): boolean => {
|
|
99
|
+
const current = hasWord(withoutWords(unit.text, words.notCurrents), words.currents);
|
|
100
|
+
if (label.withinYear && label.order < stated.order) return current;
|
|
101
|
+
return label.titleAlone || unit.headerCell || current || hasWord(unit.text, words.results);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const isAside = (text: string, words: ReportingWords): boolean => hasWord(text, words.comparisons) || hasWord(text, words.forecasts);
|
|
105
|
+
|
|
106
|
+
const issuesIn = (unit: Unit, stated: readonly PeriodLabel[], words: ReportingWords): PeriodConflict[] => {
|
|
107
|
+
if (isAside(unit.text, words) || isAside(unit.section, words)) return [];
|
|
108
|
+
const named = labelsIn(unit.context, words);
|
|
109
|
+
return labelsIn(unit.text, words).flatMap((label) => {
|
|
110
|
+
const statedLabel = conflictingStated(label, stated);
|
|
111
|
+
if (statedLabel === undefined || named.some((other) => sameLabel(other, statedLabel))) return [];
|
|
112
|
+
if (!refersToCurrent(label, statedLabel, unit, words)) return [];
|
|
113
|
+
return [{ offset: unit.start + label.start, label: label.written, stated: statedLabel.written }];
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const RULE_CELL = /^:?-{3,}:?$/u;
|
|
118
|
+
|
|
119
|
+
/** 表の見出しと本体を分ける行(| --- | :---: |)。 */
|
|
120
|
+
const isTableRule = (text: string): boolean => {
|
|
121
|
+
const cells = text.trim().replace(/^\|/u, "").replace(/\|$/u, "").split("|");
|
|
122
|
+
return text.includes("-") && cells.every((cell) => RULE_CELL.test(cell.trim()));
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const cellsOf = (line: Line): { readonly start: number; readonly text: string }[] => {
|
|
126
|
+
const cells: { start: number; text: string }[] = [];
|
|
127
|
+
let at = line.start;
|
|
128
|
+
line.text.split("|").forEach((text) => {
|
|
129
|
+
cells.push({ start: at, text });
|
|
130
|
+
at += text.length + 1;
|
|
131
|
+
});
|
|
132
|
+
return cells.filter((cell) => cell.text.trim() !== "");
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/** 表の見出しの行(次の行が |---| の行)の升。 */
|
|
136
|
+
const headerRows = (lines: readonly Line[]): Line[] =>
|
|
137
|
+
lines.filter((line, index) => line.text.trimStart().startsWith("|") && isTableRule(lines[index + 1]?.text ?? ""));
|
|
138
|
+
|
|
139
|
+
const sectionAt = (headings: readonly Heading[], offset: number): string => headings.findLast((heading) => heading.start < offset)?.text ?? "";
|
|
140
|
+
|
|
141
|
+
const headerUnits = (lines: readonly Line[], headings: readonly Heading[]): Unit[] =>
|
|
142
|
+
headerRows(lines).flatMap((row) =>
|
|
143
|
+
cellsOf(row).map((cell) => ({ start: cell.start, text: cell.text, headerCell: true, context: row.text, section: sectionAt(headings, cell.start) })),
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
const textUnits = (source: string, spans: readonly Span[], headings: readonly Heading[]): Unit[] =>
|
|
147
|
+
spans.map((span) => {
|
|
148
|
+
const text = source.slice(span.start, span.end);
|
|
149
|
+
return { start: span.start, text, headerCell: false, context: text, section: sectionAt(headings, span.start) };
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
type Head = { readonly title: string; readonly periodLine: string; readonly end: number };
|
|
153
|
+
|
|
154
|
+
/** 題(最初の字のある行)と、その後ろ、次の見出しまでの頭の行のうち期間の語で始まる一行。 */
|
|
155
|
+
const headOf = (lines: readonly Line[], headings: readonly Heading[], words: ReportingWords): Head => {
|
|
156
|
+
const first = lines.find((line) => line.text.trim() !== "");
|
|
157
|
+
const titleEnd = first === undefined ? 0 : first.start + first.text.length;
|
|
158
|
+
const bodyStart = headings.find((heading) => heading.start > titleEnd)?.start ?? Number.POSITIVE_INFINITY;
|
|
159
|
+
const head = lines.filter((line) => line.start > titleEnd && line.start < bodyStart).slice(0, HEAD_LINES);
|
|
160
|
+
const periodLine = head.find((line) => afterLabel(line.text, words.periodLines) !== undefined);
|
|
161
|
+
const end = periodLine === undefined ? titleEnd : periodLine.start + periodLine.text.length;
|
|
162
|
+
return { title: first?.text.replace(/^#+\s*/u, "") ?? "", periodLine: periodLine?.text ?? "", end };
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
/** 題の期間と同じ種類の別の期間を、今の業績を言う文、見出し、表の見出しの升に書いた所。 */
|
|
166
|
+
export const periodLabelConflicts = (source: string, sentences: readonly Span[], headings: readonly Heading[], words: ReportingWords): PeriodConflict[] => {
|
|
167
|
+
const lines = linesOf(source);
|
|
168
|
+
const head = headOf(lines, headings, words);
|
|
169
|
+
const stated = statedPeriodOf(head.title, head.periodLine, words);
|
|
170
|
+
if (stated.length === 0) return [];
|
|
171
|
+
const sections = headings.filter((heading) => heading.start > head.end);
|
|
172
|
+
const units = [...textUnits(source, [...sentences, ...sections], sections), ...headerUnits(lines, sections)].filter((unit) => unit.start > head.end);
|
|
173
|
+
return units.flatMap((unit) => issuesIn(unit, stated, words)).toSorted((left, right) => left.offset - right.offset);
|
|
174
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { escapeRegExp } from "../orthography.ts";
|
|
2
|
+
|
|
3
|
+
// 期間の名前(第2四半期、Q2、FY2026、2026年3月期、上期)を読む。純関数: 書き方は語彙表から受け取る。
|
|
4
|
+
// 書き方の {n} は四半期や半期の番号、{y} は年、{e} は期間の終わる年、{m} は月、{_} は値に入らない短い語(Fiscal Year Ending {_} {e} の日付)。
|
|
5
|
+
// FY2026 が 2026 年に始まる年か終わる年かは会社で違うので、{y} の名前と {e} の名前は比べない。
|
|
6
|
+
// 番号を書かない書き方(Second Quarter、上期)は、同じ期間の番号付きの書き方を instead_of に持つ。
|
|
7
|
+
// {y} は元号の年(令和8)でもよく、元年の西暦の年から西暦の年にする(令和8年分と2026年分は同じ年)。
|
|
8
|
+
|
|
9
|
+
export type PeriodFrame = {
|
|
10
|
+
readonly pattern: string;
|
|
11
|
+
readonly kind: string;
|
|
12
|
+
readonly insteadOf?: string | undefined;
|
|
13
|
+
/** 題に業績の語が無くても読む書き方(令和8年分、Tax Year 2026)。書き方そのものが文書の年を言う。 */
|
|
14
|
+
readonly titleAlone?: boolean | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** 元号と、その元年の西暦の年(令和は 2019)。 */
|
|
18
|
+
export type Era = { readonly name: string; readonly firstYear: number };
|
|
19
|
+
|
|
20
|
+
/** 文の中の期間の名前一つ。shape は値に使った部分(y,m なら年と月)で、同じ shape どうしだけを比べる。order は前後を比べる数。 */
|
|
21
|
+
export type PeriodLabel = {
|
|
22
|
+
readonly start: number;
|
|
23
|
+
readonly end: number;
|
|
24
|
+
readonly written: string;
|
|
25
|
+
readonly kind: string;
|
|
26
|
+
readonly shape: string;
|
|
27
|
+
readonly value: string;
|
|
28
|
+
readonly order: number;
|
|
29
|
+
/** 年を持たない名前(四半期、半期)。一年の中の一部を言う。 */
|
|
30
|
+
readonly withinYear: boolean;
|
|
31
|
+
readonly titleAlone: boolean;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type CompiledFrame = {
|
|
35
|
+
readonly regex: RegExp;
|
|
36
|
+
readonly kind: string;
|
|
37
|
+
readonly insteadOf: string | undefined;
|
|
38
|
+
readonly titleAlone: boolean;
|
|
39
|
+
readonly firstYears: ReadonlyMap<string, number>;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const PLACEHOLDER = /\{([nyem_])\}/gu;
|
|
43
|
+
const SLOT: Readonly<Record<string, string>> = {
|
|
44
|
+
n: "(?<n>[1-41-4])",
|
|
45
|
+
y: "(?<y>[0-90-9]{4})",
|
|
46
|
+
e: "(?<e>[0-90-9]{4})",
|
|
47
|
+
m: "(?<m>[0-90-9]{1,2})",
|
|
48
|
+
_: "[^\\n|。.!?]{1,24}?",
|
|
49
|
+
};
|
|
50
|
+
const ERA_GAP = "[ \\t\\u3000]?";
|
|
51
|
+
const eraYearSlot = (eras: readonly Era[]): string =>
|
|
52
|
+
eras.length === 0 ? "" : `|(?<era>${eras.map((era) => escapeRegExp(era.name)).join("|")})${ERA_GAP}(?<eraYear>[0-90-9]{1,2}|元)${ERA_GAP}`;
|
|
53
|
+
|
|
54
|
+
const slotsFor = (eras: readonly Era[]): Readonly<Record<string, string>> => ({
|
|
55
|
+
...SLOT,
|
|
56
|
+
y: `(?:(?<y>[0-90-9]{4})${eraYearSlot(eras)})`,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const BEFORE = "(?<![A-Za-z0-90-9])";
|
|
60
|
+
const AFTER = "(?![A-Za-z0-90-9])";
|
|
61
|
+
|
|
62
|
+
const literal = (text: string): string => escapeRegExp(text).replaceAll(" ", "[ \\t\\u00a0]+");
|
|
63
|
+
|
|
64
|
+
const bodyOf = (pattern: string, slots: Readonly<Record<string, string>>): string =>
|
|
65
|
+
pattern
|
|
66
|
+
.split(PLACEHOLDER)
|
|
67
|
+
.map((piece, index) => (index % 2 === 1 ? (slots[piece] ?? "") : literal(piece)))
|
|
68
|
+
.join("");
|
|
69
|
+
|
|
70
|
+
const startsAlnum = (pattern: string): boolean => /^(?:[A-Za-z0-9]|\{[nyem]\})/u.test(pattern);
|
|
71
|
+
const endsAlnum = (pattern: string): boolean => /(?:[A-Za-z0-9]|\{[nyem]\})$/u.test(pattern);
|
|
72
|
+
|
|
73
|
+
const compile = (frame: PeriodFrame, eras: readonly Era[]): CompiledFrame => ({
|
|
74
|
+
regex: new RegExp(`${startsAlnum(frame.pattern) ? BEFORE : ""}${bodyOf(frame.pattern, slotsFor(eras))}${endsAlnum(frame.pattern) ? AFTER : ""}`, "giu"),
|
|
75
|
+
kind: frame.kind,
|
|
76
|
+
insteadOf: frame.insteadOf,
|
|
77
|
+
titleAlone: frame.titleAlone === true,
|
|
78
|
+
firstYears: new Map(eras.map((era) => [era.name, era.firstYear])),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export const compileFrames = (frames: readonly PeriodFrame[], eras: readonly Era[] = []): readonly CompiledFrame[] =>
|
|
82
|
+
frames.filter((frame) => frame.pattern !== "").map((frame) => compile(frame, eras));
|
|
83
|
+
|
|
84
|
+
const halfWidth = (digits: string): string => digits.replace(/[0-9]/gu, (char) => String.fromCharCode(char.charCodeAt(0) - 0xfee0));
|
|
85
|
+
|
|
86
|
+
const KEY_ORDER = ["y", "e", "m", "n"] as const;
|
|
87
|
+
|
|
88
|
+
type Parts = Readonly<Partial<Record<(typeof KEY_ORDER)[number], number>>>;
|
|
89
|
+
|
|
90
|
+
type Groups = Readonly<Record<string, string | undefined>> | undefined;
|
|
91
|
+
|
|
92
|
+
/** 元号の年(令和8)を西暦の年(2026)にする。元年は 1。 */
|
|
93
|
+
const eraYearOf = (groups: Groups, firstYears: ReadonlyMap<string, number>): Parts => {
|
|
94
|
+
const firstYear = firstYears.get(groups?.["era"] ?? "");
|
|
95
|
+
const written = groups?.["eraYear"];
|
|
96
|
+
if (firstYear === undefined || written === undefined) return {};
|
|
97
|
+
return { y: firstYear + (written === "元" ? 1 : Number(halfWidth(written))) - 1 };
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const partsOf = (groups: Groups, firstYears: ReadonlyMap<string, number> = new Map()): Parts => ({
|
|
101
|
+
...Object.fromEntries(KEY_ORDER.flatMap((key) => (groups?.[key] === undefined ? [] : [[key, Number(halfWidth(groups[key]))]]))),
|
|
102
|
+
...eraYearOf(groups, firstYears),
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
/** 番号を書かない書き方の値は、instead_of に書いた番号付きの書き方から読む。 */
|
|
106
|
+
const insteadParts = (insteadOf: string, frames: readonly CompiledFrame[], kind: string): Parts | undefined => {
|
|
107
|
+
const frame = frames.find(
|
|
108
|
+
(candidate) => candidate.kind === kind && candidate.insteadOf === undefined && new RegExp(`^(?:${candidate.regex.source})$`, "iu").test(insteadOf),
|
|
109
|
+
);
|
|
110
|
+
if (frame === undefined) return undefined;
|
|
111
|
+
return partsOf(new RegExp(`^(?:${frame.regex.source})$`, "iu").exec(insteadOf)?.groups, frame.firstYears);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const labelOf = (match: RegExpExecArray, parts: Parts, frame: CompiledFrame): PeriodLabel | undefined => {
|
|
115
|
+
const keys = KEY_ORDER.filter((key) => parts[key] !== undefined);
|
|
116
|
+
if (keys.length === 0) return undefined;
|
|
117
|
+
return {
|
|
118
|
+
start: match.index,
|
|
119
|
+
end: match.index + match[0].length,
|
|
120
|
+
written: match[0],
|
|
121
|
+
kind: frame.kind,
|
|
122
|
+
shape: keys.join(","),
|
|
123
|
+
value: keys.map((key) => `${key}${String(parts[key])}`).join(","),
|
|
124
|
+
order: keys.reduce((sum, key) => sum * 100 + (parts[key] ?? 0), 0),
|
|
125
|
+
withinYear: parts.y === undefined && parts.e === undefined,
|
|
126
|
+
titleAlone: frame.titleAlone,
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const matchesOf = (text: string, frame: CompiledFrame, frames: readonly CompiledFrame[]): PeriodLabel[] =>
|
|
131
|
+
[...text.matchAll(frame.regex)].flatMap((match) => {
|
|
132
|
+
const parts = frame.insteadOf === undefined ? partsOf(match.groups, frame.firstYears) : insteadParts(frame.insteadOf, frames, frame.kind);
|
|
133
|
+
const label = parts === undefined ? undefined : labelOf(match, parts, frame);
|
|
134
|
+
return label === undefined ? [] : [label];
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
const overlaps = (left: PeriodLabel, right: PeriodLabel): boolean => left.start < right.end && right.start < left.end;
|
|
138
|
+
|
|
139
|
+
/** 文の中の期間の名前。同じ種類の名前が重なれば長いほう(Fiscal Year Ending … 2027 の中の Year Ending … 2027 は一つ)。 */
|
|
140
|
+
export const periodLabelsIn = (text: string, frames: readonly CompiledFrame[]): PeriodLabel[] => {
|
|
141
|
+
const all = frames.flatMap((frame) => matchesOf(text, frame, frames)).toSorted((left, right) => right.written.length - left.written.length);
|
|
142
|
+
const kept: PeriodLabel[] = [];
|
|
143
|
+
all.forEach((label) => {
|
|
144
|
+
if (!kept.some((other) => other.kind === label.kind && overlaps(other, label))) kept.push(label);
|
|
145
|
+
});
|
|
146
|
+
return kept.toSorted((left, right) => left.start - right.start);
|
|
147
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import type { StructureIssue } from "./issues.ts";
|
|
2
|
+
import { alternation, intervalOf, isMultiple, isPlainGap, nearestStated, occurrences, type Interval, type Span, type StatedAmount } from "./stated-multiple.ts";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* period-multiple-mismatch: an amount the text says is a number of another period's amount that is not that many of it
|
|
6
|
+
* (年払(月払の12か月分) 29,800円 with 月払 2,400円; "Annually (12 monthly payments) $298" with Monthly $24). Only an
|
|
7
|
+
* explicit statement is read: the base's own word beside a count and a word of a multiple (月払の12か月分, 12 times the
|
|
8
|
+
* monthly premium, 12 monthly payments). An annual amount that only stands beside a monthly one is not compared, since
|
|
9
|
+
* paying at once is often cheaper. The base is the nearest one stated before (one label, one amount), else the document's
|
|
10
|
+
* one base. A range of counts, a statement with two amounts, and a statement with a word that makes the amount another
|
|
11
|
+
* thing (割引, tax, each) are not compared. The words come from the lexicons. Pure.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export type PeriodMultipleWords = {
|
|
15
|
+
/** Labels of the base amount, also its words in a multiple (月払, 月額, Monthly, monthly payments). */
|
|
16
|
+
readonly bases: readonly string[];
|
|
17
|
+
/** Words after a count that make it a multiple (か月分, 倍, times). */
|
|
18
|
+
readonly times: readonly string[];
|
|
19
|
+
/** Words that may stand between a base and its count (の, the), or between a base label and its amount (は, is). */
|
|
20
|
+
readonly links: readonly string[];
|
|
21
|
+
/** Words that make the amount something other than the plain multiple (割引, 税込, discount, each). */
|
|
22
|
+
readonly skips: readonly string[];
|
|
23
|
+
/** Marks and words that join the two ends of a range (〜, to). */
|
|
24
|
+
readonly connectors: readonly string[];
|
|
25
|
+
/** Numbers written as words (twelve, 十二) and their values. */
|
|
26
|
+
readonly numberWords: readonly { readonly word: string; readonly value: number }[];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** A count read as a multiple of a base (月払の12か月分, 12 monthly payments). */
|
|
30
|
+
export type Phrase = Span & { readonly count: number };
|
|
31
|
+
|
|
32
|
+
/** A base as stated. range is undefined when its statement holds more than one amount or a word that makes it another. */
|
|
33
|
+
type Base = { readonly offset: number; readonly label: string; readonly currency: string; readonly range: Interval | undefined; readonly written: string };
|
|
34
|
+
|
|
35
|
+
type Count = Span & { readonly count: number; readonly timed: boolean };
|
|
36
|
+
|
|
37
|
+
const DIGITS = "[0-90-9]+(?:[..][0-90-9]+)?";
|
|
38
|
+
/** A count right after one of these is the tail of a larger number (十二, 二百), not a count of its own. */
|
|
39
|
+
const KANJI_NUMERALS = "〇零一二三四五六七八九十百千万";
|
|
40
|
+
const RANGE_START_DIGIT = /[0-90-9一二三四五六七八九十]\s*$/u;
|
|
41
|
+
const SENTENCE_END = /[。!?;;]|[.!?](?=\s|$)/gu;
|
|
42
|
+
/** Between a phrase and its amount only marks may stand: brackets, a cell's bar, a colon ((月払の12か月分) | 29,800円). */
|
|
43
|
+
const MARKS_ONLY = /^[\s||::==、,,()()[\][]]*$/u;
|
|
44
|
+
const SPACES_ONLY = /^[ \t\u3000]+$/u;
|
|
45
|
+
/** How far before a count the start of a range (11〜12か月分) is looked for. */
|
|
46
|
+
const RANGE_REACH = 12;
|
|
47
|
+
|
|
48
|
+
const lineBounds = (text: string, offset: number): Span => {
|
|
49
|
+
const end = text.indexOf("\n", offset);
|
|
50
|
+
return { start: text.lastIndexOf("\n", offset - 1) + 1, end: end === -1 ? text.length : end };
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** The sentence around a span, within its line. */
|
|
54
|
+
export const sentenceAround = (text: string, span: Span): Span => {
|
|
55
|
+
const line = lineBounds(text, span.start);
|
|
56
|
+
const ends = [...text.slice(line.start, line.end).matchAll(SENTENCE_END)].map((match) => line.start + match.index);
|
|
57
|
+
const start = ends.filter((end) => end < span.start).at(-1);
|
|
58
|
+
const end = ends.find((at) => at >= span.end);
|
|
59
|
+
return { start: start === undefined ? line.start : start + 1, end: end ?? line.end };
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const countOf = (written: string, words: PeriodMultipleWords): number =>
|
|
63
|
+
words.numberWords.find((entry) => entry.word.toLowerCase() === written.toLowerCase())?.value ?? Number(written.normalize("NFKC"));
|
|
64
|
+
|
|
65
|
+
/** Every count in the text (12, twelve), marked when a word of a multiple follows it (12か月分, 12 times). */
|
|
66
|
+
export const countsIn = (text: string, words: PeriodMultipleWords): Count[] => {
|
|
67
|
+
const numberWords = alternation(words.numberWords.map((entry) => entry.word));
|
|
68
|
+
const count = numberWords === undefined ? DIGITS : `${DIGITS}|${numberWords}`;
|
|
69
|
+
const times = alternation(words.times);
|
|
70
|
+
const tail = times === undefined ? "" : `(\\s?(?:${times}))?`;
|
|
71
|
+
const pattern = new RegExp(`(?<![0-90-9.,,.${KANJI_NUMERALS}])(${count})(?![0-90-9]|[.,,.][0-90-9])${tail}`, "giu");
|
|
72
|
+
return [...text.matchAll(pattern)].map((match) => ({
|
|
73
|
+
start: match.index,
|
|
74
|
+
end: match.index + match[0].length,
|
|
75
|
+
count: countOf(match[1] ?? "", words),
|
|
76
|
+
timed: match[2] !== undefined,
|
|
77
|
+
}));
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** Whether only link words and spaces stand between a base word and its count, on one line (の, " the "). */
|
|
81
|
+
const isLinkGap = (gap: string, words: PeriodMultipleWords): boolean => {
|
|
82
|
+
if (gap.includes("\n")) return false;
|
|
83
|
+
const pattern = alternation(words.links);
|
|
84
|
+
return (pattern === undefined ? gap : gap.replace(new RegExp(pattern, "giu"), "")).trim() === "";
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/** Whether a count closes a range: a connector right before it with a number before that (11〜12, eleven to twelve; not "equal to 12"). */
|
|
88
|
+
const endsRange = (text: string, count: Count, words: PeriodMultipleWords): boolean => {
|
|
89
|
+
const before = text.slice(Math.max(0, count.start - RANGE_REACH), count.start).trimEnd();
|
|
90
|
+
const endsNumber = (head: string): boolean =>
|
|
91
|
+
RANGE_START_DIGIT.test(head) || countsIn(head.trimEnd(), words).some((found) => found.end === head.trimEnd().length);
|
|
92
|
+
return words.connectors.some((connector) => before.toLowerCase().endsWith(connector.toLowerCase()) && endsNumber(before.slice(0, -connector.length)));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/** The base word a count is a multiple of: before it with a word of a multiple (月払の12か月分), or after it (12 monthly payments). */
|
|
96
|
+
const baseOf = (text: string, count: Count, bases: readonly Span[], words: PeriodMultipleWords): Span | undefined => {
|
|
97
|
+
const after = bases.find(
|
|
98
|
+
(base) =>
|
|
99
|
+
base.start >= count.end && (count.timed ? isLinkGap(text.slice(count.end, base.start), words) : SPACES_ONLY.test(text.slice(count.end, base.start))),
|
|
100
|
+
);
|
|
101
|
+
if (after !== undefined) return after;
|
|
102
|
+
return count.timed ? bases.findLast((base) => base.end <= count.start && isLinkGap(text.slice(base.end, count.start), words)) : undefined;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** Every count stated as a multiple of a base word (月払の12か月分, 12 times the monthly premium, 12 monthly payments). */
|
|
106
|
+
export const phrasesIn = (text: string, words: PeriodMultipleWords): Phrase[] => {
|
|
107
|
+
const bases = occurrences(text, words.bases);
|
|
108
|
+
return countsIn(text, words).flatMap((count) => {
|
|
109
|
+
const base = baseOf(text, count, bases, words);
|
|
110
|
+
if (base === undefined || endsRange(text, count, words)) return [];
|
|
111
|
+
return [{ start: Math.min(base.start, count.start), end: Math.max(base.end, count.end), count: count.count }];
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const amountsWithin = (amounts: readonly StatedAmount[], span: Span): StatedAmount[] =>
|
|
116
|
+
amounts.filter((amount) => amount.offset >= span.start && amount.end <= span.end);
|
|
117
|
+
|
|
118
|
+
const inside = (phrases: readonly Phrase[], offset: number): boolean => phrases.some((phrase) => offset >= phrase.start && offset < phrase.end);
|
|
119
|
+
|
|
120
|
+
/** A base label followed on its line by an amount (月払 | 2,400円, Monthly: $24); unclear when the sentence holds more. */
|
|
121
|
+
const baseAt = (text: string, label: Span, amounts: readonly StatedAmount[], phrases: readonly Phrase[], words: PeriodMultipleWords): Base[] => {
|
|
122
|
+
const sentence = sentenceAround(text, label);
|
|
123
|
+
const [first, ...rest] = amountsWithin(amounts, { start: label.end, end: sentence.end });
|
|
124
|
+
if (first === undefined || !isPlainGap(text.slice(label.end, first.offset), words.links)) return [];
|
|
125
|
+
const written = text.slice(first.offset, first.end);
|
|
126
|
+
const statement = text.slice(sentence.start, sentence.end);
|
|
127
|
+
const unclear =
|
|
128
|
+
rest.length > 0 || occurrences(statement, words.skips).length > 0 || phrases.some((phrase) => phrase.start >= sentence.start && phrase.end <= sentence.end);
|
|
129
|
+
const range = unclear ? undefined : intervalOf(first, written);
|
|
130
|
+
return [{ offset: label.start, label: text.slice(label.start, label.end), currency: first.currency, range, written }];
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/** Each base label outside a multiple that is followed by its amount, in document order. */
|
|
134
|
+
const statedBases = (text: string, amounts: readonly StatedAmount[], phrases: readonly Phrase[], words: PeriodMultipleWords): Base[] =>
|
|
135
|
+
occurrences(text, words.bases)
|
|
136
|
+
.filter((label) => !inside(phrases, label.start))
|
|
137
|
+
.flatMap((label) => baseAt(text, label, amounts, phrases, words));
|
|
138
|
+
|
|
139
|
+
const gapBetween = (text: string, phrase: Phrase, amount: StatedAmount): string =>
|
|
140
|
+
amount.offset >= phrase.end ? text.slice(phrase.end, amount.offset) : text.slice(amount.end, phrase.start);
|
|
141
|
+
|
|
142
|
+
/** The one amount a phrase's sentence states beside it, when the sentence holds no other amount, phrase or skip word. */
|
|
143
|
+
const multipleAmount = (
|
|
144
|
+
text: string,
|
|
145
|
+
phrase: Phrase,
|
|
146
|
+
phrases: readonly Phrase[],
|
|
147
|
+
amounts: readonly StatedAmount[],
|
|
148
|
+
words: PeriodMultipleWords,
|
|
149
|
+
): StatedAmount | undefined => {
|
|
150
|
+
const sentence = sentenceAround(text, phrase);
|
|
151
|
+
const [amount, ...rest] = amountsWithin(amounts, sentence);
|
|
152
|
+
if (amount === undefined || rest.length > 0 || (amount.offset < phrase.end && amount.end > phrase.start)) return undefined;
|
|
153
|
+
const others = phrases.some((other) => other !== phrase && other.start >= sentence.start && other.end <= sentence.end);
|
|
154
|
+
if (others || occurrences(text.slice(sentence.start, sentence.end), words.skips).length > 0) return undefined;
|
|
155
|
+
return MARKS_ONLY.test(gapBetween(text, phrase, amount)) ? amount : undefined;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const mismatchOf = (
|
|
159
|
+
text: string,
|
|
160
|
+
phrase: Phrase,
|
|
161
|
+
phrases: readonly Phrase[],
|
|
162
|
+
amounts: readonly StatedAmount[],
|
|
163
|
+
bases: readonly Base[],
|
|
164
|
+
words: PeriodMultipleWords,
|
|
165
|
+
): StructureIssue[] => {
|
|
166
|
+
const amount = multipleAmount(text, phrase, phrases, amounts, words);
|
|
167
|
+
const base = nearestStated(bases, phrase.start);
|
|
168
|
+
if (amount === undefined || base?.range === undefined || base.currency !== amount.currency) return [];
|
|
169
|
+
if (isMultiple(phrase.count, intervalOf(amount, text.slice(amount.offset, amount.end)), [base.range])) return [];
|
|
170
|
+
const values = {
|
|
171
|
+
multiple: text.slice(phrase.start, phrase.end),
|
|
172
|
+
amount: text.slice(amount.offset, amount.end),
|
|
173
|
+
label: base.label,
|
|
174
|
+
base: base.written,
|
|
175
|
+
count: phrase.count,
|
|
176
|
+
};
|
|
177
|
+
return [{ offset: Math.min(phrase.start, amount.offset), values }];
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
/** Every amount stated as a number of a base's amount (月払の12か月分) that is not that many of the nearest stated base. */
|
|
181
|
+
export const periodMultipleMismatches = (text: string, amounts: readonly StatedAmount[], words: PeriodMultipleWords): StructureIssue[] => {
|
|
182
|
+
const phrases = phrasesIn(text, words);
|
|
183
|
+
if (phrases.length === 0) return [];
|
|
184
|
+
const bases = statedBases(text, amounts, phrases, words);
|
|
185
|
+
return phrases.flatMap((phrase) => mismatchOf(text, phrase, phrases, amounts, bases, words));
|
|
186
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// quantity-range-reversed: which measured quantities may be one end of a range, read as the ends structure/amount-range.ts
|
|
2
|
+
// compares. Pure.
|
|
3
|
+
import type { Measured } from "../facts/measures.ts";
|
|
4
|
+
import { escapeRegExp } from "../orthography.ts";
|
|
5
|
+
import type { StructureIssue } from "./issues.ts";
|
|
6
|
+
import type { RangeAmount } from "./amount-range.ts";
|
|
7
|
+
|
|
8
|
+
/** 10 and a minus sign right before the number is a power of ten written flat ("10-8 cm" for 10⁻⁸ cm), not a range. */
|
|
9
|
+
const POWER_OF_TEN = /(?<![0-90-9.,,.])[11][00][-−-]$/u;
|
|
10
|
+
|
|
11
|
+
/** "10-" and the character before it, which must not be a digit (110-8 cm is a range). */
|
|
12
|
+
const POWER_OF_TEN_LOOKBACK = 4;
|
|
13
|
+
|
|
14
|
+
const isExponent = (text: string, measured: Measured): boolean =>
|
|
15
|
+
POWER_OF_TEN.test(text.slice(Math.max(0, measured.start - POWER_OF_TEN_LOOKBACK), measured.start));
|
|
16
|
+
|
|
17
|
+
/** A quantity as one end of a range: two ends compare only in one unit, however it is spelled (℃ with °C, m with meters). */
|
|
18
|
+
const rangeEndOf = (text: string, measured: Measured): RangeAmount => ({
|
|
19
|
+
offset: measured.start,
|
|
20
|
+
end: measured.end,
|
|
21
|
+
currency: `${measured.dimension}:${measured.factors.join(",")}`,
|
|
22
|
+
value: measured.amount,
|
|
23
|
+
scale: undefined,
|
|
24
|
+
position: text.startsWith(measured.unit, measured.start) ? "before" : "after",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
/** The measured quantities that can end a range, as range ends. */
|
|
28
|
+
export const quantityRangeEnds = (text: string, measured: readonly Measured[]): RangeAmount[] =>
|
|
29
|
+
measured.filter((value) => !isExponent(text, value)).map((value) => rangeEndOf(text, value));
|
|
30
|
+
|
|
31
|
+
const LATIN_WORD = /^[A-Za-z]/u;
|
|
32
|
+
|
|
33
|
+
/** Whether a lead word stands right before the range on its line ("went from 9 minutes to 2 minutes" tells of a change). */
|
|
34
|
+
const ledBy = (text: string, offset: number, leads: readonly string[]): boolean => {
|
|
35
|
+
const before = text
|
|
36
|
+
.slice(text.lastIndexOf("\n", offset - 1) + 1, offset)
|
|
37
|
+
.trimEnd()
|
|
38
|
+
.toLowerCase();
|
|
39
|
+
return leads.some((lead) => {
|
|
40
|
+
const edge = LATIN_WORD.test(lead) ? "(?<![a-z])" : "";
|
|
41
|
+
return new RegExp(`${edge}${escapeRegExp(lead.toLowerCase())}$`, "u").test(before);
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** The reversed ranges that no lead word frames as a change. */
|
|
46
|
+
export const unledRanges = (text: string, issues: readonly StructureIssue[], leads: readonly string[]): StructureIssue[] =>
|
|
47
|
+
issues.filter((issue) => !ledBy(text, issue.offset, leads));
|