chaffjs 0.38.0 → 0.40.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 +21 -4
- package/README.md +20 -2
- package/checks/ai-tells.yaml +153 -0
- package/dist/acronym-expansion.d.ts +4 -0
- package/dist/acronym-expansion.d.ts.map +1 -0
- package/dist/acronym-expansion.js +46 -0
- package/dist/acronym-expansion.js.map +1 -0
- package/dist/ai-score/human-shares.d.ts.map +1 -1
- package/dist/ai-score/human-shares.js +54 -12
- package/dist/ai-score/human-shares.js.map +1 -1
- package/dist/ai-score/of-document.d.ts.map +1 -1
- package/dist/ai-score/of-document.js +4 -2
- package/dist/ai-score/of-document.js.map +1 -1
- package/dist/alternative-words.d.ts +6 -0
- package/dist/alternative-words.d.ts.map +1 -1
- package/dist/alternative-words.js +10 -0
- package/dist/alternative-words.js.map +1 -1
- package/dist/body-section.d.ts +3 -1
- package/dist/body-section.d.ts.map +1 -1
- package/dist/body-section.js +9 -2
- package/dist/body-section.js.map +1 -1
- package/dist/capitals-with-small.d.ts +5 -0
- package/dist/capitals-with-small.d.ts.map +1 -1
- package/dist/capitals-with-small.js +15 -0
- package/dist/capitals-with-small.js.map +1 -1
- package/dist/checks.d.ts +11 -0
- package/dist/checks.d.ts.map +1 -1
- package/dist/checks.js +27 -1
- package/dist/checks.js.map +1 -1
- package/dist/cli-args.js +1 -1
- package/dist/cli-args.js.map +1 -1
- package/dist/cli-text.d.ts.map +1 -1
- package/dist/cli-text.js +4 -0
- package/dist/cli-text.js.map +1 -1
- package/dist/closing-code.d.ts +8 -0
- package/dist/closing-code.d.ts.map +1 -0
- package/dist/closing-code.js +18 -0
- package/dist/closing-code.js.map +1 -0
- package/dist/commands/fix-plan.d.ts.map +1 -1
- package/dist/commands/fix-plan.js +64 -4
- package/dist/commands/fix-plan.js.map +1 -1
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +16 -2
- package/dist/commands/test.js.map +1 -1
- package/dist/date-format.d.ts +19 -1
- package/dist/date-format.d.ts.map +1 -1
- package/dist/date-format.js +41 -5
- package/dist/date-format.js.map +1 -1
- package/dist/detectors/acronym-context.d.ts +5 -2
- package/dist/detectors/acronym-context.d.ts.map +1 -1
- package/dist/detectors/acronym-context.js +19 -4
- package/dist/detectors/acronym-context.js.map +1 -1
- package/dist/detectors/acronym-expansion.d.ts.map +1 -1
- package/dist/detectors/acronym-expansion.js +25 -0
- package/dist/detectors/acronym-expansion.js.map +1 -1
- package/dist/detectors/acronym-gloss.d.ts +19 -0
- package/dist/detectors/acronym-gloss.d.ts.map +1 -1
- package/dist/detectors/acronym-gloss.js +115 -0
- package/dist/detectors/acronym-gloss.js.map +1 -1
- package/dist/detectors/acronym-mention.d.ts +5 -0
- package/dist/detectors/acronym-mention.d.ts.map +1 -1
- package/dist/detectors/acronym-mention.js +16 -0
- package/dist/detectors/acronym-mention.js.map +1 -1
- package/dist/detectors/acronym-name.d.ts +14 -2
- package/dist/detectors/acronym-name.d.ts.map +1 -1
- package/dist/detectors/acronym-name.js +28 -3
- package/dist/detectors/acronym-name.js.map +1 -1
- package/dist/detectors/acronym-series.d.ts +7 -0
- package/dist/detectors/acronym-series.d.ts.map +1 -0
- package/dist/detectors/acronym-series.js +25 -0
- package/dist/detectors/acronym-series.js.map +1 -0
- package/dist/detectors/ai-phrasing.d.ts +3 -6
- package/dist/detectors/ai-phrasing.d.ts.map +1 -1
- package/dist/detectors/ai-phrasing.js +17 -16
- package/dist/detectors/ai-phrasing.js.map +1 -1
- package/dist/detectors/ai-structure.d.ts +1 -0
- package/dist/detectors/ai-structure.d.ts.map +1 -1
- package/dist/detectors/ai-structure.js +15 -4
- package/dist/detectors/ai-structure.js.map +1 -1
- package/dist/detectors/alnum-number.d.ts +1 -0
- package/dist/detectors/alnum-number.d.ts.map +1 -1
- package/dist/detectors/alnum-number.js +7 -3
- package/dist/detectors/alnum-number.js.map +1 -1
- package/dist/detectors/bare-comparative.d.ts +6 -0
- package/dist/detectors/bare-comparative.d.ts.map +1 -1
- package/dist/detectors/bare-comparative.js +31 -12
- package/dist/detectors/bare-comparative.js.map +1 -1
- package/dist/detectors/blank-runs.d.ts +12 -0
- package/dist/detectors/blank-runs.d.ts.map +1 -0
- package/dist/detectors/blank-runs.js +27 -0
- package/dist/detectors/blank-runs.js.map +1 -0
- package/dist/detectors/bold-emphasis-form.d.ts +8 -0
- package/dist/detectors/bold-emphasis-form.d.ts.map +1 -0
- package/dist/detectors/bold-emphasis-form.js +40 -0
- package/dist/detectors/bold-emphasis-form.js.map +1 -0
- package/dist/detectors/bold-emphasis.d.ts +0 -1
- package/dist/detectors/bold-emphasis.d.ts.map +1 -1
- package/dist/detectors/bold-emphasis.js +14 -12
- package/dist/detectors/bold-emphasis.js.map +1 -1
- package/dist/detectors/bold-label.d.ts +3 -1
- package/dist/detectors/bold-label.d.ts.map +1 -1
- package/dist/detectors/bold-label.js +16 -6
- package/dist/detectors/bold-label.js.map +1 -1
- package/dist/detectors/capitalised-term.d.ts.map +1 -1
- package/dist/detectors/capitalised-term.js +28 -9
- package/dist/detectors/capitalised-term.js.map +1 -1
- package/dist/detectors/caps-caption.d.ts +5 -0
- package/dist/detectors/caps-caption.d.ts.map +1 -1
- package/dist/detectors/caps-caption.js +20 -2
- package/dist/detectors/caps-caption.js.map +1 -1
- package/dist/detectors/char-shape.d.ts.map +1 -1
- package/dist/detectors/char-shape.js +86 -27
- package/dist/detectors/char-shape.js.map +1 -1
- package/dist/detectors/chat-log-line.d.ts +8 -0
- package/dist/detectors/chat-log-line.d.ts.map +1 -0
- package/dist/detectors/chat-log-line.js +13 -0
- package/dist/detectors/chat-log-line.js.map +1 -0
- package/dist/detectors/citation-string.d.ts +9 -0
- package/dist/detectors/citation-string.d.ts.map +1 -0
- package/dist/detectors/citation-string.js +86 -0
- package/dist/detectors/citation-string.js.map +1 -0
- package/dist/detectors/closing-cliche.d.ts +18 -0
- package/dist/detectors/closing-cliche.d.ts.map +1 -0
- package/dist/detectors/closing-cliche.js +58 -0
- package/dist/detectors/closing-cliche.js.map +1 -0
- package/dist/detectors/closing-exhortation.d.ts +18 -0
- package/dist/detectors/closing-exhortation.d.ts.map +1 -0
- package/dist/detectors/closing-exhortation.js +55 -0
- package/dist/detectors/closing-exhortation.js.map +1 -0
- package/dist/detectors/cold-open.d.ts +25 -0
- package/dist/detectors/cold-open.d.ts.map +1 -0
- package/dist/detectors/cold-open.js +121 -0
- package/dist/detectors/cold-open.js.map +1 -0
- package/dist/detectors/comparative-context.d.ts +21 -0
- package/dist/detectors/comparative-context.d.ts.map +1 -0
- package/dist/detectors/comparative-context.js +57 -0
- package/dist/detectors/comparative-context.js.map +1 -0
- package/dist/detectors/concrete-evidence-density.d.ts +3 -0
- package/dist/detectors/concrete-evidence-density.d.ts.map +1 -0
- package/dist/detectors/concrete-evidence-density.js +75 -0
- package/dist/detectors/concrete-evidence-density.js.map +1 -0
- package/dist/detectors/concrete-evidence.d.ts +14 -0
- package/dist/detectors/concrete-evidence.d.ts.map +1 -1
- package/dist/detectors/concrete-evidence.js +24 -0
- package/dist/detectors/concrete-evidence.js.map +1 -1
- package/dist/detectors/contraction-emphasis.d.ts +3 -0
- package/dist/detectors/contraction-emphasis.d.ts.map +1 -0
- package/dist/detectors/contraction-emphasis.js +24 -0
- package/dist/detectors/contraction-emphasis.js.map +1 -0
- package/dist/detectors/contraction-mention.d.ts +12 -1
- package/dist/detectors/contraction-mention.d.ts.map +1 -1
- package/dist/detectors/contraction-mention.js +39 -6
- package/dist/detectors/contraction-mention.js.map +1 -1
- package/dist/detectors/contraction-mix.d.ts +3 -0
- package/dist/detectors/contraction-mix.d.ts.map +1 -0
- package/dist/detectors/contraction-mix.js +69 -0
- package/dist/detectors/contraction-mix.js.map +1 -0
- package/dist/detectors/contrast-frame.d.ts +5 -0
- package/dist/detectors/contrast-frame.d.ts.map +1 -1
- package/dist/detectors/contrast-frame.js +53 -6
- package/dist/detectors/contrast-frame.js.map +1 -1
- package/dist/detectors/coordinate-adjective.d.ts +2 -1
- package/dist/detectors/coordinate-adjective.d.ts.map +1 -1
- package/dist/detectors/coordinate-adjective.js +4 -2
- package/dist/detectors/coordinate-adjective.js.map +1 -1
- package/dist/detectors/date-format.d.ts.map +1 -1
- package/dist/detectors/date-format.js +13 -1
- package/dist/detectors/date-format.js.map +1 -1
- package/dist/detectors/duplicate-definition.d.ts +3 -0
- package/dist/detectors/duplicate-definition.d.ts.map +1 -0
- package/dist/detectors/duplicate-definition.js +16 -0
- package/dist/detectors/duplicate-definition.js.map +1 -0
- package/dist/detectors/duplicate-heading.d.ts +4 -2
- package/dist/detectors/duplicate-heading.d.ts.map +1 -1
- package/dist/detectors/duplicate-heading.js +35 -11
- package/dist/detectors/duplicate-heading.js.map +1 -1
- package/dist/detectors/email-frame-words.d.ts +10 -0
- package/dist/detectors/email-frame-words.d.ts.map +1 -0
- package/dist/detectors/email-frame-words.js +34 -0
- package/dist/detectors/email-frame-words.js.map +1 -0
- package/dist/detectors/email-letter.d.ts +3 -7
- package/dist/detectors/email-letter.d.ts.map +1 -1
- package/dist/detectors/email-letter.js +13 -21
- package/dist/detectors/email-letter.js.map +1 -1
- package/dist/detectors/final-period-captions.d.ts +15 -0
- package/dist/detectors/final-period-captions.d.ts.map +1 -0
- package/dist/detectors/final-period-captions.js +61 -0
- package/dist/detectors/final-period-captions.js.map +1 -0
- package/dist/detectors/fullwidth-alnum.d.ts.map +1 -1
- package/dist/detectors/fullwidth-alnum.js +20 -4
- package/dist/detectors/fullwidth-alnum.js.map +1 -1
- package/dist/detectors/gram-furniture.d.ts +18 -1
- package/dist/detectors/gram-furniture.d.ts.map +1 -1
- package/dist/detectors/gram-furniture.js +71 -0
- package/dist/detectors/gram-furniture.js.map +1 -1
- package/dist/detectors/gram-openers.d.ts +16 -0
- package/dist/detectors/gram-openers.d.ts.map +1 -1
- package/dist/detectors/gram-openers.js +52 -0
- package/dist/detectors/gram-openers.js.map +1 -1
- package/dist/detectors/gram-predicate.d.ts.map +1 -1
- package/dist/detectors/gram-predicate.js +40 -7
- package/dist/detectors/gram-predicate.js.map +1 -1
- package/dist/detectors/gram-repetition.d.ts +3 -0
- package/dist/detectors/gram-repetition.d.ts.map +1 -0
- package/dist/detectors/gram-repetition.js +158 -0
- package/dist/detectors/gram-repetition.js.map +1 -0
- package/dist/detectors/heading-level-skip.d.ts +6 -0
- package/dist/detectors/heading-level-skip.d.ts.map +1 -1
- package/dist/detectors/heading-level-skip.js +24 -1
- package/dist/detectors/heading-level-skip.js.map +1 -1
- package/dist/detectors/heading-numbering.js +2 -2
- package/dist/detectors/heading-numbering.js.map +1 -1
- package/dist/detectors/heading-sentences.d.ts +10 -0
- package/dist/detectors/heading-sentences.d.ts.map +1 -0
- package/dist/detectors/heading-sentences.js +32 -0
- package/dist/detectors/heading-sentences.js.map +1 -0
- package/dist/detectors/hyphen-copied-text.d.ts +3 -0
- package/dist/detectors/hyphen-copied-text.d.ts.map +1 -0
- package/dist/detectors/hyphen-copied-text.js +49 -0
- package/dist/detectors/hyphen-copied-text.js.map +1 -0
- package/dist/detectors/kanji-name-edge.d.ts +15 -0
- package/dist/detectors/kanji-name-edge.d.ts.map +1 -1
- package/dist/detectors/kanji-name-edge.js +30 -0
- package/dist/detectors/kanji-name-edge.js.map +1 -1
- package/dist/detectors/kanji-run-pieces.d.ts +7 -0
- package/dist/detectors/kanji-run-pieces.d.ts.map +1 -1
- package/dist/detectors/kanji-run-pieces.js +14 -4
- package/dist/detectors/kanji-run-pieces.js.map +1 -1
- package/dist/detectors/kutoten-consistency.d.ts.map +1 -1
- package/dist/detectors/kutoten-consistency.js +22 -4
- package/dist/detectors/kutoten-consistency.js.map +1 -1
- package/dist/detectors/lead-in-dash.d.ts +5 -0
- package/dist/detectors/lead-in-dash.d.ts.map +1 -1
- package/dist/detectors/lead-in-dash.js +9 -0
- package/dist/detectors/lead-in-dash.js.map +1 -1
- package/dist/detectors/letter-joined-name.d.ts +2 -0
- package/dist/detectors/letter-joined-name.d.ts.map +1 -1
- package/dist/detectors/letter-joined-name.js +8 -0
- package/dist/detectors/letter-joined-name.js.map +1 -1
- package/dist/detectors/lexicon.d.ts +1 -2
- package/dist/detectors/lexicon.d.ts.map +1 -1
- package/dist/detectors/lexicon.js +16 -57
- package/dist/detectors/lexicon.js.map +1 -1
- package/dist/detectors/list-item.d.ts +14 -0
- package/dist/detectors/list-item.d.ts.map +1 -1
- package/dist/detectors/list-item.js +30 -1
- package/dist/detectors/list-item.js.map +1 -1
- package/dist/detectors/list-items.d.ts +1 -1
- package/dist/detectors/list-items.d.ts.map +1 -1
- package/dist/detectors/list-items.js +2 -0
- package/dist/detectors/list-items.js.map +1 -1
- package/dist/detectors/list-joint.d.ts +18 -0
- package/dist/detectors/list-joint.d.ts.map +1 -0
- package/dist/detectors/list-joint.js +42 -0
- package/dist/detectors/list-joint.js.map +1 -0
- package/dist/detectors/list-layout.d.ts +14 -0
- package/dist/detectors/list-layout.d.ts.map +1 -0
- package/dist/detectors/list-layout.js +29 -0
- package/dist/detectors/list-layout.js.map +1 -0
- package/dist/detectors/list-lead-in.d.ts +7 -2
- package/dist/detectors/list-lead-in.d.ts.map +1 -1
- package/dist/detectors/list-lead-in.js +67 -6
- package/dist/detectors/list-lead-in.js.map +1 -1
- package/dist/detectors/list-parallel.d.ts +6 -0
- package/dist/detectors/list-parallel.d.ts.map +1 -1
- package/dist/detectors/list-parallel.js +106 -13
- package/dist/detectors/list-parallel.js.map +1 -1
- package/dist/detectors/list-run.d.ts +13 -0
- package/dist/detectors/list-run.d.ts.map +1 -0
- package/dist/detectors/list-run.js +80 -0
- package/dist/detectors/list-run.js.map +1 -0
- package/dist/detectors/list-sentence.d.ts +11 -0
- package/dist/detectors/list-sentence.d.ts.map +1 -1
- package/dist/detectors/list-sentence.js +1 -0
- package/dist/detectors/list-sentence.js.map +1 -1
- package/dist/detectors/mark-shape.d.ts +2 -1
- package/dist/detectors/mark-shape.d.ts.map +1 -1
- package/dist/detectors/mark-shape.js +10 -6
- package/dist/detectors/mark-shape.js.map +1 -1
- package/dist/detectors/missing-final-period.d.ts.map +1 -1
- package/dist/detectors/missing-final-period.js +3 -1
- package/dist/detectors/missing-final-period.js.map +1 -1
- package/dist/detectors/name-run.d.ts +2 -0
- package/dist/detectors/name-run.d.ts.map +1 -1
- package/dist/detectors/name-run.js +1 -1
- package/dist/detectors/name-run.js.map +1 -1
- package/dist/detectors/name-variant-two-things.d.ts +18 -0
- package/dist/detectors/name-variant-two-things.d.ts.map +1 -0
- package/dist/detectors/name-variant-two-things.js +84 -0
- package/dist/detectors/name-variant-two-things.js.map +1 -0
- package/dist/detectors/name-variant.d.ts.map +1 -1
- package/dist/detectors/name-variant.js +14 -15
- package/dist/detectors/name-variant.js.map +1 -1
- package/dist/detectors/numbering-readings.d.ts +2 -2
- package/dist/detectors/numbering-readings.d.ts.map +1 -1
- package/dist/detectors/numbering-readings.js +7 -0
- package/dist/detectors/numbering-readings.js.map +1 -1
- package/dist/detectors/open-end-anaphor.d.ts +8 -0
- package/dist/detectors/open-end-anaphor.d.ts.map +1 -0
- package/dist/detectors/open-end-anaphor.js +22 -0
- package/dist/detectors/open-end-anaphor.js.map +1 -0
- package/dist/detectors/open-end-lead.d.ts +4 -0
- package/dist/detectors/open-end-lead.d.ts.map +1 -0
- package/dist/detectors/open-end-lead.js +34 -0
- package/dist/detectors/open-end-lead.js.map +1 -0
- package/dist/detectors/open-end-scope.d.ts.map +1 -1
- package/dist/detectors/open-end-scope.js +7 -1
- package/dist/detectors/open-end-scope.js.map +1 -1
- package/dist/detectors/ordinal-run-gaps.d.ts +1 -0
- package/dist/detectors/ordinal-run-gaps.d.ts.map +1 -1
- package/dist/detectors/ordinal-run-gaps.js +1 -1
- package/dist/detectors/ordinal-run-gaps.js.map +1 -1
- package/dist/detectors/organisation-run.d.ts +6 -0
- package/dist/detectors/organisation-run.d.ts.map +1 -1
- package/dist/detectors/organisation-run.js +26 -2
- package/dist/detectors/organisation-run.js.map +1 -1
- package/dist/detectors/orthographic-variant-open.d.ts +37 -0
- package/dist/detectors/orthographic-variant-open.d.ts.map +1 -0
- package/dist/detectors/orthographic-variant-open.js +81 -0
- package/dist/detectors/orthographic-variant-open.js.map +1 -0
- package/dist/detectors/orthographic-variant.d.ts.map +1 -1
- package/dist/detectors/orthographic-variant.js +55 -59
- package/dist/detectors/orthographic-variant.js.map +1 -1
- package/dist/detectors/orthography.d.ts.map +1 -1
- package/dist/detectors/orthography.js +14 -5
- package/dist/detectors/orthography.js.map +1 -1
- package/dist/detectors/over-general-claim.d.ts.map +1 -1
- package/dist/detectors/over-general-claim.js +82 -4
- package/dist/detectors/over-general-claim.js.map +1 -1
- package/dist/detectors/oxford-comma.d.ts.map +1 -1
- package/dist/detectors/oxford-comma.js +61 -27
- package/dist/detectors/oxford-comma.js.map +1 -1
- package/dist/detectors/particle-run-names.d.ts +8 -0
- package/dist/detectors/particle-run-names.d.ts.map +1 -0
- package/dist/detectors/particle-run-names.js +17 -0
- package/dist/detectors/particle-run-names.js.map +1 -0
- package/dist/detectors/placeholder-text.d.ts.map +1 -1
- package/dist/detectors/placeholder-text.js +14 -2
- package/dist/detectors/placeholder-text.js.map +1 -1
- package/dist/detectors/proper-noun-density.d.ts +13 -0
- package/dist/detectors/proper-noun-density.d.ts.map +1 -0
- package/dist/detectors/proper-noun-density.js +97 -0
- package/dist/detectors/proper-noun-density.js.map +1 -0
- package/dist/detectors/quote-without-source.d.ts +6 -2
- package/dist/detectors/quote-without-source.d.ts.map +1 -1
- package/dist/detectors/quote-without-source.js +33 -8
- package/dist/detectors/quote-without-source.js.map +1 -1
- package/dist/detectors/quoted-excerpt.d.ts +13 -0
- package/dist/detectors/quoted-excerpt.d.ts.map +1 -0
- package/dist/detectors/quoted-excerpt.js +53 -0
- package/dist/detectors/quoted-excerpt.js.map +1 -0
- package/dist/detectors/reference-entry.d.ts +7 -0
- package/dist/detectors/reference-entry.d.ts.map +1 -0
- package/dist/detectors/reference-entry.js +35 -0
- package/dist/detectors/reference-entry.js.map +1 -0
- package/dist/detectors/register-neutral-shape.d.ts +5 -2
- package/dist/detectors/register-neutral-shape.d.ts.map +1 -1
- package/dist/detectors/register-neutral-shape.js +21 -4
- package/dist/detectors/register-neutral-shape.js.map +1 -1
- package/dist/detectors/register-separate-part.d.ts +7 -0
- package/dist/detectors/register-separate-part.d.ts.map +1 -0
- package/dist/detectors/register-separate-part.js +32 -0
- package/dist/detectors/register-separate-part.js.map +1 -0
- package/dist/detectors/register-set-apart.d.ts +24 -0
- package/dist/detectors/register-set-apart.d.ts.map +1 -0
- package/dist/detectors/register-set-apart.js +102 -0
- package/dist/detectors/register-set-apart.js.map +1 -0
- package/dist/detectors/register-voice.d.ts +14 -0
- package/dist/detectors/register-voice.d.ts.map +1 -0
- package/dist/detectors/register-voice.js +47 -0
- package/dist/detectors/register-voice.js.map +1 -0
- package/dist/detectors/register.d.ts +5 -0
- package/dist/detectors/register.d.ts.map +1 -1
- package/dist/detectors/register.js +13 -0
- package/dist/detectors/register.js.map +1 -1
- package/dist/detectors/registry/closing-cliche.d.ts +3 -0
- package/dist/detectors/registry/closing-cliche.d.ts.map +1 -0
- package/dist/detectors/registry/closing-cliche.js +3 -0
- package/dist/detectors/registry/closing-cliche.js.map +1 -0
- package/dist/detectors/registry/closing-exhortation.d.ts +3 -0
- package/dist/detectors/registry/closing-exhortation.d.ts.map +1 -0
- package/dist/detectors/registry/closing-exhortation.js +3 -0
- package/dist/detectors/registry/closing-exhortation.js.map +1 -0
- package/dist/detectors/registry/cold-open.d.ts +3 -0
- package/dist/detectors/registry/cold-open.d.ts.map +1 -0
- package/dist/detectors/registry/cold-open.js +3 -0
- package/dist/detectors/registry/cold-open.js.map +1 -0
- package/dist/detectors/registry/colon-lead-in.js +1 -1
- package/dist/detectors/registry/colon-lead-in.js.map +1 -1
- package/dist/detectors/registry/concrete-evidence.js +1 -1
- package/dist/detectors/registry/concrete-evidence.js.map +1 -1
- package/dist/detectors/registry/contraction-mix.js +1 -1
- package/dist/detectors/registry/contraction-mix.js.map +1 -1
- package/dist/detectors/registry/duplicate-definition.js +1 -1
- package/dist/detectors/registry/duplicate-definition.js.map +1 -1
- package/dist/detectors/registry/ngram-repetition.js +1 -1
- package/dist/detectors/registry/ngram-repetition.js.map +1 -1
- package/dist/detectors/registry/proper-noun-density.js +1 -1
- package/dist/detectors/registry/proper-noun-density.js.map +1 -1
- package/dist/detectors/registry/topic-predicate-distance.js +1 -1
- package/dist/detectors/registry/topic-predicate-distance.js.map +1 -1
- package/dist/detectors/registry/unprompted-denial.d.ts +3 -0
- package/dist/detectors/registry/unprompted-denial.d.ts.map +1 -0
- package/dist/detectors/registry/unprompted-denial.js +3 -0
- package/dist/detectors/registry/unprompted-denial.js.map +1 -0
- package/dist/detectors/reproduced-text.d.ts +5 -0
- package/dist/detectors/reproduced-text.d.ts.map +1 -0
- package/dist/detectors/reproduced-text.js +19 -0
- package/dist/detectors/reproduced-text.js.map +1 -0
- package/dist/detectors/request-owner.d.ts +2 -1
- package/dist/detectors/request-owner.d.ts.map +1 -1
- package/dist/detectors/request-owner.js +31 -7
- package/dist/detectors/request-owner.js.map +1 -1
- package/dist/detectors/requirement-smell.d.ts.map +1 -1
- package/dist/detectors/requirement-smell.js +16 -5
- package/dist/detectors/requirement-smell.js.map +1 -1
- package/dist/detectors/sentence-counts.d.ts +2 -1
- package/dist/detectors/sentence-counts.d.ts.map +1 -1
- package/dist/detectors/sentence-counts.js +23 -7
- package/dist/detectors/sentence-counts.js.map +1 -1
- package/dist/detectors/sentence-ending.d.ts +7 -1
- package/dist/detectors/sentence-ending.d.ts.map +1 -1
- package/dist/detectors/sentence-ending.js +47 -11
- package/dist/detectors/sentence-ending.js.map +1 -1
- package/dist/detectors/sentence-length.d.ts.map +1 -1
- package/dist/detectors/sentence-length.js +37 -12
- package/dist/detectors/sentence-length.js.map +1 -1
- package/dist/detectors/sentence-load.d.ts +5 -3
- package/dist/detectors/sentence-load.d.ts.map +1 -1
- package/dist/detectors/sentence-load.js +3 -5
- package/dist/detectors/sentence-load.js.map +1 -1
- package/dist/detectors/sentence-parts.d.ts +11 -0
- package/dist/detectors/sentence-parts.d.ts.map +1 -0
- package/dist/detectors/sentence-parts.js +64 -0
- package/dist/detectors/sentence-parts.js.map +1 -0
- package/dist/detectors/sentence-title.d.ts +3 -0
- package/dist/detectors/sentence-title.d.ts.map +1 -1
- package/dist/detectors/sentence-title.js +10 -0
- package/dist/detectors/sentence-title.js.map +1 -1
- package/dist/detectors/signals.d.ts +0 -2
- package/dist/detectors/signals.d.ts.map +1 -1
- package/dist/detectors/signals.js +18 -167
- package/dist/detectors/signals.js.map +1 -1
- package/dist/detectors/spelling-variety.d.ts.map +1 -1
- package/dist/detectors/spelling-variety.js +20 -2
- package/dist/detectors/spelling-variety.js.map +1 -1
- package/dist/detectors/structure-tree.d.ts +2 -1
- package/dist/detectors/structure-tree.d.ts.map +1 -1
- package/dist/detectors/structure-tree.js +3 -8
- package/dist/detectors/structure-tree.js.map +1 -1
- package/dist/detectors/structure.d.ts +9 -1
- package/dist/detectors/structure.d.ts.map +1 -1
- package/dist/detectors/structure.js +43 -16
- package/dist/detectors/structure.js.map +1 -1
- package/dist/detectors/superlative-clause.d.ts.map +1 -1
- package/dist/detectors/superlative-clause.js +19 -2
- package/dist/detectors/superlative-clause.js.map +1 -1
- package/dist/detectors/superlative-context.d.ts +35 -0
- package/dist/detectors/superlative-context.d.ts.map +1 -0
- package/dist/detectors/superlative-context.js +71 -0
- package/dist/detectors/superlative-context.js.map +1 -0
- package/dist/detectors/superlative-scope.d.ts +6 -2
- package/dist/detectors/superlative-scope.d.ts.map +1 -1
- package/dist/detectors/superlative-scope.js +20 -6
- package/dist/detectors/superlative-scope.js.map +1 -1
- package/dist/detectors/team.d.ts +0 -1
- package/dist/detectors/team.d.ts.map +1 -1
- package/dist/detectors/team.js +0 -46
- package/dist/detectors/team.js.map +1 -1
- package/dist/detectors/titled-code-citation.d.ts +12 -0
- package/dist/detectors/titled-code-citation.d.ts.map +1 -0
- package/dist/detectors/titled-code-citation.js +11 -0
- package/dist/detectors/titled-code-citation.js.map +1 -0
- package/dist/detectors/titled-run.d.ts +8 -1
- package/dist/detectors/titled-run.d.ts.map +1 -1
- package/dist/detectors/titled-run.js +14 -4
- package/dist/detectors/titled-run.js.map +1 -1
- package/dist/detectors/token-shape.d.ts.map +1 -1
- package/dist/detectors/token-shape.js +33 -16
- package/dist/detectors/token-shape.js.map +1 -1
- package/dist/detectors/topic-predicate-distance.d.ts +4 -0
- package/dist/detectors/topic-predicate-distance.d.ts.map +1 -0
- package/dist/detectors/topic-predicate-distance.js +22 -0
- package/dist/detectors/topic-predicate-distance.js.map +1 -0
- package/dist/detectors/undefined-term.d.ts +5 -0
- package/dist/detectors/undefined-term.d.ts.map +1 -1
- package/dist/detectors/undefined-term.js +22 -1
- package/dist/detectors/undefined-term.js.map +1 -1
- package/dist/detectors/unfilled-placeholder.d.ts.map +1 -1
- package/dist/detectors/unfilled-placeholder.js +15 -1
- package/dist/detectors/unfilled-placeholder.js.map +1 -1
- package/dist/detectors/unknown-word-context.d.ts +35 -0
- package/dist/detectors/unknown-word-context.d.ts.map +1 -0
- package/dist/detectors/unknown-word-context.js +100 -0
- package/dist/detectors/unknown-word-context.js.map +1 -0
- package/dist/detectors/unknown-word.d.ts +0 -5
- package/dist/detectors/unknown-word.d.ts.map +1 -1
- package/dist/detectors/unknown-word.js +17 -19
- package/dist/detectors/unknown-word.js.map +1 -1
- package/dist/detectors/unprompted-denial.d.ts +25 -0
- package/dist/detectors/unprompted-denial.d.ts.map +1 -0
- package/dist/detectors/unprompted-denial.js +100 -0
- package/dist/detectors/unprompted-denial.js.map +1 -0
- package/dist/document-sections.d.ts.map +1 -1
- package/dist/document-sections.js +3 -1
- package/dist/document-sections.js.map +1 -1
- package/dist/fix-plan/all-signs.d.ts +17 -0
- package/dist/fix-plan/all-signs.d.ts.map +1 -0
- package/dist/fix-plan/all-signs.js +26 -0
- package/dist/fix-plan/all-signs.js.map +1 -0
- package/dist/fix-plan/plan.d.ts +31 -0
- package/dist/fix-plan/plan.d.ts.map +1 -1
- package/dist/fix-plan/plan.js +23 -3
- package/dist/fix-plan/plan.js.map +1 -1
- package/dist/fix-plan/render.d.ts.map +1 -1
- package/dist/fix-plan/render.js +31 -2
- package/dist/fix-plan/render.js.map +1 -1
- package/dist/fix-plan/risen.d.ts +10 -0
- package/dist/fix-plan/risen.d.ts.map +1 -0
- package/dist/fix-plan/risen.js +7 -0
- package/dist/fix-plan/risen.js.map +1 -0
- package/dist/fix-plan/text.d.ts +15 -0
- package/dist/fix-plan/text.d.ts.map +1 -1
- package/dist/fix-plan/text.js +38 -2
- package/dist/fix-plan/text.js.map +1 -1
- package/dist/heading-numbering.d.ts +2 -1
- package/dist/heading-numbering.d.ts.map +1 -1
- package/dist/heading-numbering.js +40 -10
- package/dist/heading-numbering.js.map +1 -1
- package/dist/html/html-site-chrome.d.ts.map +1 -1
- package/dist/html/html-site-chrome.js +7 -2
- package/dist/html/html-site-chrome.js.map +1 -1
- package/dist/latin-spacing-source.d.ts +12 -0
- package/dist/latin-spacing-source.d.ts.map +1 -0
- package/dist/latin-spacing-source.js +25 -0
- package/dist/latin-spacing-source.js.map +1 -0
- package/dist/law-title.d.ts +7 -0
- package/dist/law-title.d.ts.map +1 -0
- package/dist/law-title.js +29 -0
- package/dist/law-title.js.map +1 -0
- package/dist/name-ending-run.d.ts +11 -0
- package/dist/name-ending-run.d.ts.map +1 -0
- package/dist/name-ending-run.js +37 -0
- package/dist/name-ending-run.js.map +1 -0
- package/dist/name-separator.d.ts.map +1 -1
- package/dist/name-separator.js +4 -1
- package/dist/name-separator.js.map +1 -1
- package/dist/name-title-slip.d.ts +11 -0
- package/dist/name-title-slip.d.ts.map +1 -0
- package/dist/name-title-slip.js +51 -0
- package/dist/name-title-slip.js.map +1 -0
- package/dist/name-variant-shapes.d.ts +14 -0
- package/dist/name-variant-shapes.d.ts.map +1 -0
- package/dist/name-variant-shapes.js +43 -0
- package/dist/name-variant-shapes.js.map +1 -0
- package/dist/name-word-use.d.ts +5 -0
- package/dist/name-word-use.d.ts.map +1 -0
- package/dist/name-word-use.js +12 -0
- package/dist/name-word-use.js.map +1 -0
- package/dist/opening-passage.d.ts +8 -0
- package/dist/opening-passage.d.ts.map +1 -0
- package/dist/opening-passage.js +24 -0
- package/dist/opening-passage.js.map +1 -0
- package/dist/paragraph-length.d.ts +14 -0
- package/dist/paragraph-length.d.ts.map +1 -1
- package/dist/paragraph-length.js +25 -0
- package/dist/paragraph-length.js.map +1 -1
- package/dist/paragraph-runs.d.ts +2 -2
- package/dist/paragraph-runs.d.ts.map +1 -1
- package/dist/paragraph-runs.js +65 -14
- package/dist/paragraph-runs.js.map +1 -1
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/quote-echo.d.ts +6 -0
- package/dist/quote-echo.d.ts.map +1 -0
- package/dist/quote-echo.js +14 -0
- package/dist/quote-echo.js.map +1 -0
- package/dist/quote-gloss.d.ts +4 -0
- package/dist/quote-gloss.d.ts.map +1 -0
- package/dist/quote-gloss.js +7 -0
- package/dist/quote-gloss.js.map +1 -0
- package/dist/quoted-spelling.d.ts +17 -0
- package/dist/quoted-spelling.d.ts.map +1 -0
- package/dist/quoted-spelling.js +27 -0
- package/dist/quoted-spelling.js.map +1 -0
- package/dist/render/semantic.d.ts +1 -1
- package/dist/render/semantic.d.ts.map +1 -1
- package/dist/render/semantic.js +2 -1
- package/dist/render/semantic.js.map +1 -1
- package/dist/rule-of-three.d.ts +19 -0
- package/dist/rule-of-three.d.ts.map +1 -0
- package/dist/rule-of-three.js +33 -0
- package/dist/rule-of-three.js.map +1 -0
- package/dist/run-semantic.d.ts.map +1 -1
- package/dist/run-semantic.js +2 -2
- package/dist/run-semantic.js.map +1 -1
- package/dist/section-levels.d.ts +18 -0
- package/dist/section-levels.d.ts.map +1 -0
- package/dist/section-levels.js +80 -0
- package/dist/section-levels.js.map +1 -0
- package/dist/semantic.d.ts +2 -0
- package/dist/semantic.d.ts.map +1 -1
- package/dist/semantic.js +15 -2
- package/dist/semantic.js.map +1 -1
- package/dist/sentence-load.d.ts +2 -1
- package/dist/sentence-load.d.ts.map +1 -1
- package/dist/sentence-load.js +4 -2
- package/dist/sentence-load.js.map +1 -1
- package/dist/set-phrase-particles.d.ts +4 -0
- package/dist/set-phrase-particles.d.ts.map +1 -0
- package/dist/set-phrase-particles.js +26 -0
- package/dist/set-phrase-particles.js.map +1 -0
- package/dist/spelling.d.ts +11 -0
- package/dist/spelling.d.ts.map +1 -1
- package/dist/spelling.js +19 -5
- package/dist/spelling.js.map +1 -1
- package/dist/structure/alternative-clause.d.ts +7 -0
- package/dist/structure/alternative-clause.d.ts.map +1 -1
- package/dist/structure/alternative-clause.js +23 -8
- package/dist/structure/alternative-clause.js.map +1 -1
- package/dist/structure/cited-document-section.d.ts +2 -0
- package/dist/structure/cited-document-section.d.ts.map +1 -1
- package/dist/structure/cited-document-section.js +23 -1
- package/dist/structure/cited-document-section.js.map +1 -1
- package/dist/structure/issues.d.ts +4 -2
- package/dist/structure/issues.d.ts.map +1 -1
- package/dist/structure/issues.js +17 -9
- package/dist/structure/issues.js.map +1 -1
- package/dist/structure/numbering.d.ts +10 -1
- package/dist/structure/numbering.d.ts.map +1 -1
- package/dist/structure/numbering.js +41 -4
- package/dist/structure/numbering.js.map +1 -1
- package/dist/structure/unread-label.d.ts +13 -0
- package/dist/structure/unread-label.d.ts.map +1 -0
- package/dist/structure/unread-label.js +70 -0
- package/dist/structure/unread-label.js.map +1 -0
- package/dist/structure-shape/template-outline.d.ts +11 -0
- package/dist/structure-shape/template-outline.d.ts.map +1 -0
- package/dist/structure-shape/template-outline.js +25 -0
- package/dist/structure-shape/template-outline.js.map +1 -0
- package/dist/title-case-name.d.ts +12 -0
- package/dist/title-case-name.d.ts.map +1 -0
- package/dist/title-case-name.js +37 -0
- package/dist/title-case-name.js.map +1 -0
- package/dist/topic-clause.d.ts +6 -1
- package/dist/topic-clause.d.ts.map +1 -1
- package/dist/topic-clause.js +90 -3
- package/dist/topic-clause.js.map +1 -1
- package/dist/word-use.d.ts +12 -4
- package/dist/word-use.d.ts.map +1 -1
- package/dist/word-use.js +47 -5
- package/dist/word-use.js.map +1 -1
- package/package.json +4 -3
- package/rules/ai-generated-composite.yaml +12 -3
- package/rules/ai-structure.yaml +7 -6
- package/rules/ai-tell.yaml +10 -6
- package/rules/all-caps-shouting.yaml +2 -2
- package/rules/bold-emphasis.yaml +5 -4
- package/rules/bold-label-list.yaml +6 -6
- package/rules/closing-cliche.yaml +4 -5
- package/rules/closing-exhortation.yaml +74 -0
- package/rules/cold-open.yaml +95 -0
- package/rules/colon-lead-in.yaml +68 -10
- package/rules/comparative-without-baseline.yaml +2 -2
- package/rules/concrete-evidence-density.yaml +2 -2
- package/rules/contraction-consistency.yaml +2 -2
- package/rules/contrast-framing.yaml +16 -13
- package/rules/dangling-reference.yaml +2 -2
- package/rules/date-format-consistency.yaml +2 -2
- package/rules/duplicate-definition.yaml +2 -2
- package/rules/duplicate-heading.yaml +5 -2
- package/rules/email-greeting-closing.yaml +2 -2
- package/rules/email-stock-courtesy.yaml +62 -0
- package/rules/fullwidth-alnum-consistency.yaml +2 -2
- package/rules/generic-opening.yaml +63 -0
- package/rules/heading-level-skip.yaml +2 -2
- package/rules/heading-numbering-mix.yaml +20 -20
- package/rules/honesty-marker.yaml +84 -0
- package/rules/hyphen-as-dash.yaml +2 -2
- package/rules/kutoten-consistency.yaml +4 -4
- package/rules/latin-spacing.yaml +6 -4
- package/rules/list-item-form-mix.yaml +2 -2
- package/rules/max-kanji-continuous.yaml +7 -3
- package/rules/max-paragraph-length.yaml +2 -2
- package/rules/max-sentence-length.yaml +6 -2
- package/rules/missing-final-period.yaml +2 -2
- package/rules/name-variant.yaml +5 -2
- package/rules/ngram-repetition.yaml +2 -2
- package/rules/no-doubled-joshi.yaml +2 -2
- package/rules/no-em-dash.yaml +2 -2
- package/rules/no-mixed-desumasu.yaml +16 -3
- package/rules/nominalization.yaml +1 -1
- package/rules/numbering-gap.yaml +2 -2
- package/rules/one-sentence-paragraph-run.yaml +2 -2
- package/rules/orthographic-variant.yaml +2 -2
- package/rules/over-general-claim.yaml +2 -2
- package/rules/oxford-comma-consistency.yaml +15 -3
- package/rules/proper-noun-density.yaml +14 -7
- package/rules/quote-without-source.yaml +2 -2
- package/rules/request-without-deadline.yaml +2 -2
- package/rules/requirement-smell.yaml +2 -2
- package/rules/rule-of-three.yaml +3 -3
- package/rules/section-length-uniformity.yaml +2 -2
- package/rules/spelling-consistency.yaml +4 -4
- package/rules/teki-overuse.yaml +2 -2
- package/rules/topic-predicate-distance.yaml +3 -2
- package/rules/undefined-acronym.yaml +9 -2
- package/rules/undefined-term.yaml +2 -2
- package/rules/unfilled-placeholder.yaml +2 -2
- package/rules/unknown-word.yaml +2 -2
- package/rules/unprompted-denial.yaml +88 -0
- package/rules/unqualified-superlative.yaml +8 -2
- package/skills/chaff/SKILL.md +39 -6
- package/src/acronym-expansion.ts +57 -0
- package/src/ai-score/human-shares.ts +54 -12
- package/src/ai-score/of-document.ts +5 -2
- package/src/alternative-words.ts +15 -0
- package/src/body-section.ts +11 -2
- package/src/capitals-with-small.ts +16 -0
- package/src/checks.ts +32 -1
- package/src/cli-args.ts +1 -1
- package/src/cli-text.ts +4 -0
- package/src/closing-code.ts +21 -0
- package/src/commands/fix-plan.ts +72 -5
- package/src/commands/test.ts +18 -2
- package/src/date-format.ts +54 -7
- package/src/detectors/acronym-context.ts +23 -4
- package/src/detectors/acronym-expansion.ts +26 -0
- package/src/detectors/acronym-gloss.ts +123 -0
- package/src/detectors/acronym-mention.ts +17 -0
- package/src/detectors/acronym-name.ts +40 -3
- package/src/detectors/acronym-series.ts +27 -0
- package/src/detectors/ai-phrasing.ts +18 -17
- package/src/detectors/ai-structure.ts +23 -6
- package/src/detectors/alnum-number.ts +8 -3
- package/src/detectors/bare-comparative.ts +41 -13
- package/src/detectors/blank-runs.ts +30 -0
- package/src/detectors/bold-emphasis-form.ts +58 -0
- package/src/detectors/bold-emphasis.ts +16 -17
- package/src/detectors/bold-label.ts +22 -6
- package/src/detectors/capitalised-term.ts +36 -9
- package/src/detectors/caps-caption.ts +24 -2
- package/src/detectors/char-shape.ts +118 -29
- package/src/detectors/chat-log-line.ts +17 -0
- package/src/detectors/citation-string.ts +93 -0
- package/src/detectors/closing-cliche.ts +74 -0
- package/src/detectors/closing-exhortation.ts +74 -0
- package/src/detectors/cold-open.ts +145 -0
- package/src/detectors/comparative-context.ts +74 -0
- package/src/detectors/concrete-evidence-density.ts +99 -0
- package/src/detectors/concrete-evidence.ts +40 -0
- package/src/detectors/contraction-emphasis.ts +46 -0
- package/src/detectors/contraction-mention.ts +52 -6
- package/src/detectors/contraction-mix.ts +94 -0
- package/src/detectors/contrast-frame.ts +65 -7
- package/src/detectors/coordinate-adjective.ts +4 -2
- package/src/detectors/date-format.ts +18 -2
- package/src/detectors/duplicate-definition.ts +21 -0
- package/src/detectors/duplicate-heading.ts +44 -15
- package/src/detectors/email-frame-words.ts +39 -0
- package/src/detectors/email-letter.ts +15 -20
- package/src/detectors/final-period-captions.ts +78 -0
- package/src/detectors/fullwidth-alnum.ts +24 -4
- package/src/detectors/gram-furniture.ts +87 -1
- package/src/detectors/gram-openers.ts +71 -0
- package/src/detectors/gram-predicate.ts +49 -6
- package/src/detectors/gram-repetition.ts +199 -0
- package/src/detectors/heading-level-skip.ts +31 -1
- package/src/detectors/heading-numbering.ts +2 -2
- package/src/detectors/heading-sentences.ts +36 -0
- package/src/detectors/hyphen-copied-text.ts +65 -0
- package/src/detectors/kanji-name-edge.ts +31 -0
- package/src/detectors/kanji-run-pieces.ts +26 -0
- package/src/detectors/kutoten-consistency.ts +24 -4
- package/src/detectors/lead-in-dash.ts +11 -0
- package/src/detectors/letter-joined-name.ts +14 -0
- package/src/detectors/lexicon.ts +20 -63
- package/src/detectors/list-item.ts +37 -1
- package/src/detectors/list-items.ts +4 -1
- package/src/detectors/list-joint.ts +44 -0
- package/src/detectors/list-layout.ts +39 -0
- package/src/detectors/list-lead-in.ts +88 -7
- package/src/detectors/list-parallel.ts +119 -13
- package/src/detectors/list-run.ts +86 -0
- package/src/detectors/list-sentence.ts +11 -0
- package/src/detectors/mark-shape.ts +12 -7
- package/src/detectors/missing-final-period.ts +9 -1
- package/src/detectors/name-run.ts +2 -1
- package/src/detectors/name-variant-two-things.ts +136 -0
- package/src/detectors/name-variant.ts +14 -19
- package/src/detectors/numbering-readings.ts +10 -2
- package/src/detectors/open-end-anaphor.ts +31 -0
- package/src/detectors/open-end-lead.ts +46 -0
- package/src/detectors/open-end-scope.ts +8 -1
- package/src/detectors/ordinal-run-gaps.ts +1 -1
- package/src/detectors/organisation-run.ts +26 -2
- package/src/detectors/orthographic-variant-open.ts +124 -0
- package/src/detectors/orthographic-variant.ts +82 -82
- package/src/detectors/orthography.ts +20 -7
- package/src/detectors/over-general-claim.ts +106 -5
- package/src/detectors/oxford-comma.ts +68 -28
- package/src/detectors/particle-run-names.ts +17 -0
- package/src/detectors/placeholder-text.ts +21 -4
- package/src/detectors/proper-noun-density.ts +109 -0
- package/src/detectors/quote-without-source.ts +52 -10
- package/src/detectors/quoted-excerpt.ts +68 -0
- package/src/detectors/reference-entry.ts +42 -0
- package/src/detectors/register-neutral-shape.ts +26 -6
- package/src/detectors/register-separate-part.ts +42 -0
- package/src/detectors/register-set-apart.ts +124 -0
- package/src/detectors/register-voice.ts +63 -0
- package/src/detectors/register.ts +15 -0
- package/src/detectors/registry/closing-cliche.ts +4 -0
- package/src/detectors/registry/closing-exhortation.ts +4 -0
- package/src/detectors/registry/cold-open.ts +4 -0
- package/src/detectors/registry/colon-lead-in.ts +1 -1
- package/src/detectors/registry/concrete-evidence.ts +1 -1
- package/src/detectors/registry/contraction-mix.ts +1 -1
- package/src/detectors/registry/duplicate-definition.ts +1 -1
- package/src/detectors/registry/ngram-repetition.ts +1 -1
- package/src/detectors/registry/proper-noun-density.ts +1 -1
- package/src/detectors/registry/topic-predicate-distance.ts +1 -1
- package/src/detectors/registry/unprompted-denial.ts +4 -0
- package/src/detectors/reproduced-text.ts +33 -0
- package/src/detectors/request-owner.ts +31 -8
- package/src/detectors/requirement-smell.ts +21 -5
- package/src/detectors/sentence-counts.ts +27 -7
- package/src/detectors/sentence-ending.ts +66 -14
- package/src/detectors/sentence-length.ts +43 -11
- package/src/detectors/sentence-load.ts +3 -6
- package/src/detectors/sentence-parts.ts +73 -0
- package/src/detectors/sentence-title.ts +14 -0
- package/src/detectors/signals.ts +20 -202
- package/src/detectors/spelling-variety.ts +26 -2
- package/src/detectors/structure-tree.ts +5 -9
- package/src/detectors/structure.ts +47 -19
- package/src/detectors/superlative-clause.ts +21 -2
- package/src/detectors/superlative-context.ts +99 -0
- package/src/detectors/superlative-scope.ts +27 -9
- package/src/detectors/team.ts +1 -50
- package/src/detectors/titled-code-citation.ts +19 -0
- package/src/detectors/titled-run.ts +22 -5
- package/src/detectors/token-shape.ts +40 -18
- package/src/detectors/topic-predicate-distance.ts +25 -0
- package/src/detectors/undefined-term.ts +26 -1
- package/src/detectors/unfilled-placeholder.ts +20 -2
- package/src/detectors/unknown-word-context.ts +129 -0
- package/src/detectors/unknown-word.ts +29 -20
- package/src/detectors/unprompted-denial.ts +133 -0
- package/src/document-sections.ts +3 -1
- package/src/fix-plan/all-signs.ts +35 -0
- package/src/fix-plan/plan.ts +50 -3
- package/src/fix-plan/render.ts +41 -3
- package/src/fix-plan/risen.ts +13 -0
- package/src/fix-plan/text.ts +56 -2
- package/src/heading-numbering.ts +44 -10
- package/src/html/html-site-chrome.ts +9 -2
- package/src/latin-spacing-source.ts +33 -0
- package/src/law-title.ts +38 -0
- package/src/name-ending-run.ts +49 -0
- package/src/name-separator.ts +4 -1
- package/src/name-title-slip.ts +59 -0
- package/src/name-variant-shapes.ts +58 -0
- package/src/name-word-use.ts +17 -0
- package/src/opening-passage.ts +31 -0
- package/src/paragraph-length.ts +31 -0
- package/src/paragraph-runs.ts +71 -13
- package/src/plugin.ts +2 -0
- package/src/quote-echo.ts +18 -0
- package/src/quote-gloss.ts +11 -0
- package/src/quoted-spelling.ts +48 -0
- package/src/render/semantic.ts +2 -2
- package/src/rule-of-three.ts +50 -0
- package/src/run-semantic.ts +2 -2
- package/src/section-levels.ts +98 -0
- package/src/semantic.ts +16 -3
- package/src/sentence-load.ts +5 -3
- package/src/set-phrase-particles.ts +32 -0
- package/src/spelling.ts +37 -7
- package/src/structure/alternative-clause.ts +32 -7
- package/src/structure/cited-document-section.ts +24 -1
- package/src/structure/issues.ts +29 -10
- package/src/structure/numbering.ts +50 -3
- package/src/structure/unread-label.ts +74 -0
- package/src/structure-shape/template-outline.ts +34 -0
- package/src/title-case-name.ts +55 -0
- package/src/topic-clause.ts +110 -5
- package/src/word-use.ts +57 -6
- package/dist/legal-address.d.ts +0 -2
- package/dist/legal-address.d.ts.map +0 -1
- package/dist/legal-address.js +0 -16
- package/dist/legal-address.js.map +0 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { ROMAN_NUMERAL, romanRangeOf } from "./roman-numeral.ts";
|
|
2
2
|
import { citationKeySpans } from "./citation-key.ts";
|
|
3
3
|
import { dottedNameSpans } from "./dotted-name.ts";
|
|
4
|
-
import { letterJoinedNameSpans } from "./letter-joined-name.ts";
|
|
4
|
+
import { capitalJoinedNameSpans, letterJoinedNameSpans } from "./letter-joined-name.ts";
|
|
5
5
|
import { loneNumeralSpans, nameNumeralSpans } from "./name-numeral.ts";
|
|
6
6
|
import { placeholderSpans } from "./placeholder.ts";
|
|
7
7
|
import { numeralWordSpans } from "./numeral-word.ts";
|
|
8
8
|
import { seriesLabelSpans } from "./series-label.ts";
|
|
9
|
-
import { nameSpansOf, oneOf } from "./acronym-name.ts";
|
|
9
|
+
import { nameSpansOf, oneOf, postalAddressSpans } from "./acronym-name.ts";
|
|
10
10
|
import { grammarSpans } from "./abnf-grammar.ts";
|
|
11
11
|
import { outlineLabelSpans } from "./outline-label.ts";
|
|
12
12
|
import { referenceListSpans } from "../reference-lists.ts";
|
|
13
13
|
import { linkTitleSpans } from "./acronym-link.ts";
|
|
14
14
|
import { citationNoteSpans } from "./citation-note.ts";
|
|
15
15
|
import { documentCitationSpans } from "./case-citation.ts";
|
|
16
|
+
import { referenceEntrySpans } from "./reference-entry.ts";
|
|
17
|
+
import { chatLogSpans } from "./chat-log-line.ts";
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* 大文字の語が略語ではなく、決まった書き方の一部として読める所(3:30 PM、1pm ET、USD 1,000、Kansas City, MO 64108、Fort Lauderdale FL 33304)。
|
|
@@ -39,6 +41,8 @@ export type NotationWords = {
|
|
|
39
41
|
readonly titles: readonly string[];
|
|
40
42
|
/** 日付・時刻の数字の後ろに書く単位(年、月、日、時、分)。その前の同じ大文字の繰り返し(YY年)は書式の置き場所。 */
|
|
41
43
|
readonly dateTimeUnits: readonly string[];
|
|
44
|
+
/** ショートメッセージでキーワードを送る動詞(text GNPCGS to 333111 の text)。 */
|
|
45
|
+
readonly textMessageVerbs?: readonly string[];
|
|
42
46
|
};
|
|
43
47
|
|
|
44
48
|
const MINUTES = String.raw`:[0-5]\d`;
|
|
@@ -96,6 +100,13 @@ const titledName = (titles: string): readonly RegExp[] => [
|
|
|
96
100
|
const placeAndState = (states: string): RegExp =>
|
|
97
101
|
new RegExp(String.raw`(?<=\p{Lu}\p{Ll}[\p{L}'’.-]*,\s+)${states}(?=[ \t]*(?:\r?\n|$)|[,.;:)\]!?]|\s+\p{Ll})`, "gu");
|
|
98
102
|
|
|
103
|
+
/**
|
|
104
|
+
* ショートメッセージで送るキーワード(texting GNPCGS to 333111)。動詞と短い番号の間の大文字は、そのまま打ち込む文字列。
|
|
105
|
+
* 番号は短縮番号の桁(4 から 6 桁)で、動詞の無い「GDP to 3000」は略語のまま数える。
|
|
106
|
+
*/
|
|
107
|
+
const textMessageKeyword = (verbs: readonly string[]): RegExp =>
|
|
108
|
+
new RegExp(String.raw`(?<![\p{L}\p{N}_])${oneOf(verbs)}\s+["“']?[A-Z][A-Z0-9]+["”']?\s+to\s+\d{4,6}(?!\d)`, "giu");
|
|
109
|
+
|
|
99
110
|
/** メールアドレス(OASH-RFI@hhs.gov)。@ の前の大文字は宛先の名前で、略語ではない。 */
|
|
100
111
|
const EMAIL_ADDRESS = /(?<![\p{L}\p{N}._%+-])[\p{L}\p{N}._%+-]+@[\p{L}\p{N}-]+(?:\.[\p{L}\p{N}-]+)+/gu;
|
|
101
112
|
|
|
@@ -112,6 +123,7 @@ const patternsOf = (words: NotationWords): readonly RegExp[] => [
|
|
|
112
123
|
new RegExp(String.raw`(?<![\p{L}\p{N}_])${oneOf(words.honorifics)}\s+${SURNAME_IN_CAPITALS}`, "gu"),
|
|
113
124
|
capitalHonorific(words.honorifics),
|
|
114
125
|
...titledName(oneOf(words.titles)),
|
|
126
|
+
textMessageKeyword(words.textMessageVerbs ?? []),
|
|
115
127
|
EMAIL_ADDRESS,
|
|
116
128
|
];
|
|
117
129
|
|
|
@@ -128,6 +140,7 @@ export const notAcronymSpansOf = (words: NotationWords): NotAcronymSpans => {
|
|
|
128
140
|
...citationKeySpans(text),
|
|
129
141
|
...dottedNameSpans(text),
|
|
130
142
|
...letterJoinedNameSpans(text),
|
|
143
|
+
...capitalJoinedNameSpans(text),
|
|
131
144
|
...nameNumeralSpans(text),
|
|
132
145
|
...loneNumeralSpans(text),
|
|
133
146
|
...seriesLabelSpans(text),
|
|
@@ -151,6 +164,7 @@ export const lexiconNotationOf = (wordsOf: (id: string) => string[]): NotAcronym
|
|
|
151
164
|
honorifics: wordsOf("honorific"),
|
|
152
165
|
titles: wordsOf("name-title"),
|
|
153
166
|
dateTimeUnits: wordsOf("date-time-unit"),
|
|
167
|
+
textMessageVerbs: wordsOf("text-message-verb"),
|
|
154
168
|
});
|
|
155
169
|
const names = nameSpansOf({
|
|
156
170
|
legalForms: wordsOf("legal-form"),
|
|
@@ -161,19 +175,22 @@ export const lexiconNotationOf = (wordsOf: (id: string) => string[]): NotAcronym
|
|
|
161
175
|
namePrefixes: wordsOf("name-prefix"),
|
|
162
176
|
streetSuffixes: wordsOf("street-suffix"),
|
|
163
177
|
capitalPhrases: wordsOf("capital-phrase"),
|
|
178
|
+
productNames: wordsOf("product-name"),
|
|
164
179
|
});
|
|
165
180
|
return (text) => [...notation(text), ...names(text)];
|
|
166
181
|
};
|
|
167
182
|
|
|
168
|
-
/** 文書全体で読む、略語として数えない範囲。文献一覧の誌名や会議名、番号の付いた区切りの見出し、ABNF
|
|
183
|
+
/** 文書全体で読む、略語として数えない範囲。文献一覧の誌名や会議名、番号の付いた区切りの見出し、ABNF の文法、文に切れ目の入る所在地(Rd. NE)。 */
|
|
169
184
|
export const sourceNotAcronymSpans = (source: string, wordsOf: (id: string) => string[]): Span[] => [
|
|
185
|
+
...postalAddressSpans(source, wordsOf("street-suffix"), wordsOf("us-state-code")),
|
|
170
186
|
...referenceListSpans(source, wordsOf("reference-list-heading")),
|
|
171
187
|
...outlineLabelSpans(source, wordsOf("numbered-division")),
|
|
172
188
|
...grammarSpans(source),
|
|
173
189
|
];
|
|
174
190
|
|
|
175
191
|
/**
|
|
176
|
-
*
|
|
192
|
+
* 数には入れるが指さない略語の範囲。リンク先の題名、文献を引いて始まる注、判例の引用の当事者・裁判所・事件番号、
|
|
193
|
+
* 角括弧の見出しで始まる文献の項目([FETCH] WHATWG, "Fetch")、貼り付けたチャットの発言(<jinxer-wm> FIRING: …)は、書き手が直せない。
|
|
177
194
|
*/
|
|
178
195
|
export const unreportedAcronymSpans = (
|
|
179
196
|
source: string,
|
|
@@ -184,4 +201,6 @@ export const unreportedAcronymSpans = (
|
|
|
184
201
|
...linkTitleSpans(source, links),
|
|
185
202
|
...citationNoteSpans(source, sentences, wordsOf("citation-author-joiner")),
|
|
186
203
|
...documentCitationSpans(sentences, source, wordsOf("case-party-joiner")),
|
|
204
|
+
...referenceEntrySpans(source),
|
|
205
|
+
...chatLogSpans(source),
|
|
187
206
|
];
|
|
@@ -13,6 +13,7 @@ import { escapeRegExp } from "../orthography.ts";
|
|
|
13
13
|
* 人事部(以下「HR」という。) 括弧の中が定義の語と略語だけ
|
|
14
14
|
* overnight reverse repurchase agreement (ON RRP) 括弧の中が空白で繋いだ略語だけで、前の名前から文字が順に拾える
|
|
15
15
|
* Partnership On Wide Energy and Resources Resilience Asia (POWERR Asia) 括弧の中が略語と添えた語で、前の名前の頭文字と揃う
|
|
16
|
+
* Regional Alliances and Multistakeholder Partnerships to Stimulate … (RAMPS program) 括弧の中が略語と小文字の語で、前の名前の頭の頭文字と揃う
|
|
16
17
|
* End User Technical Advisory Board (“End User TAB”) 括弧の中が名前の頭の語と略語で、前の名前の頭文字と揃う
|
|
17
18
|
* Special Interest Groups, or SIGs 名前の後ろの読点と言い換えの語(語彙表の definition-alternative)の後ろで、名前の頭文字と揃う
|
|
18
19
|
* Department of Health and Human Services (HHS or the Department) 括弧の最初の項目が略語で、言い換えの語の後ろに別の呼び名を添え、直前の語の頭文字と揃う
|
|
@@ -201,6 +202,30 @@ const isQualifiedAt = (body: string, acronym: string, at: number): boolean => {
|
|
|
201
202
|
return spellsOut(name.endsWith(words) ? name.slice(0, -words.length) : name, acronym);
|
|
202
203
|
};
|
|
203
204
|
|
|
205
|
+
/** 括弧の中で略語に添えた、小文字の 1、2 語((RAMPS program))と、閉じる括弧。 */
|
|
206
|
+
const LOWER_QUALIFIER = new RegExp(String.raw`^(?: \p{Ll}+){1,2}${WRAP}[))]`, "u");
|
|
207
|
+
|
|
208
|
+
/** 名前の頭から拾う略語の文字数の下限。2 字は名前の途中の頭文字にたまたま揃いやすい。 */
|
|
209
|
+
const MIN_HEAD_LETTERS = 3;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* 括弧の中が略語と、それが何かを言う小文字の語だけの形(Regional Alliances and Multistakeholder Partnerships to Stimulate
|
|
213
|
+
* Cybersecurity Education and Workforce Development (RAMPS program))。略語は名前の頭の部分だけを縮めることがあるので、前の名前の
|
|
214
|
+
* 大文字で始まる語の頭文字の中に、略語の文字が続けて現れるときだけ展開と見なす。
|
|
215
|
+
*/
|
|
216
|
+
const isLowerQualifiedAt = (body: string, acronym: string, at: number): boolean => {
|
|
217
|
+
const letters = lettersOf(acronym);
|
|
218
|
+
if (letters.length < MIN_HEAD_LETTERS || !OPENED.test(body.slice(Math.max(0, at - NEAR), at))) return false;
|
|
219
|
+
if (!LOWER_QUALIFIER.test(body.slice(at + acronym.length, at + acronym.length + DEFINITION_REACH))) return false;
|
|
220
|
+
const words = body
|
|
221
|
+
.slice(0, at)
|
|
222
|
+
.replace(ANY_OPENED, "")
|
|
223
|
+
.trim()
|
|
224
|
+
.split(/\s+/u)
|
|
225
|
+
.slice(-letters.length * 3);
|
|
226
|
+
return initialsOf(words).includes(letters);
|
|
227
|
+
};
|
|
228
|
+
|
|
204
229
|
/** 括弧の中で略語の前に置いた、大文字で始まる語((“End User TAB”) の End User)。 */
|
|
205
230
|
const PREFIX = new RegExp(String.raw`[((]${WRAP}(?<words>(?:[A-Z][a-z]+ )+)$`, "u");
|
|
206
231
|
|
|
@@ -239,6 +264,7 @@ const isBracketedAt = (body: string, acronym: string, at: number): boolean => {
|
|
|
239
264
|
isNamedBeforeAt(body, acronym, at) ||
|
|
240
265
|
isJointBracketedAt(body, acronym, at) ||
|
|
241
266
|
isQualifiedAt(body, acronym, at) ||
|
|
267
|
+
isLowerQualifiedAt(body, acronym, at) ||
|
|
242
268
|
isPrefixedAt(body, acronym, at) ||
|
|
243
269
|
isSuffixedAt(body, acronym, at)
|
|
244
270
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// An acronym the document explains without the "Name (ACR)" form. Pure.
|
|
2
|
+
import { numberedSeries } from "./acronym-series.ts";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* "The VIX—a forward-looking measure of near-term stock market volatility—declined": an apposition between dashes right
|
|
@@ -32,3 +33,125 @@ export const headingsSpellingOut = (headings: readonly string[]): ((acronym: str
|
|
|
32
33
|
const spelled = new Set(headings.flatMap((heading) => spelledBy(heading) ?? []));
|
|
33
34
|
return (acronym) => spelled.has(acronym.replaceAll(/[^A-Z]/gu, ""));
|
|
34
35
|
};
|
|
36
|
+
|
|
37
|
+
/** The longest acronym read as spelled out in a sentence; a run of name words stops being followed past it. */
|
|
38
|
+
const MAX_SPELLED = 10;
|
|
39
|
+
/** A word that can be part of a name: a capital first, then letters, apostrophes, dots or hyphens (Nat'l, Comm'n, U.S.). */
|
|
40
|
+
const NAME_WORD = /^\p{Lu}[\p{L}'’.-]*$/u;
|
|
41
|
+
/** Marks before a word that are not part of it, and that open a new phrase: brackets and quotes. */
|
|
42
|
+
const OPENING_MARKS = /^[([“‘"']+/u;
|
|
43
|
+
const CLOSING_MARKS: ReadonlySet<string> = new Set(")]”’\"',.;:!?");
|
|
44
|
+
|
|
45
|
+
const withoutClosingMarks = (word: string): string => {
|
|
46
|
+
const characters = [...word];
|
|
47
|
+
return characters.slice(0, characters.findLastIndex((character) => !CLOSING_MARKS.has(character)) + 1).join("");
|
|
48
|
+
};
|
|
49
|
+
/** Punctuation after a word that ends the name it is in ("Administration,", "Mass.:"). The dot of an initialism (U.S.) does too. */
|
|
50
|
+
const NAME_BREAK = /[)\]”’",;:!?.]$/u;
|
|
51
|
+
/**
|
|
52
|
+
* A bracket opened right after the name, or after more words of it, and still open at the acronym (Services (HHS and the
|
|
53
|
+
* Department), Agency for Health (ARPA-H program), Agreement (hereinafter "SLA")): that is the bracketed expansion, which the
|
|
54
|
+
* expansion reader decides, with its own conditions.
|
|
55
|
+
*/
|
|
56
|
+
const BRACKET_AFTER_NAME = /^[\s\p{L}'’.&-]*[((][^))]*$/u;
|
|
57
|
+
const SPELLED_ACRONYM = new RegExp(String.raw`(?<![\p{L}\p{N}_&])[A-Z]{${MIN_SPELLED},${MAX_SPELLED}}(?![\p{L}\p{N}_&])`, "gu");
|
|
58
|
+
|
|
59
|
+
type SentenceWord = { readonly core: string; readonly end: number; readonly opens: boolean; readonly closes: boolean };
|
|
60
|
+
|
|
61
|
+
const sentenceWords = (sentence: string): SentenceWord[] =>
|
|
62
|
+
[...sentence.matchAll(/\S+/gu)].map((match) => {
|
|
63
|
+
const core = withoutClosingMarks(match[0].replace(OPENING_MARKS, ""));
|
|
64
|
+
const leading = match[0].length - match[0].replace(OPENING_MARKS, "").length;
|
|
65
|
+
return { core, end: match.index + leading + core.length, opens: leading > 0, closes: NAME_BREAK.test(match[0]) };
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/** Initials and where they end, for the runs of name words that start at `from`. Small words join a run, never open or close one. */
|
|
69
|
+
type Spelled = { readonly letters: string; readonly end: number };
|
|
70
|
+
|
|
71
|
+
// A loop that stops at the run's end: slicing the rest of the sentence for every word would be quadratic in a long one.
|
|
72
|
+
const runsFrom = (words: readonly SentenceWord[], from: number): Spelled[] => {
|
|
73
|
+
const runs: Spelled[] = [];
|
|
74
|
+
const letters: string[] = [];
|
|
75
|
+
for (let index = from; index < words.length && letters.length < MAX_SPELLED; index += 1) {
|
|
76
|
+
const word = words[index];
|
|
77
|
+
if (word === undefined || (index > from && word.opens)) break;
|
|
78
|
+
const named = NAME_WORD.test(word.core);
|
|
79
|
+
if (!named && (index === from || !JOINERS.has(word.core))) break;
|
|
80
|
+
if (named) letters.push(word.core.charAt(0));
|
|
81
|
+
if (named && letters.length >= MIN_SPELLED) runs.push({ letters: letters.join(""), end: word.end });
|
|
82
|
+
if (word.closes) break;
|
|
83
|
+
}
|
|
84
|
+
return runs;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Acronyms whose name is written out earlier in the same sentence, without brackets: a citation names the publisher and then
|
|
89
|
+
* gives its short name ("U.S. Small Business Administration, … (Washington: SBA, August)", "(Nat'l Indian Gaming Comm'n May
|
|
90
|
+
* 30, 2002) (NIGC Final Order)"). The name must give the acronym's letters word for word, and come before the acronym's first
|
|
91
|
+
* use: a name written out only after the reader has met the acronym, or in another sentence, does not explain it.
|
|
92
|
+
*/
|
|
93
|
+
export const spelledInSentence = (sentences: readonly string[]): ReadonlySet<string> => {
|
|
94
|
+
const seen = new Set<string>();
|
|
95
|
+
const spelledFirst = new Set<string>();
|
|
96
|
+
sentences.forEach((sentence) => {
|
|
97
|
+
const acronyms = [...sentence.matchAll(SPELLED_ACRONYM)].filter((match) => !seen.has(match[0]));
|
|
98
|
+
if (acronyms.length === 0) return;
|
|
99
|
+
const words = sentenceWords(sentence);
|
|
100
|
+
const spelled = words.flatMap((_, index) => runsFrom(words, index));
|
|
101
|
+
acronyms.forEach((match) => {
|
|
102
|
+
if (seen.has(match[0])) return;
|
|
103
|
+
seen.add(match[0]);
|
|
104
|
+
const spelledBefore = (name: Spelled): boolean =>
|
|
105
|
+
name.letters === match[0] && name.end <= match.index && !BRACKET_AFTER_NAME.test(sentence.slice(name.end, match.index));
|
|
106
|
+
if (spelled.some(spelledBefore)) spelledFirst.add(match[0]);
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
return spelledFirst;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/** An acronym, and the noun after it when it is used as a modifier ("IR plans"). */
|
|
113
|
+
const MODIFIER_ACRONYM = /(?<![\p{L}\p{N}_&])(?<acronym>[A-Z]{2,10})(?![\p{L}\p{N}_&])(?:\s+(?<noun>\p{Ll}+))?/gu;
|
|
114
|
+
|
|
115
|
+
/** A noun without its plural ending: "plans" and "plan" are one noun. */
|
|
116
|
+
const singularOf = (word: string): string => word.toLowerCase().replace(/(?:es|s)$/u, "");
|
|
117
|
+
|
|
118
|
+
/** Whether the words before index, ending with the noun, spell the acronym in lower case ("incident response plan" → IR plan). */
|
|
119
|
+
const spellsBeforeNoun = (words: readonly string[], index: number, acronym: string, noun: string): boolean => {
|
|
120
|
+
const name = words.slice(index - acronym.length, index);
|
|
121
|
+
return (
|
|
122
|
+
name.length === acronym.length &&
|
|
123
|
+
name.every((word) => /^\p{Ll}+$/u.test(word)) &&
|
|
124
|
+
name.map((word) => word.charAt(0)).join("") === acronym.toLowerCase() &&
|
|
125
|
+
singularOf(words[index] ?? "") === singularOf(noun)
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Acronyms written out in lower case earlier in the same sentence, before the same noun ("Have an incident response plan
|
|
131
|
+
* and use it: … exercise IR plans"). The repeated noun ties the two: two letters alone are spelled by chance too often.
|
|
132
|
+
*/
|
|
133
|
+
export const spelledBeforeSameNoun = (sentences: readonly string[]): ReadonlySet<string> => {
|
|
134
|
+
const seen = new Set<string>();
|
|
135
|
+
const spelled = new Set<string>();
|
|
136
|
+
sentences.forEach((sentence) => {
|
|
137
|
+
[...sentence.matchAll(MODIFIER_ACRONYM)].forEach((match) => {
|
|
138
|
+
const acronym = match.groups?.["acronym"] ?? "";
|
|
139
|
+
const noun = match.groups?.["noun"];
|
|
140
|
+
if (seen.has(acronym)) return;
|
|
141
|
+
seen.add(acronym);
|
|
142
|
+
if (noun === undefined) return;
|
|
143
|
+
const words = sentenceWords(sentence.slice(0, match.index)).map((word) => word.core);
|
|
144
|
+
if (words.some((_, index) => spellsBeforeNoun(words, index, acronym, noun))) spelled.add(acronym);
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
return spelled;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The acronyms the text explains without brackets: glossed between dashes, named earlier in the sentence (capitalised, or in
|
|
152
|
+
* lower case before the same noun), or a series cited by number.
|
|
153
|
+
*/
|
|
154
|
+
export const explainedInText = (body: string, sentences: readonly { readonly text: string }[]): ReadonlySet<string> => {
|
|
155
|
+
const texts = sentences.map((sentence) => sentence.text);
|
|
156
|
+
return new Set([...glossedAcronyms(body), ...spelledInSentence(texts), ...spelledBeforeSameNoun(texts), ...numberedSeries(body)]);
|
|
157
|
+
};
|
|
@@ -42,3 +42,20 @@ export const caseVariantsIn = (text: string, acronym: string): string[] => {
|
|
|
42
42
|
const variants = [...text.matchAll(written)].map((match) => match[0]);
|
|
43
43
|
return [...new Set(variants)].filter((variant) => variant !== acronym && (variant.match(CAPITAL) ?? []).length >= MIN_CAPITALS);
|
|
44
44
|
};
|
|
45
|
+
|
|
46
|
+
/** A name in capitals that the text also writes as a word is that word set in capitals; short capitals (IT, It) are left alone. */
|
|
47
|
+
const MIN_WORD_LETTERS = 4;
|
|
48
|
+
/** Before a word inside a sentence: a lower-case word, a number, a comma or a slash, not a sentence's or a line's start (Its, It). */
|
|
49
|
+
const INSIDE_SENTENCE = /(?:[\p{Ll}\p{N},;&)][ \t]+|[/(][ \t]*)$/u;
|
|
50
|
+
const LOOK_BEHIND = 4;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Whether the text writes the acronym's letters as a word with only its first letter a capital, inside a sentence (AIRBNB
|
|
54
|
+
* beside "a hotel / Airbnb"). The capitals are then the name written loud, not an acronym with an expansion.
|
|
55
|
+
*/
|
|
56
|
+
export const writtenAsWordIn = (text: string, acronym: string): boolean => {
|
|
57
|
+
if (!/^\p{Lu}+$/u.test(acronym) || Array.from(acronym).length < MIN_WORD_LETTERS) return false;
|
|
58
|
+
const word = `${acronym.slice(0, 1)}${acronym.slice(1).toLowerCase()}`;
|
|
59
|
+
const written = new RegExp(String.raw`(?<![\p{L}\p{N}])${escapeRegExp(word)}(?![\p{L}\p{N}])`, "gu");
|
|
60
|
+
return [...text.matchAll(written)].some((match) => INSIDE_SENTENCE.test(text.slice(Math.max(0, match.index - LOOK_BEHIND), match.index)));
|
|
61
|
+
};
|
|
@@ -26,6 +26,8 @@ export type NameWords = {
|
|
|
26
26
|
readonly streetSuffixes: readonly string[];
|
|
27
27
|
/** 大文字で書く決まり文句(NOW, THEREFORE、AND/OR)。句のままでだけ外す。OR だけなら Oregon でもある。 */
|
|
28
28
|
readonly capitalPhrases: readonly string[];
|
|
29
|
+
/** 大文字で終わる製品の名前(Acrobat Reader DC)。名前のまま書いたときだけ外す。DC だけなら略語。 */
|
|
30
|
+
readonly productNames?: readonly string[];
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
const EDGE_BEFORE = String.raw`(?<![\p{L}\p{N}_&])`;
|
|
@@ -93,14 +95,25 @@ const CURRENCY_PREFIX = new RegExp(String.raw`${EDGE_BEFORE}\p{Lu}{1,3}(?=[$€
|
|
|
93
95
|
|
|
94
96
|
export const currencySymbolSpans = (text: string): Span[] => spansOf(text, CURRENCY_PREFIX);
|
|
95
97
|
|
|
98
|
+
/** 登録商標や商標の印のすぐ前の大文字(Acrobat DC®、XYZ™)。製品の名前の部品で、略語ではない。 */
|
|
99
|
+
const TRADEMARKED = new RegExp(String.raw`${EDGE_BEFORE}\p{Lu}{2,}(?=[®™])`, "gu");
|
|
100
|
+
|
|
101
|
+
export const trademarkSpans = (text: string): Span[] => spansOf(text, TRADEMARKED);
|
|
102
|
+
|
|
96
103
|
/**
|
|
97
|
-
* 引用の形の中の、法令の名前(45 CFR Parts 160、CFR §164.524、21 USC §301、22 CCR §§ 12701、94/820/EC)。後ろに条(§、Part、
|
|
98
|
-
* 番号)があるか、/
|
|
104
|
+
* 引用の形の中の、法令の名前(45 CFR Parts 160、CFR §164.524、21 USC §301、44 USC. 3502、22 CCR §§ 12701、94/820/EC)。後ろに条(§、Part、
|
|
105
|
+
* 番号)があるか、/ で繋いだ番号の後ろのときだけ。名前の後ろの点(USC.)は略しの印で、条の前に書いてもよい。§ の前には大文字で始まる
|
|
106
|
+
* 1 語を挟んでもよい(15 USCA Appendix § 12)。巻の番号の後ろで点で終わる名前(See 44 USC. 3502)も引用で、文を分ける読み手は
|
|
107
|
+
* 点の後ろの条を次の文に送る。法令集そのものを言う所(the CFR title、the 2 CFR export)は略語のまま数える。
|
|
99
108
|
*/
|
|
100
109
|
export const citationSpans = (text: string, series: readonly string[]): Span[] => {
|
|
101
110
|
if (series.length === 0) return [];
|
|
102
111
|
const name = oneOf(series);
|
|
103
|
-
|
|
112
|
+
const section = String.raw`(?:\p{Lu}\p{L}*\.?[ \t]+)?§`;
|
|
113
|
+
return spansOf(
|
|
114
|
+
text,
|
|
115
|
+
new RegExp(String.raw`(?<=\d/)${name}${EDGE_AFTER}|${EDGE_BEFORE}${name}(?=\.?[ \t]*(?:${section}|[Pp]arts?[ \t]+\d|\d))|(?<=\d[ \t]+)${name}(?=\.)`, "gu"),
|
|
116
|
+
);
|
|
104
117
|
};
|
|
105
118
|
|
|
106
119
|
/** 運送会社の名前。同じ文に 2 社以上を並べた所(Federal Express, UPS, DHL)だけ、どれも名前と読む。1 社だけの UPS は電源装置でもある。 */
|
|
@@ -121,10 +134,32 @@ export const streetSuffixSpans = (text: string, suffixes: readonly string[]): Sp
|
|
|
121
134
|
? []
|
|
122
135
|
: spansOf(text, new RegExp(String.raw`(?<=${EDGE_BEFORE}\d+[A-Z]?[ \t]+(?:\p{Lu}\p{Ll}[\p{L}'’.-]*[ \t]+){1,3})${oneOf(suffixes)}${EDGE_AFTER}`, "gu"));
|
|
123
136
|
|
|
137
|
+
/** 通りの種類は、語彙表の大文字の書き方と頭だけ大文字の書き方(DR と Dr)、略さずに書いた語(Road)。 */
|
|
138
|
+
const streetTypesOf = (suffixes: readonly string[]): string[] =>
|
|
139
|
+
suffixes.flatMap((suffix) => [suffix, `${suffix.slice(0, 1)}${suffix.slice(1).toLowerCase()}`]);
|
|
140
|
+
|
|
141
|
+
/** 番地から州と郵便番号までの、一行の所在地の長さの上限。 */
|
|
142
|
+
const MAX_ADDRESS_TAIL = 80;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* 番地・通り・市・州と郵便番号まで揃った一行の所在地(1600 Clifton Rd. NE, MS H21-8, Atlanta, GA 30329)。その中の大文字
|
|
146
|
+
* (通りの方角 NE、局内の宛先 MS)は所在地の部品で、略語ではない。州と郵便番号で終わらないもの(3 AI CT)は所在地と読まない。
|
|
147
|
+
*/
|
|
148
|
+
export const postalAddressSpans = (text: string, suffixes: readonly string[], states: readonly string[]): Span[] => {
|
|
149
|
+
if (suffixes.length === 0 || states.length === 0) return [];
|
|
150
|
+
const street = String.raw`${EDGE_BEFORE}\d+[A-Z]?[ \t]+(?:\p{Lu}\p{Ll}[\p{L}'’.-]*[ \t]+){1,3}(?:${oneOf(streetTypesOf(suffixes))}\.?|\p{Lu}\p{Ll}+)(?=[ \t,])`;
|
|
151
|
+
const city = String.raw`,[ \t]+\p{Lu}[\p{L}'’.-]*(?:[ \t]+\p{Lu}[\p{L}'’.-]*){0,2},[ \t]+${oneOf(states)}[ \t]+\d{5}(?:-\d{4})?(?!\d)`;
|
|
152
|
+
return spansOf(text, new RegExp(`${street}[^\n]{0,${MAX_ADDRESS_TAIL}}?${city}`, "gu"));
|
|
153
|
+
};
|
|
154
|
+
|
|
124
155
|
/** 大文字で書く決まり文句(NOW, THEREFORE、AND/OR)。 */
|
|
125
156
|
export const capitalPhraseSpans = (text: string, phrases: readonly string[]): Span[] =>
|
|
126
157
|
phrases.length === 0 ? [] : spansOf(text, new RegExp(`${EDGE_BEFORE}${oneOf(phrases)}${EDGE_AFTER}`, "gu"));
|
|
127
158
|
|
|
159
|
+
/** 大文字で終わる製品の名前(Adobe Acrobat Reader DC)。日本語の文では仮名が続く(Reader DCのダウンロード)ので、英字と数字だけを語の続きと見る。 */
|
|
160
|
+
export const productNameSpans = (text: string, names: readonly string[]): Span[] =>
|
|
161
|
+
names.length === 0 ? [] : spansOf(text, new RegExp(String.raw`(?<![A-Za-z0-9_&])${oneOf(names)}(?![A-Za-z0-9_&])`, "gu"));
|
|
162
|
+
|
|
128
163
|
/** 文の中で、名前の部品と決まり文句として略語から外す大文字を含む範囲。語彙表から一度だけ組み立てて、文ごとに呼ぶ。 */
|
|
129
164
|
export const nameSpansOf =
|
|
130
165
|
(words: NameWords) =>
|
|
@@ -132,9 +167,11 @@ export const nameSpansOf =
|
|
|
132
167
|
...companyNameSpans(text, words.legalForms, words.determiners),
|
|
133
168
|
...japaneseCompanyNameSpans(text, words.companyForms),
|
|
134
169
|
...currencySymbolSpans(text),
|
|
170
|
+
...trademarkSpans(text),
|
|
135
171
|
...citationSpans(text, words.citationSeries),
|
|
136
172
|
...carrierListSpans(text, words.carriers),
|
|
137
173
|
...namePrefixSpans(text, words.namePrefixes),
|
|
138
174
|
...streetSuffixSpans(text, words.streetSuffixes),
|
|
139
175
|
...capitalPhraseSpans(text, words.capitalPhrases),
|
|
176
|
+
...productNameSpans(text, words.productNames ?? []),
|
|
140
177
|
];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Capitals a document uses as the name of a numbered series (RFC 5785 and RFC 7230, BCP 78 and BCP 14, DR 4339 and
|
|
2
|
+
// DR 4340). Pure.
|
|
3
|
+
|
|
4
|
+
/** Capitals, a space, and a whole number that is not part of a decimal, a range or a longer identifier. */
|
|
5
|
+
const NUMBERED = /(?<![\p{L}\p{N}_&.-])(?<series>[A-Z]{2,6}) (?<number>\d{1,6})(?![\p{L}\p{N}_&]|[.,:/-]\d)/gu;
|
|
6
|
+
|
|
7
|
+
/** A year after capitals is when something was held or issued (FOSDEM 2024, SKO 2025), not a number in a series. */
|
|
8
|
+
const YEAR = /^(?:19|20)\d\d$/u;
|
|
9
|
+
|
|
10
|
+
/** One number is a single thing cited (STD 66); two different numbers make the capitals a series the reader looks up by number. */
|
|
11
|
+
const MIN_NUMBERS = 2;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The capitals the document writes before at least two different numbers. A numbered series is known by its numbers: a
|
|
15
|
+
* reader of "BCP 78 … BCP 14" looks the numbers up, and the name needs no expansion. Capitals before one number, or before
|
|
16
|
+
* years only, are not read so.
|
|
17
|
+
*/
|
|
18
|
+
export const numberedSeries = (source: string): ReadonlySet<string> => {
|
|
19
|
+
const numbers = new Map<string, Set<string>>();
|
|
20
|
+
[...source.matchAll(NUMBERED)].forEach((match) => {
|
|
21
|
+
const series = match.groups?.["series"] ?? "";
|
|
22
|
+
const number = match.groups?.["number"] ?? "";
|
|
23
|
+
if (YEAR.test(number)) return;
|
|
24
|
+
numbers.set(series, (numbers.get(series) ?? new Set<string>()).add(number));
|
|
25
|
+
});
|
|
26
|
+
return new Set([...numbers].filter(([, seen]) => seen.size >= MIN_NUMBERS).map(([series]) => series));
|
|
27
|
+
};
|
|
@@ -4,7 +4,6 @@ import { MIN_DOCUMENT_LENGTH } from "./signals.ts";
|
|
|
4
4
|
import { entryIn, entryOpens } from "./lexicon-match.ts";
|
|
5
5
|
import { contrastSentences, type ContrastWords } from "./contrast-frame.ts";
|
|
6
6
|
import { placeholderSpans } from "./placeholder-text.ts";
|
|
7
|
-
import { colonLeadIns } from "./list-lead-in.ts";
|
|
8
7
|
import { followsInlineCode } from "./code-before.ts";
|
|
9
8
|
import { isSentenceTail } from "./opener-tail.ts";
|
|
10
9
|
|
|
@@ -44,16 +43,28 @@ const contrastWordsOf = (doc: ProseDocument, frames: Lexicon): ContrastWords =>
|
|
|
44
43
|
frames,
|
|
45
44
|
leads: doc.lexicons["contrast-lead"] ?? [],
|
|
46
45
|
turns: doc.lexicons["contrast-turn"] ?? [],
|
|
46
|
+
amounts: doc.lexicons["contrast-amount"] ?? [],
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
/**
|
|
49
|
+
/** 対比の枠は、一つなら論点の整理。二つ目から数える(割合の上限が、長い文書の二つを落とす)。 */
|
|
50
|
+
const MIN_CONTRASTS = 2;
|
|
51
|
+
const PERCENT = 100;
|
|
52
|
+
|
|
53
|
+
/** 文書の言語の文のうち、対比の枠で書いた文の割合(百分率、小数 1 桁)。文の長さが言語で違っても同じ物差しで比べられる。 */
|
|
54
|
+
export const contrastShare = (doc: ProseDocument, contrasts: number): number => {
|
|
55
|
+
const sentences = doc.sentences.filter((sentence) => sentence.embeddedLanguage === undefined).length;
|
|
56
|
+
return sentences === 0 ? 0 : Math.round((contrasts / sentences) * PERCENT * TENTHS) / TENTHS;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** 対比の枠(It's not X, it's Y、単なる X ではなく)。1 つなら論点の整理だが、文の割合が上限を超えると言い回しの癖になる。 */
|
|
50
60
|
export const contrastFraming: Detector = (doc, options): Finding[] => {
|
|
51
61
|
const words = contrastWordsOf(doc, options.lexicon ?? []);
|
|
52
|
-
const hits = contrastSentences(doc.sentences, words)
|
|
53
|
-
sentence
|
|
54
|
-
matched: (firstIn(sentence, words.frames) ?? firstIn(sentence, words.leads))?.pattern ?? ""
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
const hits = contrastSentences(doc.sentences, words)
|
|
63
|
+
.filter((sentence) => sentence.embeddedLanguage === undefined)
|
|
64
|
+
.map((sentence) => ({ sentence, matched: (firstIn(sentence, words.frames) ?? firstIn(sentence, words.leads))?.pattern ?? "" }));
|
|
65
|
+
if (hits.length < MIN_CONTRASTS || wordsOf(doc) < MIN_DOCUMENT_LENGTH[doc.lengthUnit]) return [];
|
|
66
|
+
const share = contrastShare(doc, hits.length);
|
|
67
|
+
return share <= options.limit ? [] : hits.map((hit) => findingOf(hit, { count: hits.length, share, limit: options.limit }));
|
|
57
68
|
};
|
|
58
69
|
|
|
59
70
|
/** 語彙表の語で始まる文。 */
|
|
@@ -82,16 +93,6 @@ export const openerPile: Detector = (doc, options): Finding[] => {
|
|
|
82
93
|
return hits.length === 0 || hits.length < options.limit ? [] : hits.map((hit) => findingOf(hit, { count: hits.length, limit: options.limit }));
|
|
83
94
|
};
|
|
84
95
|
|
|
85
|
-
/**
|
|
86
|
-
* コロンで箇条書きへ渡す文(以下の通りです:)。1 つなら案内だが、節ごとに続くと説明が箇条書きの前置きだけになる。
|
|
87
|
-
* 数えるのは文書の言語の文だけ。和文の中の英文(Examples include:)は、英語ではふつうの書き方なので数えない。
|
|
88
|
-
*/
|
|
89
|
-
export const colonLeadIn: Detector = (doc, options): Finding[] => {
|
|
90
|
-
const inDocumentLanguage = doc.sentences.filter((sentence) => sentence.embeddedLanguage === undefined);
|
|
91
|
-
const hits = colonLeadIns(inDocumentLanguage, doc.lists, doc.listSpans, doc.source).map((sentence) => ({ sentence, matched: sentence.text.trim() }));
|
|
92
|
-
return densityFindings(doc, hits, options.limit);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
96
|
const distinct = (lexicon: Lexicon): LexiconEntry[] => [...new Map(lexicon.map((entry) => [entry.pattern.toLowerCase(), entry])).values()];
|
|
96
97
|
|
|
97
98
|
const weightOf = (entry: LexiconEntry): number => entry.weight ?? 1;
|
|
@@ -1,17 +1,34 @@
|
|
|
1
|
-
import type { Detector, Finding } from "../plugin.ts";
|
|
2
|
-
import { uiLanguageOf } from "../ui.ts";
|
|
1
|
+
import type { Detector, Finding, ProseDocument } from "../plugin.ts";
|
|
2
|
+
import { uiLanguageOf, type Texts } from "../ui.ts";
|
|
3
3
|
import { STRUCTURE_TEXT } from "../outline/structure-text.ts";
|
|
4
4
|
import { structureOf } from "../structure-shape/of-document.ts";
|
|
5
|
+
import { headedSections } from "../structure-shape/features.ts";
|
|
6
|
+
import { headingWords } from "../structure-shape/heading-words.ts";
|
|
7
|
+
import { isTemplateOutline, templateSectionsOf } from "../structure-shape/template-outline.ts";
|
|
8
|
+
|
|
9
|
+
/** The template outline's name in the message, beside the structure measures past the human articles. */
|
|
10
|
+
const TEMPLATE_NAME: Texts<string> = { ja: "提案書・報告書の定型の見出し", en: "the textbook proposal or report headings" };
|
|
11
|
+
|
|
12
|
+
const templateSections = (doc: ProseDocument): string[] =>
|
|
13
|
+
templateSectionsOf(
|
|
14
|
+
headedSections(doc.sections).map((section) => headingWords(section.heading)),
|
|
15
|
+
doc.lexicons["template-heading"] ?? [],
|
|
16
|
+
);
|
|
5
17
|
|
|
6
18
|
/**
|
|
7
19
|
* The document's outline is past the human articles on several structure measures at once (chaff outline's structure
|
|
8
20
|
* block): many headings, three-way splits, bold labels, uniform sections. One alone is ordinary; the limit is how many.
|
|
21
|
+
* A textbook outline (Summary, Current Situation, Proposed Solution, Expected Benefits…) counts as one more.
|
|
9
22
|
*/
|
|
10
23
|
export const aiStructure: Detector = (doc, options): Finding[] => {
|
|
11
24
|
const scored = structureOf(doc);
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
25
|
+
const template = isTemplateOutline(templateSections(doc));
|
|
26
|
+
const count = scored.score + (template ? 1 : 0);
|
|
27
|
+
if (count < options.limit) return [];
|
|
28
|
+
const language = uiLanguageOf(doc.language);
|
|
29
|
+
const text = STRUCTURE_TEXT[language];
|
|
30
|
+
const measures = scored.placements.filter((placement) => placement.beyond).map((placement) => text.features[placement.feature.id].name);
|
|
31
|
+
const names = template ? [...measures, TEMPLATE_NAME[language]] : measures;
|
|
15
32
|
const heading = (doc.markup?.headings ?? []).find((entry) => entry.depth > 1) ?? doc.markup?.headings[0];
|
|
16
33
|
return [
|
|
17
34
|
{
|
|
@@ -20,7 +37,7 @@ export const aiStructure: Detector = (doc, options): Finding[] => {
|
|
|
20
37
|
line: 0,
|
|
21
38
|
column: 0,
|
|
22
39
|
quote: heading?.text ?? "",
|
|
23
|
-
values: { word: names.join(text.listSeparator), count
|
|
40
|
+
values: { word: names.join(text.listSeparator), count, limit: options.limit, offset: heading?.start ?? 0 },
|
|
24
41
|
},
|
|
25
42
|
];
|
|
26
43
|
};
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
const HALF_NUMBER = String.raw`(?<![\d./])\d+[./]\d+(?!\d|[./]\d)[A-Za-z]*`;
|
|
7
7
|
const FULL_NUMBER = String.raw`(?<![0-9./])[0-9]+[./][0-9]+(?![0-9]|[./][0-9])[A-Za-z]*`;
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
/** 三桁ごとに区切った数(5,500、1,200.5)。5,500 の 5 は一桁の数ではない。 */
|
|
10
|
+
const HALF_GROUPED = String.raw`(?<![\d,.])\d{1,3}(?:,\d{3})+(?:\.\d+)?(?![\d,]|\.\d)[A-Za-z]*`;
|
|
11
|
+
const FULL_GROUPED = String.raw`(?<![0-9,,.])[0-9]{1,3}(?:[,,][0-9]{3})+(?:.[0-9]+)?(?![0-9,,]|.[0-9])[A-Za-z]*`;
|
|
12
|
+
|
|
13
|
+
export const ALNUM_RUN = new RegExp(String.raw`${HALF_GROUPED}|${FULL_GROUPED}|${HALF_NUMBER}|${FULL_NUMBER}|[A-Za-z0-9A-Za-z0-9]+`, "gu");
|
|
14
|
+
/** 並び(ALNUM_RUN が切り出したもの)が一つの幅だけで書かれているか。区切りの点・斜線・コンマは数字の間にしか来ない。 */
|
|
15
|
+
export const FULLWIDTH = /^[A-Za-z0-9][A-Za-z0-9./,,]*$/u;
|
|
16
|
+
export const HALFWIDTH = /^[A-Za-z0-9][A-Za-z0-9./,]*$/u;
|