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,222 @@
|
|
|
1
|
+
import { escapeRegExp } from "../orthography.ts";
|
|
2
|
+
import type { StructureIssue } from "./issues.ts";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* annual-holidays-mismatch: a job posting's annual days off (年間休日 90日) fewer than its weekly days off give over a year
|
|
6
|
+
* (完全週休2日制 is two days off every week, at least 104 a year). Only a lower bound: public holidays, summer and the
|
|
7
|
+
* new year add to it. A weekly phrase that is not every week (週休2日制 is two days off in at least one week a month), a
|
|
8
|
+
* negated one, one with an exception beside it, an approximate or open count, two different counts and two weekly phrases
|
|
9
|
+
* with different minimums leave the posting unchecked. The words come from the lexicons. Pure.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export type PositionedWord = { readonly word: string; readonly position: "before" | "after" };
|
|
13
|
+
|
|
14
|
+
/** A weekly phrase and the fewest days off a year it gives; undefined for a phrase that is not every week (週休2日制). */
|
|
15
|
+
export type WeeklyWord = { readonly word: string; readonly minimum: number | undefined };
|
|
16
|
+
|
|
17
|
+
export type AnnualHolidaysWords = {
|
|
18
|
+
/** Labels of the annual days off: before the count (年間休日 125日) or after it, with the word of a day in it (125 days off a year). */
|
|
19
|
+
readonly labels: readonly PositionedWord[];
|
|
20
|
+
/** The word of a day after a count (日, days). */
|
|
21
|
+
readonly days: readonly string[];
|
|
22
|
+
/** Words that may stand between a label and its count (は, is). */
|
|
23
|
+
readonly links: readonly string[];
|
|
24
|
+
readonly weekly: readonly WeeklyWord[];
|
|
25
|
+
/** Words that negate a weekly phrase: right after it (ではない) or earlier in its sentence (not). */
|
|
26
|
+
readonly negations: readonly PositionedWord[];
|
|
27
|
+
/** Words after a weekly phrase on its line that make an exception to it (除く, 出勤, except). */
|
|
28
|
+
readonly exceptions: readonly string[];
|
|
29
|
+
/** Words that make a count approximate or open (約, 以上, about, at least). */
|
|
30
|
+
readonly markers: readonly PositionedWord[];
|
|
31
|
+
/** Marks and words that join the two ends of a range (〜, to). */
|
|
32
|
+
readonly connectors: readonly string[];
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
type Span = { readonly start: number; readonly end: number };
|
|
36
|
+
type DayCount = Span & { readonly days: number; readonly clear: boolean };
|
|
37
|
+
type Weekly = Span & { readonly minimum: number | undefined; readonly clear: boolean };
|
|
38
|
+
|
|
39
|
+
/** How far from a count a marker (約, 以上) or the start of a range is looked for. */
|
|
40
|
+
const MARKER_REACH = 12;
|
|
41
|
+
const LATIN = /[A-Za-z]/u;
|
|
42
|
+
const SEPARATORS = /[\s||::==、,,・//()()[\][]-]/gu;
|
|
43
|
+
const PARENTHETICAL_WITHOUT_DIGITS = /[((][^()()0-90-9]*[))]/gu;
|
|
44
|
+
const SENTENCE_END = /[。!?;;]|[.!?](?=\s|$)/u;
|
|
45
|
+
const SENTENCE_SPLIT = /[。!?;;]|[.!?](?=\s)/u;
|
|
46
|
+
const RANGE_START = /[0-90-9]\s*$/u;
|
|
47
|
+
const COUNT = "(?<![0-90-9.,,.])([0-90-9]+)";
|
|
48
|
+
|
|
49
|
+
const DIGIT = /[0-90-9]/u;
|
|
50
|
+
|
|
51
|
+
/** The edge a word needs on one side: a Latin word stands apart from letters, a number from digits (4-day is not in 14-day). */
|
|
52
|
+
const edgeOf = (char: string): string => {
|
|
53
|
+
if (LATIN.test(char)) return "[A-Za-z]";
|
|
54
|
+
return DIGIT.test(char) ? "[0-90-9]" : "";
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const wordPattern = (word: string): string => {
|
|
58
|
+
const start = edgeOf(word.charAt(0));
|
|
59
|
+
const end = edgeOf(word.charAt(word.length - 1));
|
|
60
|
+
return [start === "" ? "" : `(?<!${start})`, escapeRegExp(word), end === "" ? "" : `(?!${end})`].join("");
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** One alternation of the words, longest first so 完全週休2日制 wins over 週休2日制. Undefined when there are none. */
|
|
64
|
+
const alternation = (words: readonly string[]): string | undefined =>
|
|
65
|
+
words.length === 0
|
|
66
|
+
? undefined
|
|
67
|
+
: words
|
|
68
|
+
.toSorted((left, right) => right.length - left.length)
|
|
69
|
+
.map(wordPattern)
|
|
70
|
+
.join("|");
|
|
71
|
+
|
|
72
|
+
const occurrences = (text: string, words: readonly string[]): Span[] => {
|
|
73
|
+
const pattern = alternation(words);
|
|
74
|
+
if (pattern === undefined) return [];
|
|
75
|
+
return [...text.matchAll(new RegExp(pattern, "giu"))].map((match) => ({ start: match.index, end: match.index + match[0].length }));
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const contains = (text: string, words: readonly string[]): boolean => occurrences(text, words).length > 0;
|
|
79
|
+
|
|
80
|
+
const wordsAt = (words: readonly PositionedWord[], position: "before" | "after"): string[] =>
|
|
81
|
+
words.filter((word) => word.position === position).map((word) => word.word.toLowerCase());
|
|
82
|
+
|
|
83
|
+
const lineEnd = (text: string, offset: number): number => {
|
|
84
|
+
const end = text.indexOf("\n", offset);
|
|
85
|
+
return end === -1 ? text.length : end;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const lineStart = (text: string, offset: number): number => text.lastIndexOf("\n", offset - 1) + 1;
|
|
89
|
+
|
|
90
|
+
/** Where a statement that starts at offset ends: at the end of its sentence or line. */
|
|
91
|
+
const statementEnd = (text: string, offset: number): number => {
|
|
92
|
+
const end = lineEnd(text, offset);
|
|
93
|
+
const sentence = SENTENCE_END.exec(text.slice(offset, end));
|
|
94
|
+
return sentence === null ? end : offset + sentence.index;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/** The sentence before offset, from its start: where a negation of a phrase is looked for (does not have …). */
|
|
98
|
+
const sentenceBefore = (text: string, offset: number): string => text.slice(lineStart(text, offset), offset).split(SENTENCE_SPLIT).at(-1) ?? "";
|
|
99
|
+
|
|
100
|
+
/** Whether only separators, bracketed words without digits and the given words stand in the gap (「:」, " is "). */
|
|
101
|
+
export const isPlainGap = (gap: string, words: readonly string[]): boolean => {
|
|
102
|
+
const pattern = alternation(words);
|
|
103
|
+
const bare = gap.replace(PARENTHETICAL_WITHOUT_DIGITS, "");
|
|
104
|
+
return (pattern === undefined ? bare : bare.replace(new RegExp(pattern, "giu"), "")).replace(SEPARATORS, "") === "";
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/** Whether text starts with the word, a Latin word ending there ("to" is not the start of "total"). */
|
|
108
|
+
const startsWithWord = (text: string, word: string): boolean =>
|
|
109
|
+
text.startsWith(word) && !(LATIN.test(word.charAt(word.length - 1)) && LATIN.test(text.charAt(word.length)));
|
|
110
|
+
|
|
111
|
+
/** Whether text ends with the word, a Latin word starting there ("over" is not the end of "moreover"). */
|
|
112
|
+
const endsWithWord = (text: string, word: string): boolean =>
|
|
113
|
+
text.endsWith(word) && !(LATIN.test(word.charAt(0)) && LATIN.test(text.charAt(text.length - word.length - 1)));
|
|
114
|
+
|
|
115
|
+
/** Whether a count is approximate (約90日, 90日以上), open (90日〜) or the end of a range (80〜90日). */
|
|
116
|
+
const isMarked = (text: string, span: Span, words: AnnualHolidaysWords): boolean => {
|
|
117
|
+
const before = text
|
|
118
|
+
.slice(Math.max(0, span.start - MARKER_REACH), span.start)
|
|
119
|
+
.trimEnd()
|
|
120
|
+
.toLowerCase();
|
|
121
|
+
const after = text
|
|
122
|
+
.slice(span.end, span.end + MARKER_REACH)
|
|
123
|
+
.trimStart()
|
|
124
|
+
.toLowerCase();
|
|
125
|
+
const connectors = words.connectors.map((connector) => connector.toLowerCase());
|
|
126
|
+
const ranged = connectors.some((connector) => endsWithWord(before, connector) && RANGE_START.test(before.slice(0, -connector.length)));
|
|
127
|
+
const markedBefore = wordsAt(words.markers, "before").some((marker) => endsWithWord(before, marker));
|
|
128
|
+
const markedAfter = [...wordsAt(words.markers, "after"), ...connectors].some((marker) => startsWithWord(after, marker));
|
|
129
|
+
return ranged || markedBefore || markedAfter;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const countOf = (written: string): number => Number(written.normalize("NFKC"));
|
|
133
|
+
|
|
134
|
+
const gapWords = (words: AnnualHolidaysWords): string[] => [...words.links, ...wordsAt(words.markers, "before")];
|
|
135
|
+
|
|
136
|
+
/** The gap without the start of a range at its end (年間休日 100〜|120日), so the range is read and found not plain. */
|
|
137
|
+
const withoutRangeStart = (gap: string, days: string, words: AnnualHolidaysWords): string => {
|
|
138
|
+
const connectors = alternation(words.connectors);
|
|
139
|
+
return connectors === undefined ? gap : gap.replace(new RegExp(`[0-90-9]+\\s*(?:${days})?\\s*(?:${connectors})\\s*$`, "iu"), "");
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The count a label before it states (年間休日:125日): the first count of days in its statement, joined to it by a plain
|
|
144
|
+
* gap. A marker (年間休日は約120日) or a range's start in the gap is read, so the count is found not plain rather than missed.
|
|
145
|
+
*/
|
|
146
|
+
const countAfterLabel = (text: string, label: Span, words: AnnualHolidaysWords): DayCount | undefined => {
|
|
147
|
+
const days = alternation(words.days);
|
|
148
|
+
if (days === undefined) return undefined;
|
|
149
|
+
const end = statementEnd(text, label.end);
|
|
150
|
+
const match = new RegExp(`${COUNT}\\s*(?:${days})`, "iu").exec(text.slice(label.end, end));
|
|
151
|
+
if (match === null || !isPlainGap(withoutRangeStart(text.slice(label.end, label.end + match.index), days, words), gapWords(words))) return undefined;
|
|
152
|
+
const span = { start: label.end + match.index, end: label.end + match.index + match[0].length };
|
|
153
|
+
return { ...span, days: countOf(match[1] ?? ""), clear: !isMarked(text, span, words) };
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/** The counts a label after them states (125 days off a year). */
|
|
157
|
+
const countsBeforeLabels = (text: string, words: AnnualHolidaysWords): DayCount[] => {
|
|
158
|
+
const labels = alternation(wordsAt(words.labels, "after"));
|
|
159
|
+
if (labels === undefined) return [];
|
|
160
|
+
return [...text.matchAll(new RegExp(`${COUNT}\\s*(?:${labels})`, "giu"))].map((match) => {
|
|
161
|
+
const span = { start: match.index, end: match.index + match[0].length };
|
|
162
|
+
return { ...span, days: countOf(match[1] ?? ""), clear: !isMarked(text, span, words) };
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/** Every annual count of days off the document states, in document order. */
|
|
167
|
+
export const annualCountsIn = (text: string, words: AnnualHolidaysWords): DayCount[] => {
|
|
168
|
+
const after = occurrences(text, wordsAt(words.labels, "before")).flatMap((label) => countAfterLabel(text, label, words) ?? []);
|
|
169
|
+
return [...after, ...countsBeforeLabels(text, words)].toSorted((left, right) => left.start - right.start);
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
/** Whether a weekly phrase is negated (完全週休2日制ではない, does not offer two days off every week). */
|
|
173
|
+
const isNegated = (text: string, span: Span, words: AnnualHolidaysWords): boolean => {
|
|
174
|
+
const after = text
|
|
175
|
+
.slice(span.end, span.end + MARKER_REACH)
|
|
176
|
+
.trimStart()
|
|
177
|
+
.toLowerCase();
|
|
178
|
+
return (
|
|
179
|
+
wordsAt(words.negations, "after").some((word) => startsWithWord(after, word)) ||
|
|
180
|
+
contains(sentenceBefore(text, span.start), wordsAt(words.negations, "before"))
|
|
181
|
+
);
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/** Every weekly phrase in the document, each with the fewest days off a year it gives and whether it can be read plainly. */
|
|
185
|
+
export const weeklyIn = (text: string, words: AnnualHolidaysWords): Weekly[] => {
|
|
186
|
+
const minimums = new Map(words.weekly.map((entry): [string, number | undefined] => [entry.word.toLowerCase(), entry.minimum]));
|
|
187
|
+
return occurrences(
|
|
188
|
+
text,
|
|
189
|
+
words.weekly.map((entry) => entry.word),
|
|
190
|
+
).map((span) => {
|
|
191
|
+
const minimum = minimums.get(text.slice(span.start, span.end).toLowerCase());
|
|
192
|
+
const excepted = contains(text.slice(span.end, lineEnd(text, span.end)), words.exceptions);
|
|
193
|
+
return { ...span, minimum, clear: minimum !== undefined && !excepted && !isNegated(text, span, words) };
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The weekly phrase whose minimum all the document's weekly phrases agree on; undefined when there is none, one is not
|
|
199
|
+
* plain, or two give different minimums (完全週休2日制 for one role and 完全週休3日制 for another).
|
|
200
|
+
*/
|
|
201
|
+
const agreedWeekly = (weekly: readonly Weekly[]): Weekly | undefined => {
|
|
202
|
+
const [first] = weekly;
|
|
203
|
+
if (first === undefined) return undefined;
|
|
204
|
+
return weekly.every((entry) => entry.clear && entry.minimum === first.minimum) ? first : undefined;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
/** The one count all the document's counts agree on; undefined when there is none, one is not plain, or two differ. */
|
|
208
|
+
const agreedCount = (counts: readonly DayCount[]): DayCount | undefined => {
|
|
209
|
+
const [first] = counts;
|
|
210
|
+
if (first === undefined) return undefined;
|
|
211
|
+
return counts.every((count) => count.clear && count.days === first.days) ? first : undefined;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/** Every annual count of days off below the fewest the posting's weekly days off give. */
|
|
215
|
+
export const annualHolidaysMismatches = (text: string, words: AnnualHolidaysWords): StructureIssue[] => {
|
|
216
|
+
const counts = annualCountsIn(text, words);
|
|
217
|
+
const count = agreedCount(counts);
|
|
218
|
+
const weekly = agreedWeekly(weeklyIn(text, words));
|
|
219
|
+
if (count === undefined || weekly?.minimum === undefined || count.days >= weekly.minimum) return [];
|
|
220
|
+
const values = { days: count.days, weekly: text.slice(weekly.start, weekly.end), minimum: weekly.minimum };
|
|
221
|
+
return counts.map((each) => ({ offset: each.start, values: { ...values, written: text.slice(each.start, each.end) } }));
|
|
222
|
+
};
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { escapeRegExp } from "../orthography.ts";
|
|
2
|
+
import type { StructureIssue } from "./issues.ts";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* annual-pay-mismatch: a job posting's example annual pay that is not the monthly pay times twelve plus the bonus months
|
|
6
|
+
* (年収例 450万円 with 月給28万円 and 賞与 計3ヶ月分, where 28万 × 15 is 420万). The monthly pay and the bonus are the ones
|
|
7
|
+
* written on the annual line itself (月給28万円の場合), else the one reading the rest of the document gives. Two different
|
|
8
|
+
* readings, a reading that cannot be read plainly (a range of months, 各, 約, 以上, an open range) and an annual line or note
|
|
9
|
+
* that mentions overtime or allowances all leave the figure unchecked. A posting that mentions an annual salary (年俸) is
|
|
10
|
+
* not compared: its monthly pay may be the salary divided by 12, 14 or 16. The words come from the lexicons. Pure.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/** One amount of money as read: its currency, its value, and the value of the word of scale written in it (万), if any. */
|
|
14
|
+
export type PayAmount = {
|
|
15
|
+
readonly offset: number;
|
|
16
|
+
readonly end: number;
|
|
17
|
+
readonly currency: string;
|
|
18
|
+
readonly value: number;
|
|
19
|
+
readonly scale: number | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type LabelKind = "example" | "salary" | "monthly" | "pay" | "bonus";
|
|
23
|
+
|
|
24
|
+
export type PositionedWord = { readonly word: string; readonly position: "before" | "after" };
|
|
25
|
+
|
|
26
|
+
export type AnnualPayWords = {
|
|
27
|
+
/** Labels by kind: an example annual pay (年収例), an annual salary (年俸), a monthly pay (月給), a pay that is monthly only beside a per-month word (給与), a bonus (賞与). */
|
|
28
|
+
readonly labels: Readonly<Record<LabelKind, readonly string[]>>;
|
|
29
|
+
/** Words that may stand between a label and its amount (は, of). */
|
|
30
|
+
readonly links: readonly string[];
|
|
31
|
+
/** Words that make a pay label monthly (a month, /月). */
|
|
32
|
+
readonly perMonth: readonly string[];
|
|
33
|
+
/** Words that say there is no bonus: after the label (なし, none) or before it (No bonus). */
|
|
34
|
+
readonly none: readonly PositionedWord[];
|
|
35
|
+
/** Words that make a bonus months count per payment (各, each); such a bonus is not read. */
|
|
36
|
+
readonly each: readonly string[];
|
|
37
|
+
/** Words of a bonus paid besides the stated one (別途, additional); such a bonus is not read. */
|
|
38
|
+
readonly extra: readonly string[];
|
|
39
|
+
/** Words that say a bonus is paid more than once a year (年2回, twice a year); with one, the months must be called a total. */
|
|
40
|
+
readonly times: readonly string[];
|
|
41
|
+
/** Words that call a bonus's months the year's total (合計, in total). */
|
|
42
|
+
readonly totals: readonly string[];
|
|
43
|
+
/** Words that say a pay holds overtime or allowances (残業, 手当, overtime); such a pay is not compared. */
|
|
44
|
+
readonly includes: readonly string[];
|
|
45
|
+
/** Words that make an amount or a count open-ended or approximate (約, 以上, from, or more). */
|
|
46
|
+
readonly markers: readonly PositionedWord[];
|
|
47
|
+
/** The word of a month after a count (ヶ月, months). */
|
|
48
|
+
readonly months: readonly string[];
|
|
49
|
+
/** Marks and words that join the two ends of a range (〜, to). */
|
|
50
|
+
readonly connectors: readonly string[];
|
|
51
|
+
/** Numbers written as words (three) and their values. */
|
|
52
|
+
readonly numberWords: readonly { readonly word: string; readonly value: number }[];
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** Two ends of a pay; a single amount has both ends the same. */
|
|
56
|
+
export type Ends = { readonly low: number; readonly high: number };
|
|
57
|
+
|
|
58
|
+
/** A pay as read: its ends, its currency, how it was written, and the rounding its written digits allow. */
|
|
59
|
+
export type PayReading = { readonly offset: number; readonly ends: Ends; readonly currency: string; readonly written: string; readonly unit: number };
|
|
60
|
+
|
|
61
|
+
export type BonusReading = { readonly months: number; readonly written: string };
|
|
62
|
+
|
|
63
|
+
/** A pay or a bonus that is stated but cannot be read plainly. */
|
|
64
|
+
type Unclear = { readonly unclear: true };
|
|
65
|
+
const UNCLEAR: Unclear = { unclear: true };
|
|
66
|
+
|
|
67
|
+
type Span = { readonly start: number; readonly end: number };
|
|
68
|
+
type Label = Span & { readonly kind: LabelKind };
|
|
69
|
+
type Count = Span & { readonly count: number; readonly marked: boolean };
|
|
70
|
+
type Scope = { readonly label: Label; readonly end: number };
|
|
71
|
+
type Context = { readonly text: string; readonly labels: readonly Label[]; readonly amounts: readonly PayAmount[]; readonly words: AnnualPayWords };
|
|
72
|
+
type Posting = { readonly monthly: PayReading | undefined; readonly bonus: BonusReading | undefined };
|
|
73
|
+
|
|
74
|
+
/** An annual pay written in plain digits ($72,000, 4,200,000円) may be rounded to a thousand of its currency. */
|
|
75
|
+
export const PLAIN_ROUNDING = 1000;
|
|
76
|
+
const MONTHS_A_YEAR = 12;
|
|
77
|
+
const KINDS: readonly LabelKind[] = ["example", "salary", "monthly", "pay", "bonus"];
|
|
78
|
+
const ANNUAL: readonly LabelKind[] = ["example", "salary"];
|
|
79
|
+
const BONUS_STOPS: readonly LabelKind[] = ["example", "salary", "bonus"];
|
|
80
|
+
/** How far from an amount or a count a marker (約, 以上) or the start of a range is looked for. */
|
|
81
|
+
const MARKER_REACH = 12;
|
|
82
|
+
|
|
83
|
+
const LATIN = /[A-Za-z]/u;
|
|
84
|
+
const SEPARATORS = /[\s||::==、,,・//'’()()[\][]-]/gu;
|
|
85
|
+
const PARENTHETICAL_WITHOUT_DIGITS = /[((][^()()0-90-9]*[))]/gu;
|
|
86
|
+
const SENTENCE_END = /[。!?;;]|[.!?](?=\s|$)/u;
|
|
87
|
+
const SENTENCE_SPLIT = /[。!?;;]|[.!?](?=\s)/u;
|
|
88
|
+
const RANGE_START = /[0-90-9A-Za-z一二三四五六七八九十]\s*$/u;
|
|
89
|
+
const WORD_END = /[0-9A-Za-z]$/u;
|
|
90
|
+
const DIGITS = "[0-90-9]+(?:[..][0-90-9]+)?";
|
|
91
|
+
|
|
92
|
+
const wordPattern = (word: string): string => {
|
|
93
|
+
const edgeStart = LATIN.test(word.charAt(0)) ? "(?<![A-Za-z])" : "";
|
|
94
|
+
const edgeEnd = LATIN.test(word.charAt(word.length - 1)) ? "(?![A-Za-z])" : "";
|
|
95
|
+
return `${edgeStart}${escapeRegExp(word)}${edgeEnd}`;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/** One alternation of the words, longest first so 年収例 wins over 年収. Undefined when there are none. */
|
|
99
|
+
const alternation = (words: readonly string[]): string | undefined =>
|
|
100
|
+
words.length === 0
|
|
101
|
+
? undefined
|
|
102
|
+
: words
|
|
103
|
+
.toSorted((left, right) => right.length - left.length)
|
|
104
|
+
.map(wordPattern)
|
|
105
|
+
.join("|");
|
|
106
|
+
|
|
107
|
+
const occurrences = (text: string, words: readonly string[]): Span[] => {
|
|
108
|
+
const pattern = alternation(words);
|
|
109
|
+
if (pattern === undefined) return [];
|
|
110
|
+
return [...text.matchAll(new RegExp(pattern, "giu"))].map((match) => ({ start: match.index, end: match.index + match[0].length }));
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const contains = (text: string, words: readonly string[]): boolean => occurrences(text, words).length > 0;
|
|
114
|
+
|
|
115
|
+
/** Whether only separators, bracketed words without digits and the given words stand in the gap (「:」, " of "). */
|
|
116
|
+
export const isPlainGap = (gap: string, words: readonly string[]): boolean => {
|
|
117
|
+
const pattern = alternation(words);
|
|
118
|
+
const bare = gap.replace(PARENTHETICAL_WITHOUT_DIGITS, "");
|
|
119
|
+
return (pattern === undefined ? bare : bare.replace(new RegExp(pattern, "giu"), "")).replace(SEPARATORS, "") === "";
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/** Every label in document order with its kind, read in one pass so a longer label (Annual salary) hides a shorter one in it (salary). */
|
|
123
|
+
export const labelsIn = (text: string, words: AnnualPayWords): Label[] => {
|
|
124
|
+
const kinds = new Map(KINDS.flatMap((kind) => words.labels[kind].map((label): [string, LabelKind] => [label.toLowerCase(), kind])));
|
|
125
|
+
return occurrences(text, [...kinds.keys()]).flatMap((span) => {
|
|
126
|
+
const kind = kinds.get(text.slice(span.start, span.end).toLowerCase());
|
|
127
|
+
return kind === undefined ? [] : [{ ...span, kind }];
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const lineStart = (text: string, offset: number): number => text.lastIndexOf("\n", offset - 1) + 1;
|
|
132
|
+
|
|
133
|
+
const lineEnd = (text: string, offset: number): number => {
|
|
134
|
+
const end = text.indexOf("\n", offset);
|
|
135
|
+
return end === -1 ? text.length : end;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/** Where a label's statement ends: at the end of its sentence or line, or at the next label of one of the given kinds. */
|
|
139
|
+
const statementEnd = (text: string, label: Label, labels: readonly Label[], stops: readonly LabelKind[]): number => {
|
|
140
|
+
const end = lineEnd(text, label.end);
|
|
141
|
+
const sentence = SENTENCE_END.exec(text.slice(label.end, end));
|
|
142
|
+
const next = labels.find((other) => other.start >= label.end && stops.includes(other.kind))?.start ?? end;
|
|
143
|
+
return Math.min(end, next, sentence === null ? end : label.end + sentence.index);
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/** The sentence a scope's label is in, from its start to the end of the scope. */
|
|
147
|
+
const sentenceOf = (text: string, scope: Scope): string => {
|
|
148
|
+
const head = text.slice(lineStart(text, scope.label.start), scope.label.start).split(SENTENCE_SPLIT).at(-1) ?? "";
|
|
149
|
+
return `${head}${text.slice(scope.label.start, scope.end)}`;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const amountsBetween = (amounts: readonly PayAmount[], start: number, end: number): PayAmount[] =>
|
|
153
|
+
amounts.filter((amount) => amount.offset >= start && amount.end <= end);
|
|
154
|
+
|
|
155
|
+
const textBefore = (text: string, start: number): string =>
|
|
156
|
+
text
|
|
157
|
+
.slice(Math.max(0, start - MARKER_REACH), start)
|
|
158
|
+
.trimEnd()
|
|
159
|
+
.toLowerCase();
|
|
160
|
+
|
|
161
|
+
const textAfter = (text: string, end: number): string =>
|
|
162
|
+
text
|
|
163
|
+
.slice(end, end + MARKER_REACH)
|
|
164
|
+
.trimStart()
|
|
165
|
+
.toLowerCase();
|
|
166
|
+
|
|
167
|
+
/** Whether a marker stands right before the start (約450万円, about $72,000). */
|
|
168
|
+
const markedBefore = (text: string, start: number, words: AnnualPayWords): boolean => {
|
|
169
|
+
const before = textBefore(text, start);
|
|
170
|
+
return words.markers.some((marker) => marker.position === "before" && before.endsWith(marker.word.toLowerCase()));
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/** Whether a marker stands right after the end (400万円以上, $70,000 or more), or a range is left open there (400万円〜). */
|
|
174
|
+
const markedAfter = (text: string, end: number, words: AnnualPayWords): boolean => {
|
|
175
|
+
const after = textAfter(text, end);
|
|
176
|
+
const marked = words.markers.some((marker) => marker.position === "after" && after.startsWith(marker.word.toLowerCase()));
|
|
177
|
+
return marked || words.connectors.some((connector) => after.startsWith(connector.toLowerCase()));
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const isMarked = (text: string, span: Span, words: AnnualPayWords): boolean => markedBefore(text, span.start, words) || markedAfter(text, span.end, words);
|
|
181
|
+
|
|
182
|
+
/** Whether a count or an amount is the upper end of a range (2〜3ヶ月, 2 to 3 months). */
|
|
183
|
+
const endsRange = (text: string, start: number, words: AnnualPayWords): boolean => {
|
|
184
|
+
const before = text.slice(Math.max(0, start - MARKER_REACH), start).trimEnd();
|
|
185
|
+
return words.connectors.some((connector) => before.endsWith(connector) && RANGE_START.test(before.slice(0, -connector.length)));
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
/** The second end of a range that starts with this amount (25万円〜30万円), if one follows; a reversed range is none. */
|
|
189
|
+
const rangeEnd = (text: string, first: PayAmount, next: PayAmount | undefined, words: AnnualPayWords): PayAmount | undefined => {
|
|
190
|
+
if (next === undefined || next.currency !== first.currency || next.value < first.value) return undefined;
|
|
191
|
+
const joint = text.slice(first.end, next.offset).trim().toLowerCase();
|
|
192
|
+
return words.connectors.some((connector) => connector.toLowerCase() === joint) ? next : undefined;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
const decimalsOf = (written: string): number => /[..]([0-90-9]+)/u.exec(written)?.[1]?.length ?? 0;
|
|
196
|
+
|
|
197
|
+
/** The rounding an amount's digits allow: one of its last written place with a word of scale (420万 to a 万), else a thousand. */
|
|
198
|
+
export const roundingOf = (amount: PayAmount, written: string): number =>
|
|
199
|
+
amount.scale === undefined ? PLAIN_ROUNDING : amount.scale * 10 ** -decimalsOf(written);
|
|
200
|
+
|
|
201
|
+
const readingOf = (text: string, first: PayAmount, last: PayAmount): PayReading => ({
|
|
202
|
+
offset: first.offset,
|
|
203
|
+
ends: { low: first.value, high: last.value },
|
|
204
|
+
currency: first.currency,
|
|
205
|
+
written: text.slice(first.offset, last.end),
|
|
206
|
+
unit: Math.max(roundingOf(first, text.slice(first.offset, first.end)), roundingOf(last, text.slice(last.offset, last.end))),
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* The pay a label states up to the end: undefined when no amount is joined to the label, unclear when the amount is
|
|
211
|
+
* followed by another, marked (約, 以上), left open, or stated with overtime or allowances.
|
|
212
|
+
*/
|
|
213
|
+
const payAt = (context: Context, label: Label, end: number): PayReading | Unclear | undefined => {
|
|
214
|
+
const { text, words } = context;
|
|
215
|
+
const [first, second, ...rest] = amountsBetween(context.amounts, label.end, end);
|
|
216
|
+
if (first === undefined || !isPlainGap(text.slice(label.end, first.offset), words.links)) return undefined;
|
|
217
|
+
const last = rangeEnd(text, first, second, words) ?? first;
|
|
218
|
+
const others = rest.length > 0 || (second !== undefined && last !== second);
|
|
219
|
+
const marked = isMarked(text, { start: first.offset, end: last.end }, words);
|
|
220
|
+
if (others || marked || contains(text.slice(label.end, end), words.includes)) return UNCLEAR;
|
|
221
|
+
return readingOf(text, first, last);
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
const numberWordValue = (word: string, words: AnnualPayWords): number | undefined =>
|
|
225
|
+
words.numberWords.find((entry) => entry.word.toLowerCase() === word.toLowerCase())?.value;
|
|
226
|
+
|
|
227
|
+
const countOf = (written: string, words: AnnualPayWords): number => numberWordValue(written, words) ?? Number(written.normalize("NFKC"));
|
|
228
|
+
|
|
229
|
+
/** The months counts between start and end (3ヶ月, three months), each marked when it is approximate, open or a range's end. */
|
|
230
|
+
export const monthsIn = (text: string, start: number, end: number, words: AnnualPayWords): Count[] => {
|
|
231
|
+
const marker = alternation(words.months);
|
|
232
|
+
if (marker === undefined) return [];
|
|
233
|
+
const numberWords = alternation(words.numberWords.map((entry) => entry.word));
|
|
234
|
+
const count = numberWords === undefined ? DIGITS : `${DIGITS}|${numberWords}`;
|
|
235
|
+
const pattern = new RegExp(`(?<![0-90-9.,,.])(${count})\\s?(?:${marker})`, "giu");
|
|
236
|
+
return [...text.slice(start, end).matchAll(pattern)].map((match) => {
|
|
237
|
+
const span = { start: start + match.index, end: start + match.index + match[0].length };
|
|
238
|
+
return { ...span, count: countOf(match[1] ?? "", words), marked: endsRange(text, span.start, words) || isMarked(text, span, words) };
|
|
239
|
+
});
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
/** Where a word saying there is no bonus stands: right before the label (No bonus) or right after it (賞与:なし). */
|
|
243
|
+
const noneSpan = (text: string, label: Label, end: number, none: PositionedWord): Span | undefined => {
|
|
244
|
+
if (none.position === "before") {
|
|
245
|
+
const before = text.slice(lineStart(text, label.start), label.start).trimEnd();
|
|
246
|
+
const start = before.length - none.word.length;
|
|
247
|
+
const isWord = before.toLowerCase().endsWith(none.word.toLowerCase()) && !WORD_END.test(before.slice(0, start));
|
|
248
|
+
if (!isPlainGap(text.slice(label.end, end), [])) return undefined;
|
|
249
|
+
return isWord ? { start: lineStart(text, label.start) + start, end: label.end } : undefined;
|
|
250
|
+
}
|
|
251
|
+
const [at] = occurrences(text.slice(label.end, end), [none.word]);
|
|
252
|
+
return at !== undefined && isPlainGap(text.slice(label.end, label.end + at.start), []) ? { start: label.end + at.start, end: label.end + at.end } : undefined;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/** The words saying there is no bonus, as written (No bonus, なし). */
|
|
256
|
+
const noneAt = (text: string, label: Label, end: number, words: AnnualPayWords): string | undefined => {
|
|
257
|
+
const span = words.none.map((none) => noneSpan(text, label, end, none)).find((found) => found !== undefined);
|
|
258
|
+
return span === undefined ? undefined : text.slice(span.start, span.end);
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* The bonus a label states up to the end: undefined when it states no months and no "none", unclear when it is per
|
|
263
|
+
* payment (各), besides another (別途), given as an amount, approximate, a range, or two different counts.
|
|
264
|
+
*/
|
|
265
|
+
const bonusAt = (context: Context, label: Label, end: number): BonusReading | Unclear | undefined => {
|
|
266
|
+
const { text, words } = context;
|
|
267
|
+
const none = noneAt(text, label, end, words);
|
|
268
|
+
if (none !== undefined) return { months: 0, written: none };
|
|
269
|
+
const counts = monthsIn(text, label.end, end, words);
|
|
270
|
+
const [first] = counts;
|
|
271
|
+
if (first === undefined) return undefined;
|
|
272
|
+
const piece = text.slice(label.end, end);
|
|
273
|
+
const odd = contains(piece, [...words.each, ...words.extra]) || amountsBetween(context.amounts, label.end, end).length > 0;
|
|
274
|
+
const perPayment = contains(piece, words.times) && !contains(piece, words.totals);
|
|
275
|
+
if (odd || perPayment || counts.length > 1 || first.marked) return UNCLEAR;
|
|
276
|
+
return { months: first.count, written: text.slice(first.start, first.end) };
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
const isRead = <T extends object>(reading: T | Unclear): reading is T => !("unclear" in reading);
|
|
280
|
+
|
|
281
|
+
/** The one reading all agree on; undefined when there is none, one is unclear, or two differ. */
|
|
282
|
+
const agreed = <T extends object>(readings: readonly (T | Unclear)[], same: (left: T, right: T) => boolean): T | undefined => {
|
|
283
|
+
const [first] = readings;
|
|
284
|
+
if (first === undefined || !isRead(first)) return undefined;
|
|
285
|
+
return readings.every((reading) => isRead(reading) && same(reading, first)) ? first : undefined;
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
const samePay = (left: PayReading, right: PayReading): boolean =>
|
|
289
|
+
left.currency === right.currency && left.ends.low === right.ends.low && left.ends.high === right.ends.high;
|
|
290
|
+
|
|
291
|
+
const sameBonus = (left: BonusReading, right: BonusReading): boolean => left.months === right.months;
|
|
292
|
+
|
|
293
|
+
/** The monthly pays the labels state; a pay label (給与) counts only with a per-month word in its statement. */
|
|
294
|
+
const monthlyReadings = (context: Context, labels: readonly Label[]): (PayReading | Unclear)[] =>
|
|
295
|
+
labels.flatMap((label) => {
|
|
296
|
+
if (label.kind !== "monthly" && label.kind !== "pay") return [];
|
|
297
|
+
const end = statementEnd(context.text, label, context.labels, KINDS);
|
|
298
|
+
if (label.kind === "pay" && !contains(context.text.slice(label.end, end), context.words.perMonth)) return [];
|
|
299
|
+
const reading = payAt(context, label, end);
|
|
300
|
+
return reading === undefined ? [] : [reading];
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
const bonusReadings = (context: Context, labels: readonly Label[]): (BonusReading | Unclear)[] =>
|
|
304
|
+
labels.flatMap((label) => (label.kind === "bonus" ? (bonusAt(context, label, statementEnd(context.text, label, context.labels, BONUS_STOPS)) ?? []) : []));
|
|
305
|
+
|
|
306
|
+
/** Whether the annual pay is the monthly pay times the months, end for end, within the annual pay's rounding. */
|
|
307
|
+
export const isAnnualOf = (annual: Ends, unit: number, monthly: Ends, months: number): boolean =>
|
|
308
|
+
Math.abs(annual.low - monthly.low * months) < unit && Math.abs(annual.high - monthly.high * months) < unit;
|
|
309
|
+
|
|
310
|
+
const isRange = (ends: Ends): boolean => ends.low !== ends.high;
|
|
311
|
+
|
|
312
|
+
const inside = (labels: readonly Label[], scope: Scope): Label[] => labels.filter((label) => label.start > scope.label.start && label.start < scope.end);
|
|
313
|
+
|
|
314
|
+
const mismatchOf = (context: Context, scope: Scope, posting: Posting): StructureIssue[] => {
|
|
315
|
+
const annual = payAt(context, scope.label, statementEnd(context.text, scope.label, context.labels, KINDS));
|
|
316
|
+
if (annual === undefined || !isRead(annual)) return [];
|
|
317
|
+
const own = inside(context.labels, scope);
|
|
318
|
+
const ownMonthly = monthlyReadings(context, own);
|
|
319
|
+
const ownBonus = bonusReadings(context, own);
|
|
320
|
+
const monthly = ownMonthly.length > 0 ? agreed(ownMonthly, samePay) : posting.monthly;
|
|
321
|
+
const bonus = ownBonus.length > 0 ? agreed(ownBonus, sameBonus) : posting.bonus;
|
|
322
|
+
if (monthly === undefined || bonus === undefined || monthly.currency !== annual.currency) return [];
|
|
323
|
+
if (isRange(annual.ends) !== isRange(monthly.ends)) return [];
|
|
324
|
+
if (isAnnualOf(annual.ends, annual.unit, monthly.ends, MONTHS_A_YEAR + bonus.months)) return [];
|
|
325
|
+
const values = { annual: annual.written, monthly: monthly.written, bonus: bonus.written, months: MONTHS_A_YEAR + bonus.months };
|
|
326
|
+
return [{ offset: annual.offset, values }];
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
/** Every annual pay that is not the posting's monthly pay times twelve plus its bonus months. */
|
|
330
|
+
export const annualPayMismatches = (text: string, amounts: readonly PayAmount[], words: AnnualPayWords): StructureIssue[] => {
|
|
331
|
+
const labels = labelsIn(text, words);
|
|
332
|
+
const scopes = labels.filter((label) => ANNUAL.includes(label.kind)).map((label) => ({ label, end: statementEnd(text, label, labels, ANNUAL) }));
|
|
333
|
+
const salary = scopes.some((scope) => scope.label.kind === "salary");
|
|
334
|
+
if (salary || scopes.length === 0 || scopes.some((scope) => contains(sentenceOf(text, scope), words.includes))) return [];
|
|
335
|
+
const context = { text, labels, amounts, words };
|
|
336
|
+
const outside = labels.filter((label) => !scopes.some((scope) => label.start >= scope.label.start && label.start < scope.end));
|
|
337
|
+
const posting = { monthly: agreed(monthlyReadings(context, outside), samePay), bonus: agreed(bonusReadings(context, outside), sameBonus) };
|
|
338
|
+
return scopes.flatMap((scope) => mismatchOf(context, scope, posting));
|
|
339
|
+
};
|