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,128 @@
|
|
|
1
|
+
// capacity-runtime-mismatch: a stated runtime longer than the battery capacity divided by the consumption (derived/battery-runtime.ts).
|
|
2
|
+
// Values are read from table rows (item name, value) and from "item name: value" lines. One key-value table and the labelled
|
|
3
|
+
// lines of one section are one device; a wider table is one device per column.
|
|
4
|
+
import type { Detector, Finding, ProseDocument } from "../plugin.ts";
|
|
5
|
+
import { cellsOf, tablesOf, type Cell } from "../facts/table-facts.ts";
|
|
6
|
+
import { linesOf, type Line } from "../structure/lines.ts";
|
|
7
|
+
import {
|
|
8
|
+
capacityRuntimeMismatches,
|
|
9
|
+
isPeakHeading,
|
|
10
|
+
labelOf,
|
|
11
|
+
splitCondition,
|
|
12
|
+
valueOf,
|
|
13
|
+
type BatteryWords,
|
|
14
|
+
type ElectricUnit,
|
|
15
|
+
type Entry,
|
|
16
|
+
type Family,
|
|
17
|
+
type Marker,
|
|
18
|
+
} from "../derived/battery-runtime.ts";
|
|
19
|
+
import { quoteAt } from "./structure-tree.ts";
|
|
20
|
+
|
|
21
|
+
const FAMILIES: readonly Family[] = ["charge", "current", "energy", "power"];
|
|
22
|
+
const isFamily = (group: string | undefined): group is Family => FAMILIES.some((family) => family === group);
|
|
23
|
+
|
|
24
|
+
type Lexicons = ProseDocument["lexicons"];
|
|
25
|
+
|
|
26
|
+
const markersOf = (lexicons: Lexicons, id: string, group?: string): Marker[] =>
|
|
27
|
+
(lexicons[id] ?? [])
|
|
28
|
+
.filter((entry) => group === undefined || entry.group === group)
|
|
29
|
+
.map((entry) => ({ pattern: entry.pattern, position: entry.position ?? "before" }));
|
|
30
|
+
|
|
31
|
+
export const batteryWordsOf = (lexicons: Lexicons): BatteryWords => {
|
|
32
|
+
const labels = (lexicons["battery-label"] ?? []).map((entry) => ({ pattern: entry.pattern, group: entry.group ?? "" }));
|
|
33
|
+
const bounds = markersOf(lexicons, "battery-label", "bound");
|
|
34
|
+
return {
|
|
35
|
+
electric: (lexicons["battery-unit"] ?? []).flatMap((entry): ElectricUnit[] =>
|
|
36
|
+
isFamily(entry.group) ? [{ pattern: entry.pattern, weight: entry.weight ?? 1, family: entry.group }] : [],
|
|
37
|
+
),
|
|
38
|
+
time: (lexicons["unit-time"] ?? []).map((entry) => ({ pattern: entry.pattern, weight: entry.weight ?? 1 })),
|
|
39
|
+
approximate: markersOf(lexicons, "approximate-marker").filter((marker) => !bounds.some((bound) => bound.pattern === marker.pattern)),
|
|
40
|
+
bounds,
|
|
41
|
+
connectors: (lexicons["range-connector"] ?? []).map((entry) => entry.pattern),
|
|
42
|
+
labels,
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const EMPHASIS = /[*`]/gu;
|
|
47
|
+
const plain = (text: string): string => text.replace(EMPHASIS, "");
|
|
48
|
+
|
|
49
|
+
type Slot = { readonly key: string; readonly entry: Entry };
|
|
50
|
+
|
|
51
|
+
const entryOf = (label: string, value: Cell, words: BatteryWords, columnPeak: boolean): Entry | undefined => {
|
|
52
|
+
const named = labelOf(plain(label), words);
|
|
53
|
+
const text = plain(value.text).trim();
|
|
54
|
+
const read = named === undefined ? undefined : valueOf(text, named.role, words);
|
|
55
|
+
if (named === undefined || read === undefined) return undefined;
|
|
56
|
+
const lead = value.text.length - value.text.trimStart().length;
|
|
57
|
+
return {
|
|
58
|
+
...named,
|
|
59
|
+
peak: named.peak || read.peak || columnPeak,
|
|
60
|
+
condition: named.condition === "" ? splitCondition(text).condition : named.condition,
|
|
61
|
+
reading: read.reading,
|
|
62
|
+
start: value.start + lead,
|
|
63
|
+
text,
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const sectionAt = (doc: ProseDocument, offset: number): number => doc.sections.findLastIndex((section) => section.span.start <= offset);
|
|
68
|
+
|
|
69
|
+
const TWO_COLUMNS = 2;
|
|
70
|
+
|
|
71
|
+
const tableSlots = (doc: ProseDocument, words: BatteryWords): Slot[] =>
|
|
72
|
+
tablesOf(linesOf(doc.source)).flatMap((table) => {
|
|
73
|
+
const headings = cellsOf(table.header);
|
|
74
|
+
const wide = headings.length > TWO_COLUMNS;
|
|
75
|
+
return table.rows.flatMap((row) => {
|
|
76
|
+
const [label, ...values] = cellsOf(row);
|
|
77
|
+
if (label === undefined) return [];
|
|
78
|
+
return values.flatMap((value, index): Slot[] => {
|
|
79
|
+
const column = index + 1;
|
|
80
|
+
const peak = wide && isPeakHeading(plain(headings[column]?.text ?? ""), words);
|
|
81
|
+
const entry = entryOf(label.text, value, words, peak);
|
|
82
|
+
const key = wide ? `table ${table.header.start} ${column}` : `section ${sectionAt(doc, row.start)}`;
|
|
83
|
+
return entry === undefined || (!wide && column > 1) ? [] : [{ key, entry }];
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const LIST_MARKER = /^\s*(?:[-*+]|\d+[.)])\s+/u;
|
|
89
|
+
const COLON = /[::]/u;
|
|
90
|
+
const MAX_LABEL = 80;
|
|
91
|
+
|
|
92
|
+
/** "Battery life: up to 10 hours", "- 消費電流:500 mA". */
|
|
93
|
+
const lineSlot = (doc: ProseDocument, line: Line, words: BatteryWords): Slot[] => {
|
|
94
|
+
const body = line.text.slice(LIST_MARKER.exec(line.text)?.[0].length ?? 0);
|
|
95
|
+
const colon = COLON.exec(body)?.index;
|
|
96
|
+
if (colon === undefined) return [];
|
|
97
|
+
const label = body.slice(0, colon).trim();
|
|
98
|
+
const value = body.slice(colon + 1).trim();
|
|
99
|
+
if (label === "" || label.length > MAX_LABEL || value === "") return [];
|
|
100
|
+
const start = line.start + line.text.lastIndexOf(value);
|
|
101
|
+
const entry = entryOf(label, { start, end: start + value.length, text: value }, words, false);
|
|
102
|
+
return entry === undefined ? [] : [{ key: `section ${sectionAt(doc, line.start)}`, entry }];
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const HOUR_DECIMALS = 100;
|
|
106
|
+
|
|
107
|
+
export const capacityRuntime: Detector = (doc): Finding[] => {
|
|
108
|
+
const words = batteryWordsOf(doc.lexicons);
|
|
109
|
+
const lines = linesOf(doc.prose ?? doc.source).filter((line) => !line.text.includes("|"));
|
|
110
|
+
const slots = [...tableSlots(doc, words), ...lines.flatMap((line) => lineSlot(doc, line, words))];
|
|
111
|
+
const keys = [...new Set(slots.map((slot) => slot.key))];
|
|
112
|
+
return keys
|
|
113
|
+
.flatMap((key) => capacityRuntimeMismatches(slots.filter((slot) => slot.key === key).map((slot) => slot.entry)))
|
|
114
|
+
.map((mismatch) => ({
|
|
115
|
+
rule: "capacity-runtime-mismatch",
|
|
116
|
+
severity: "warning",
|
|
117
|
+
line: 0,
|
|
118
|
+
column: 0,
|
|
119
|
+
quote: quoteAt(doc.source, mismatch.runtime.start),
|
|
120
|
+
values: {
|
|
121
|
+
capacity: mismatch.capacity.text,
|
|
122
|
+
consumption: mismatch.consumption.text,
|
|
123
|
+
runtime: mismatch.runtime.text,
|
|
124
|
+
expected: Math.round(mismatch.idealHours * HOUR_DECIMALS) / HOUR_DECIMALS,
|
|
125
|
+
offset: mismatch.runtime.start,
|
|
126
|
+
},
|
|
127
|
+
}));
|
|
128
|
+
};
|
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
// tree's quantities, the numbers counted with a word ("1,200 companies"), the calendar years, and the lexicons change-direction,
|
|
3
3
|
// change-base, change-target, change-break, percent-unit and amount-multiplier.
|
|
4
4
|
import type { Detector, Finding, LexiconEntry, ProseDocument, Span, StructureNode, Token } from "../plugin.ts";
|
|
5
|
-
import { inDocumentOrder } from "../structure/issues.ts";
|
|
5
|
+
import { inDocumentOrder, type StructureIssue } from "../structure/issues.ts";
|
|
6
6
|
import { startsOtherSubject } from "../structure/subject-change.ts";
|
|
7
7
|
import { changeRateMismatches, type BaseMark, type Break, type Direction, type Figure, type Period, type Rate } from "../structure/change-rate.ts";
|
|
8
8
|
import { escapeRegExp } from "../orthography.ts";
|
|
9
9
|
import { quoteAt } from "./structure-tree.ts";
|
|
10
|
+
import { tableRateMismatches, type ChangeTable, type ColumnRole, type ColumnWord } from "../structure/change-rate-table.ts";
|
|
11
|
+
import { cellsOf, tablesOf } from "../facts/table-facts.ts";
|
|
12
|
+
import { linesOf } from "../structure/lines.ts";
|
|
13
|
+
import { proseAndTablesOf } from "../table-text.ts";
|
|
10
14
|
|
|
11
15
|
const patternsOf = (doc: ProseDocument, id: string): string[] => (doc.lexicons[id] ?? []).map((entry) => entry.pattern);
|
|
12
16
|
|
|
@@ -137,7 +141,23 @@ const marksOf = (doc: ProseDocument, lexicon: string): BaseMark[] =>
|
|
|
137
141
|
entry.position === undefined ? [] : spansOf(doc.source, entry.pattern).map((span) => ({ ...span, position: entry.position ?? "before" })),
|
|
138
142
|
);
|
|
139
143
|
|
|
140
|
-
|
|
144
|
+
const ROLES: readonly string[] = ["base", "current", "rate", "change"] satisfies readonly ColumnRole[];
|
|
145
|
+
const isRole = (group: string | undefined): group is ColumnRole => group !== undefined && ROLES.includes(group);
|
|
146
|
+
|
|
147
|
+
/** Lexicon change-column: the heading words that say which column holds the earlier value, the later one and the rate. */
|
|
148
|
+
const columnWordsOf = (doc: ProseDocument): ColumnWord[] =>
|
|
149
|
+
(doc.lexicons["change-column"] ?? []).flatMap((entry) => (isRole(entry.group) ? [{ pattern: entry.pattern, role: entry.group }] : []));
|
|
150
|
+
|
|
151
|
+
/** The document's Markdown tables (outside code and quotes): the heading cells and the body rows' cells. */
|
|
152
|
+
const changeTablesOf = (doc: ProseDocument): ChangeTable[] =>
|
|
153
|
+
tablesOf(linesOf(proseAndTablesOf(doc))).map((table) => ({ header: cellsOf(table.header), rows: table.rows.map(cellsOf) }));
|
|
154
|
+
|
|
155
|
+
const tableIssues = (doc: ProseDocument): StructureIssue[] => {
|
|
156
|
+
const words = columnWordsOf(doc);
|
|
157
|
+
return words.length === 0 ? [] : tableRateMismatches(changeTablesOf(doc), words);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const sentenceIssues = (doc: ProseDocument): StructureIssue[] => {
|
|
141
161
|
if (doc.structure === undefined) return [];
|
|
142
162
|
const nodes = quantityNodes(doc.structure);
|
|
143
163
|
const units = patternsOf(doc, "percent-unit");
|
|
@@ -155,7 +175,11 @@ export const changeRate: Detector = (doc): Finding[] => {
|
|
|
155
175
|
breaks: breaksOf(doc),
|
|
156
176
|
source: doc.source,
|
|
157
177
|
};
|
|
158
|
-
return changeRateMismatches(text)
|
|
178
|
+
return changeRateMismatches(text);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
export const changeRate: Detector = (doc): Finding[] =>
|
|
182
|
+
[...sentenceIssues(doc), ...tableIssues(doc)].map((issue) => ({
|
|
159
183
|
rule: "change-rate-mismatch",
|
|
160
184
|
severity: "warning",
|
|
161
185
|
line: 0,
|
|
@@ -163,4 +187,3 @@ export const changeRate: Detector = (doc): Finding[] => {
|
|
|
163
187
|
quote: quoteAt(doc.source, issue.offset),
|
|
164
188
|
values: { ...issue.values, offset: issue.offset },
|
|
165
189
|
}));
|
|
166
|
-
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// closing-balance-mismatch: the reading half. Reads tables and each section's label-and-amount lines the way
|
|
2
|
+
// net-amount-mismatch does, with the words of lexicon closing-balance-label, and leaves the deciding to
|
|
3
|
+
// structure/closing-balance.ts.
|
|
4
|
+
import type { Detector, Finding, ProseDocument } from "../plugin.ts";
|
|
5
|
+
import { linesOf, type Line } from "../structure/lines.ts";
|
|
6
|
+
import { tablesOf } from "../facts/table-facts.ts";
|
|
7
|
+
import { proseAndTablesOf } from "../table-text.ts";
|
|
8
|
+
import { quoteAt } from "./structure-tree.ts";
|
|
9
|
+
import { labelledLineOf, patternsOf, plainCellsOf, sectionsOf } from "./net-amount-mismatch.ts";
|
|
10
|
+
import { BALANCE_ROLES, sectionClosingMismatch, tableClosingMismatches, type BalanceWords } from "../structure/closing-balance.ts";
|
|
11
|
+
import type { NetIssue } from "../structure/net-amount.ts";
|
|
12
|
+
|
|
13
|
+
const RULE = "closing-balance-mismatch";
|
|
14
|
+
const LEXICON = "closing-balance-label";
|
|
15
|
+
|
|
16
|
+
const wordsOf = (doc: ProseDocument): BalanceWords => ({
|
|
17
|
+
labels: {
|
|
18
|
+
opening: patternsOf(doc, LEXICON, "opening"),
|
|
19
|
+
inflow: patternsOf(doc, LEXICON, "inflow"),
|
|
20
|
+
outflow: patternsOf(doc, LEXICON, "outflow"),
|
|
21
|
+
closing: patternsOf(doc, LEXICON, "closing"),
|
|
22
|
+
},
|
|
23
|
+
magnitudes: patternsOf(doc, "amount-multiplier"),
|
|
24
|
+
percentUnits: patternsOf(doc, "percent-unit"),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const tableIssues = (lines: readonly Line[], words: BalanceWords): NetIssue[] =>
|
|
28
|
+
tablesOf(lines).flatMap((table) => tableClosingMismatches(plainCellsOf(table.header), table.rows.map(plainCellsOf), words));
|
|
29
|
+
|
|
30
|
+
const sectionIssues = (lines: readonly Line[], source: string, words: BalanceWords): NetIssue[] =>
|
|
31
|
+
sectionsOf(lines, linesOf(source)).flatMap((section) => {
|
|
32
|
+
const issue = sectionClosingMismatch(section.filter((line) => !line.text.includes("|")).flatMap(labelledLineOf), words);
|
|
33
|
+
return issue === undefined ? [] : [issue];
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export const closingBalanceMismatch: Detector = (doc): Finding[] => {
|
|
37
|
+
const words = wordsOf(doc);
|
|
38
|
+
if (BALANCE_ROLES.some((role) => words.labels[role].length === 0)) return [];
|
|
39
|
+
const lines = linesOf(proseAndTablesOf(doc));
|
|
40
|
+
const issues = [...tableIssues(lines, words), ...sectionIssues(lines, doc.source, words)];
|
|
41
|
+
return issues
|
|
42
|
+
.filter((issue, index) => issues.findIndex((other) => other.offset === issue.offset) === index)
|
|
43
|
+
.toSorted((left, right) => left.offset - right.offset)
|
|
44
|
+
.map((issue) => ({
|
|
45
|
+
rule: RULE,
|
|
46
|
+
severity: "warning",
|
|
47
|
+
line: 0,
|
|
48
|
+
column: 0,
|
|
49
|
+
quote: quoteAt(doc.source, issue.offset),
|
|
50
|
+
values: { ...issue.values, offset: issue.offset },
|
|
51
|
+
}));
|
|
52
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// contact-variant: one email address or postal address written two ways in one document (contacts/emails.ts,
|
|
2
|
+
// contacts/addresses.ts). The address labels come from the language's address-label lexicon; a two-column table row named
|
|
3
|
+
// by one is read as that label's line for addresses (contacts/table-rows.ts); emails in tables stay unread.
|
|
4
|
+
import { addressVariants } from "../contacts/addresses.ts";
|
|
5
|
+
import { emailVariants } from "../contacts/emails.ts";
|
|
6
|
+
import { proseWithLabelledRows } from "../contacts/table-rows.ts";
|
|
7
|
+
import { proseAndTablesOf } from "../table-text.ts";
|
|
8
|
+
import type { Variant, Writing } from "../contacts/variants.ts";
|
|
9
|
+
import { quoteAt } from "./structure-tree.ts";
|
|
10
|
+
import type { Detector, Finding } from "../plugin.ts";
|
|
11
|
+
|
|
12
|
+
const findingOf = (source: string, { writing, other }: Variant<Writing>, variant?: string): Finding => ({
|
|
13
|
+
rule: "",
|
|
14
|
+
severity: "info",
|
|
15
|
+
line: 0,
|
|
16
|
+
column: 0,
|
|
17
|
+
quote: quoteAt(source, writing.offset),
|
|
18
|
+
values: { written: writing.written, other: other.written, offset: writing.offset },
|
|
19
|
+
...(variant === undefined ? {} : { variant }),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const contactVariant: Detector = (doc, options): Finding[] => {
|
|
23
|
+
const labels = options.lexicon ?? [];
|
|
24
|
+
const text = doc.prose ?? doc.source;
|
|
25
|
+
const emails = emailVariants(text).map((found) => findingOf(doc.source, found));
|
|
26
|
+
const addresses = addressVariants(proseWithLabelledRows(text, proseAndTablesOf(doc), labels), labels).map(({ variant, found }) =>
|
|
27
|
+
findingOf(doc.source, found, variant),
|
|
28
|
+
);
|
|
29
|
+
return [...emails, ...addresses].toSorted((a, b) => Number(a.values?.["offset"]) - Number(b.values?.["offset"]));
|
|
30
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// A stated capacity smaller than a stated number registered, invited or attending (count-over-capacity). The words come
|
|
2
|
+
// from the language package: capacity-label, headcount-label, headcount-unit and capacity-exception.
|
|
3
|
+
import { countsOverCapacity, type CapacityWords, type CountMark } from "../structure/capacity-count.ts";
|
|
4
|
+
import { proseAndTablesOf } from "../table-text.ts";
|
|
5
|
+
import { quoteAt } from "./structure-tree.ts";
|
|
6
|
+
import type { Detector, Finding, ProseDocument } from "../plugin.ts";
|
|
7
|
+
|
|
8
|
+
const marksOf = (doc: ProseDocument, lexicon: string): CountMark[] =>
|
|
9
|
+
(doc.lexicons[lexicon] ?? []).map((entry) => ({ pattern: entry.pattern, position: entry.position, group: entry.group }));
|
|
10
|
+
|
|
11
|
+
const exceptionsOf = (doc: ProseDocument, group: string): string[] =>
|
|
12
|
+
(doc.lexicons["capacity-exception"] ?? []).filter((entry) => entry.group === group).map((entry) => entry.pattern);
|
|
13
|
+
|
|
14
|
+
const capacityWords = (doc: ProseDocument): CapacityWords => ({
|
|
15
|
+
capacities: marksOf(doc, "capacity-label"),
|
|
16
|
+
counts: marksOf(doc, "headcount-label"),
|
|
17
|
+
units: marksOf(doc, "headcount-unit"),
|
|
18
|
+
overflows: exceptionsOf(doc, "overflow"),
|
|
19
|
+
perSession: exceptionsOf(doc, "per-session"),
|
|
20
|
+
otherOccasions: exceptionsOf(doc, "other-occasion"),
|
|
21
|
+
negations: exceptionsOf(doc, "negation"),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
/** The prose with its tables put back, so code is not read; offsets are the source's. */
|
|
25
|
+
export const countOverCapacity: Detector = (doc): Finding[] =>
|
|
26
|
+
countsOverCapacity(
|
|
27
|
+
proseAndTablesOf(doc),
|
|
28
|
+
capacityWords(doc),
|
|
29
|
+
doc.sections.map((section) => section.span),
|
|
30
|
+
).map((issue) => ({
|
|
31
|
+
rule: "count-over-capacity",
|
|
32
|
+
severity: "warning",
|
|
33
|
+
line: 0,
|
|
34
|
+
column: 0,
|
|
35
|
+
quote: quoteAt(doc.source, issue.offset),
|
|
36
|
+
values: { ...issue.values, offset: issue.offset },
|
|
37
|
+
}));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// cumulative-below-current: the reading half. Reads the document's Markdown tables and the lexicon cumulative-table, and
|
|
2
|
+
// leaves the deciding to structure/cumulative-below-current.ts.
|
|
3
|
+
import type { Detector, Finding, ProseDocument } from "../plugin.ts";
|
|
4
|
+
import { quoteAt } from "./structure-tree.ts";
|
|
5
|
+
import { cellsOf, tablesOf } from "../facts/table-facts.ts";
|
|
6
|
+
import { linesOf } from "../structure/lines.ts";
|
|
7
|
+
import { proseAndTablesOf } from "../table-text.ts";
|
|
8
|
+
import { cumulativeBelowCurrent, type CumulativeRole, type CumulativeWord } from "../structure/cumulative-below-current.ts";
|
|
9
|
+
|
|
10
|
+
const RULE = "cumulative-below-current";
|
|
11
|
+
const ROLES: readonly string[] = ["current", "cumulative", "prior", "level"] satisfies readonly CumulativeRole[];
|
|
12
|
+
const isRole = (group: string | undefined): group is CumulativeRole => group !== undefined && ROLES.includes(group);
|
|
13
|
+
|
|
14
|
+
/** Lexicon cumulative-table: the heading words of the this-period and cumulative columns, and the row labels of levels. */
|
|
15
|
+
const wordsOf = (doc: ProseDocument): CumulativeWord[] =>
|
|
16
|
+
(doc.lexicons["cumulative-table"] ?? []).flatMap((entry) => (isRole(entry.group) ? [{ pattern: entry.pattern, role: entry.group }] : []));
|
|
17
|
+
|
|
18
|
+
export const cumulativeBelow: Detector = (doc): Finding[] => {
|
|
19
|
+
const words = wordsOf(doc);
|
|
20
|
+
if (words.length === 0) return [];
|
|
21
|
+
const tables = tablesOf(linesOf(proseAndTablesOf(doc))).map((table) => ({ header: cellsOf(table.header), rows: table.rows.map(cellsOf) }));
|
|
22
|
+
return cumulativeBelowCurrent(tables, words).map((issue) => ({
|
|
23
|
+
rule: RULE,
|
|
24
|
+
severity: "warning",
|
|
25
|
+
line: 0,
|
|
26
|
+
column: 0,
|
|
27
|
+
quote: quoteAt(doc.source, issue.offset),
|
|
28
|
+
values: { ...issue.values, offset: issue.offset },
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// currency-column-mix: the reading half. The amounts and their currencies are currency-notation's, read with
|
|
2
|
+
// amount-multiplier's words of scale; the heading words of a column of currencies or exchange rates are currency-column's.
|
|
3
|
+
// The deciding is structure/currency-column.ts.
|
|
4
|
+
import type { Detector, Finding, ProseDocument } from "../plugin.ts";
|
|
5
|
+
import { quoteAt } from "./structure-tree.ts";
|
|
6
|
+
import { cellsOf, tablesOf } from "../facts/table-facts.ts";
|
|
7
|
+
import { linesOf } from "../structure/lines.ts";
|
|
8
|
+
import { proseAndTablesOf } from "../table-text.ts";
|
|
9
|
+
import { currencyColumnMix, type CurrencyColumnWords } from "../structure/currency-column.ts";
|
|
10
|
+
import { amountsIn, formsOf } from "./currency-notation.ts";
|
|
11
|
+
|
|
12
|
+
const RULE = "currency-column-mix";
|
|
13
|
+
|
|
14
|
+
const wordsOf = (doc: ProseDocument): CurrencyColumnWords => {
|
|
15
|
+
const forms = formsOf(doc);
|
|
16
|
+
const multipliers = (doc.lexicons["amount-multiplier"] ?? []).map((entry) => entry.pattern);
|
|
17
|
+
return {
|
|
18
|
+
currencies: forms.map((form) => ({ pattern: form.pattern, currency: form.currency })),
|
|
19
|
+
columns: (doc.lexicons["currency-column"] ?? []).map((entry) => entry.pattern),
|
|
20
|
+
amountCurrencies: (text) => amountsIn(text, forms, multipliers).map((amount) => amount.currency),
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const currencyColumnMixDetector: Detector = (doc): Finding[] => {
|
|
25
|
+
const words = wordsOf(doc);
|
|
26
|
+
if (words.currencies.length === 0) return [];
|
|
27
|
+
const text = proseAndTablesOf(doc);
|
|
28
|
+
const tables = tablesOf(linesOf(text)).map((table) => ({ header: cellsOf(table.header), rows: table.rows.map(cellsOf) }));
|
|
29
|
+
return currencyColumnMix(tables, words).map((issue) => ({
|
|
30
|
+
rule: RULE,
|
|
31
|
+
severity: "warning",
|
|
32
|
+
line: 0,
|
|
33
|
+
column: 0,
|
|
34
|
+
quote: quoteAt(text, issue.offset),
|
|
35
|
+
values: { ...issue.values, offset: issue.offset },
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// A yearless date that is no date of one year: a day that comes round every year (毎年4月1日, 年末年始(12月29日~1月3日),
|
|
2
|
+
// "each December 31") or a date in a worked example (例えば…4月1日, "e.g. March 31"). There is no year to write. Pure.
|
|
3
|
+
|
|
4
|
+
/** The words that make a yearless date any year's: a recurring day or a worked example. Their `group` says where they reach. */
|
|
5
|
+
export const ANY_YEAR_MARKER_LEXICON = "any-year-marker";
|
|
6
|
+
|
|
7
|
+
/** The words that join the two ends of a period (から, ~, "to"): 「4月1日から翌年3月31日まで」 is every year's. */
|
|
8
|
+
export const YEAR_SPAN_JOINER_LEXICON = "year-span-joiner";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Where a marker reaches. `sentence`: earlier in the date's sentence, not closed off by a bracket (例えば…4月1日), or the
|
|
12
|
+
* line a list of dates hangs from ("for example:"). `adjacent`: just before the date ("each December 31"). `label`: before
|
|
13
|
+
* the bracket the date is in (年末年始閉庁日(12月29日~1月3日)).
|
|
14
|
+
*/
|
|
15
|
+
export type MarkerReach = "sentence" | "adjacent" | "label";
|
|
16
|
+
|
|
17
|
+
export type AnyYearMarker = { readonly word: string; readonly reach: MarkerReach };
|
|
18
|
+
|
|
19
|
+
/** The span of a yearless date in the source. */
|
|
20
|
+
export type DateSpan = { readonly offset: number; readonly end: number };
|
|
21
|
+
|
|
22
|
+
/** How far apart the two ends of a period may stand: the joiner and a year word (「から翌年」, " to "). */
|
|
23
|
+
const SPAN_GAP_REACH = 12;
|
|
24
|
+
|
|
25
|
+
/** How many lines above a list item its introducing line is looked for: a longer list is read as no example. */
|
|
26
|
+
const LIST_REACH = 64;
|
|
27
|
+
|
|
28
|
+
/** The end of a sentence: 。, a line break, or a full stop before a capital or a digit ("Mar 3. The", "so. 10 November"). */
|
|
29
|
+
const SENTENCE_END = /[。!?\n]|[.!?]["'”’)\]]*\s+(?=[A-Z0-9])/u;
|
|
30
|
+
const OPENERS = "((「『[【〔";
|
|
31
|
+
const CLOSERS = "))」』]】〕";
|
|
32
|
+
/** What ends a bracket's label, going back from the bracket: a comma, a full stop, another bracket. */
|
|
33
|
+
const LABEL_END = /[、,,。.\n((「『[【〔))」』\]】〕]/u;
|
|
34
|
+
const LIST_ITEM = /^\s*(?:[-*+・]|\d+[.).])\s/u;
|
|
35
|
+
const LETTER = /\p{L}/u;
|
|
36
|
+
const LATIN_START = /^[A-Za-z]/u;
|
|
37
|
+
const LATIN_END = /[A-Za-z]$/u;
|
|
38
|
+
const COLON_END = /[::]$/u;
|
|
39
|
+
|
|
40
|
+
/** Lower case for Latin letters only, so every offset in the text stays where it was ("For example" finds "for example"). */
|
|
41
|
+
const latinLower = (text: string): string => text.replace(/[A-Z]/gu, (char) => char.toLowerCase());
|
|
42
|
+
|
|
43
|
+
const lineStart = (source: string, offset: number): number => source.lastIndexOf("\n", offset - 1) + 1;
|
|
44
|
+
|
|
45
|
+
/** A word of letters ("each") starts a word; 「例えば」 may follow anything. */
|
|
46
|
+
const startsWord = (text: string, index: number, word: string): boolean => !LATIN_START.test(word) || index === 0 || !LETTER.test(text.charAt(index - 1));
|
|
47
|
+
|
|
48
|
+
/** "to" in "today": a word of letters that runs on past its end. */
|
|
49
|
+
const runsOn = (text: string, word: string): boolean => LATIN_END.test(word) && LETTER.test(text.charAt(word.length));
|
|
50
|
+
|
|
51
|
+
const lastWordAt = (text: string, word: string): number => {
|
|
52
|
+
const found = text.lastIndexOf(word);
|
|
53
|
+
if (found === -1 || (startsWord(text, found, word) && !runsOn(text.slice(found), word))) return found;
|
|
54
|
+
return lastWordAt(text.slice(0, found), word);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const depthStep = (char: string): number => (OPENERS.includes(char) ? 1 : 0) - (CLOSERS.includes(char) ? 1 : 0);
|
|
58
|
+
|
|
59
|
+
/** A bracket closes in the text without opening in it: what came before it is cut off from what comes after. */
|
|
60
|
+
const closesBracket = (text: string): boolean => [...text].reduce((depth, char) => (depth < 0 ? depth : depth + depthStep(char)), 0) < 0;
|
|
61
|
+
|
|
62
|
+
/** `dateStart` is the date's first character: a full stop just before "10 November" ends a sentence only by what follows it. */
|
|
63
|
+
const inSentence = (before: string, dateStart: string, word: string): boolean => {
|
|
64
|
+
const found = lastWordAt(latinLower(before), word);
|
|
65
|
+
if (found === -1) return false;
|
|
66
|
+
const between = before.slice(found + word.length);
|
|
67
|
+
return !SENTENCE_END.test(`${between}${dateStart}`) && !closesBracket(between);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const isAdjacent = (before: string, word: string): boolean => {
|
|
71
|
+
const trimmed = before.trimEnd();
|
|
72
|
+
return trimmed.endsWith(word) && startsWord(trimmed, trimmed.length - word.length, word);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** Where the bracket still open at the end of the text opens. */
|
|
76
|
+
const openBracketAt = (text: string): number | undefined =>
|
|
77
|
+
[...text]
|
|
78
|
+
.reduce<number[]>((open, char, index) => {
|
|
79
|
+
const step = depthStep(char);
|
|
80
|
+
if (step > 0) return [...open, index];
|
|
81
|
+
return step < 0 ? open.slice(0, -1) : open;
|
|
82
|
+
}, [])
|
|
83
|
+
.at(-1);
|
|
84
|
+
|
|
85
|
+
/** The text from the bracket the date is in back to the end of the clause before it: 「年末年始閉庁日」 of 「年末年始閉庁日(12月29日」. */
|
|
86
|
+
const labelOf = (before: string): string | undefined => {
|
|
87
|
+
const opener = openBracketAt(before);
|
|
88
|
+
if (opener === undefined) return undefined;
|
|
89
|
+
const head = [...before].slice(0, opener);
|
|
90
|
+
return head.slice(head.findLastIndex((char) => LABEL_END.test(char)) + 1).join("");
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/** The line a list's run of items hangs from: back over the run and the blank lines before it. */
|
|
94
|
+
const introducingLine = (lines: readonly string[]): string | undefined => {
|
|
95
|
+
const above = lines.slice(0, lines.findLastIndex((line) => !LIST_ITEM.test(line)) + 1);
|
|
96
|
+
return above.findLast((line) => line.trim() !== "");
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** Where the line `lines` lines above the one at `offset` starts (or the text, if it starts sooner). */
|
|
100
|
+
const startLinesBack = (source: string, offset: number, lines: number): number => {
|
|
101
|
+
const previous = source.lastIndexOf("\n", offset - 1);
|
|
102
|
+
return previous === -1 || lines === 0 ? previous + 1 : startLinesBack(source, previous, lines - 1);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** The line a list item's list hangs from ("we use 'to' in date ranges – for example:"), looked for within LIST_REACH lines. */
|
|
106
|
+
const introOf = (source: string, before: string, offset: number): string | undefined =>
|
|
107
|
+
LIST_ITEM.test(before) ? introducingLine(source.slice(startLinesBack(source, offset, LIST_REACH), offset).split("\n"))?.trimEnd() : undefined;
|
|
108
|
+
|
|
109
|
+
/** The line ends with the marker, before or after its colon: 「例:」 and "for example:" alike. */
|
|
110
|
+
const introEndsWith = (intro: string, word: string): boolean => isAdjacent(intro, word) || isAdjacent(intro.replace(COLON_END, ""), word);
|
|
111
|
+
|
|
112
|
+
/** The date is a recurring day or a worked example: a marker stands where its reach covers the date. */
|
|
113
|
+
export const anyYearDate = (date: DateSpan, source: string, markers: readonly AnyYearMarker[]): boolean => {
|
|
114
|
+
const before = source.slice(lineStart(source, date.offset), date.offset);
|
|
115
|
+
const intro = introOf(source, before, date.offset);
|
|
116
|
+
return markers.some(({ word: written, reach }) => {
|
|
117
|
+
const word = latinLower(written);
|
|
118
|
+
if (word === "") return false;
|
|
119
|
+
if (reach === "adjacent") return isAdjacent(latinLower(before), word);
|
|
120
|
+
if (reach === "label") return latinLower(labelOf(before) ?? "").includes(word);
|
|
121
|
+
return inSentence(before, source.charAt(date.offset), word) || (intro !== undefined && introEndsWith(latinLower(intro), word));
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/** The date opens a period whose other end, just after it, follows a joiner (「4月1日から翌年3月31日」). */
|
|
126
|
+
export const opensSpan = (date: DateSpan, next: DateSpan | undefined, source: string, joiners: readonly string[]): boolean => {
|
|
127
|
+
if (next === undefined || next.offset - date.end > SPAN_GAP_REACH) return false;
|
|
128
|
+
const gap = source.slice(date.end, next.offset).trimStart();
|
|
129
|
+
return !SENTENCE_END.test(gap) && joiners.some((joiner) => joiner !== "" && gap.startsWith(joiner) && !runsOn(gap, joiner));
|
|
130
|
+
};
|
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
import type { Detector, Finding, ProseDocument } from "../plugin.ts";
|
|
2
2
|
import { inDocumentOrder } from "../structure/issues.ts";
|
|
3
3
|
import { datesOutsidePeriod, type OutsideWords } from "../structure/date-outside-period.ts";
|
|
4
|
-
import {
|
|
4
|
+
import { periodWordsOf } from "./range-words.ts";
|
|
5
5
|
import { quoteAt } from "./structure-tree.ts";
|
|
6
6
|
|
|
7
7
|
const patternsOf = (doc: ProseDocument, lexicon: string): string[] => (doc.lexicons[lexicon] ?? []).map((entry) => entry.pattern);
|
|
8
8
|
|
|
9
|
-
/**
|
|
9
|
+
/** 期間の語、期間の外に置く語、文書の仕事の期間の語、締め切りの語、期間の後に来てよい仕事の語、日付を締め切りにする語、概要の節の見出しの語、範囲の記号(range-connector、range-opener、range-frame の間の語)、月と曜日の名は語彙表から取る。 */
|
|
10
10
|
const wordsOf = (doc: ProseDocument): OutsideWords => ({
|
|
11
|
-
|
|
11
|
+
...periodWordsOf(doc, patternsOf(doc, "period-label")),
|
|
12
12
|
terms: patternsOf(doc, "period-term-label"),
|
|
13
13
|
asides: patternsOf(doc, "period-aside"),
|
|
14
14
|
deadlines: patternsOf(doc, "period-deadline"),
|
|
15
15
|
overviews: patternsOf(doc, "period-overview-heading"),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
...patternsOf(doc, "range-opener"),
|
|
19
|
-
...patternsOf(doc, "range-frame").flatMap((pattern) => rangeFrameOf(pattern)?.joint ?? []),
|
|
20
|
-
],
|
|
21
|
-
months: patternsOf(doc, "month-name"),
|
|
22
|
-
weekdays: patternsOf(doc, "weekday"),
|
|
16
|
+
afterTerm: patternsOf(doc, "period-after-term"),
|
|
17
|
+
deadlineMarks: doc.lexicons["date-deadline-mark"] ?? [],
|
|
23
18
|
});
|
|
24
19
|
|
|
25
20
|
/** 書いた期間(旅行期間:…)の外の日付を持つ、その後ろの日程の項目、表の行、見出し。 */
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// date-stamp-order: an established date later than the last update, on the document's stamp lines (structure/stamp-order.ts).
|
|
2
|
+
// The stamp words come from the language's stamp-order-label lexicon, grouped into established and updated.
|
|
3
|
+
import type { Detector, Finding } from "../plugin.ts";
|
|
4
|
+
import { inDocumentOrder } from "../structure/issues.ts";
|
|
5
|
+
import { stampOrderIssues } from "../structure/stamp-order.ts";
|
|
6
|
+
import { proseAndTablesOf } from "../table-text.ts";
|
|
7
|
+
import { quoteAt } from "./structure-tree.ts";
|
|
8
|
+
import { readableDates, withReadableDates } from "./readable-dates.ts";
|
|
9
|
+
|
|
10
|
+
export const dateStampOrder: Detector = (doc, options): Finding[] => {
|
|
11
|
+
if (doc.structure === undefined) return [];
|
|
12
|
+
const labels = options.lexicon ?? [];
|
|
13
|
+
const wordsOf = (group: string): string[] => labels.filter((entry) => entry.group === group).map((entry) => entry.pattern);
|
|
14
|
+
const dates = inDocumentOrder(doc.structure).flatMap((node) =>
|
|
15
|
+
node.kind === "date" ? [{ offset: node.span.start, end: node.span.end, value: String(node.attrs["value"]) }] : [],
|
|
16
|
+
);
|
|
17
|
+
return stampOrderIssues(proseAndTablesOf(doc), dates, { established: wordsOf("established"), updated: wordsOf("updated") }).map(({ offset, values }) => {
|
|
18
|
+
const { side, ...dated } = values;
|
|
19
|
+
return {
|
|
20
|
+
rule: "",
|
|
21
|
+
severity: "info",
|
|
22
|
+
line: 0,
|
|
23
|
+
column: 0,
|
|
24
|
+
quote: quoteAt(doc.source, offset),
|
|
25
|
+
values: { ...withReadableDates(dated, ["established", "updated"], readableDates(doc)), offset },
|
|
26
|
+
...(side === undefined ? {} : { variant: String(side) }),
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
};
|