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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type LabelSpan = {
|
|
2
|
+
readonly label: string;
|
|
3
|
+
readonly ordinal: number;
|
|
4
|
+
readonly start: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Whether the text between two numbered nodes sets out a label of the later one's kind with a number the skip leaves out
|
|
8
|
+
* (between previous's last number and current's), which the tree did not read as a node.
|
|
9
|
+
*/
|
|
10
|
+
export declare const labelWrittenBetween: (source: string, previous: LabelSpan & {
|
|
11
|
+
readonly last: number;
|
|
12
|
+
}, current: LabelSpan) => boolean;
|
|
13
|
+
//# sourceMappingURL=unread-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unread-label.d.ts","sourceRoot":"","sources":["../../src/structure/unread-label.ts"],"names":[],"mappings":"AAuDA,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAErG;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,EAAE,UAAU,SAAS,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,SAAS,SAAS,KAAG,OAYzH,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// A number the tree did not read but the text writes: "(d)" run into the end of the line before "(e)", "6.1" and "6.2"
|
|
2
|
+
// written as plain paragraphs before the "6.3" the tree read, "(11)" joined to the heading of "(10)". A skip across such
|
|
3
|
+
// a label is not a missing number. Pure.
|
|
4
|
+
const LETTERS = "abcdefghijklmnopqrstuvwxyz";
|
|
5
|
+
/** At most this many missing numbers are looked for; a wider skip is not a few labels the tree missed. */
|
|
6
|
+
const MAX_MISSING = 30;
|
|
7
|
+
/** A label in brackets ((11)): in the heading before, a bare number may be any number in its words. */
|
|
8
|
+
const BRACKETED = /^[([]/u;
|
|
9
|
+
/** An HTML comment: text the reader does not see, so a label in it is not written. */
|
|
10
|
+
const HTML_COMMENT = /<!--[\s\S]*?-->/gu;
|
|
11
|
+
const escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
|
|
12
|
+
/** The label written with another number in place of its own: digits for digits, a letter in the same case for a letter. */
|
|
13
|
+
const relabel = (label, ordinal) => {
|
|
14
|
+
const digits = [...label.matchAll(/\d+/gu)].findLast((match) => Number(match[0]) === ordinal);
|
|
15
|
+
if (digits !== undefined)
|
|
16
|
+
return (other) => `${label.slice(0, digits.index)}${other}${label.slice(digits.index + digits[0].length)}`;
|
|
17
|
+
const letter = [...label.matchAll(/(?<![A-Za-z])[A-Za-z](?![A-Za-z])/gu)].findLast((match) => LETTERS.indexOf(match[0].toLowerCase()) + 1 === ordinal);
|
|
18
|
+
if (letter === undefined)
|
|
19
|
+
return undefined;
|
|
20
|
+
const upper = letter[0] !== letter[0].toLowerCase();
|
|
21
|
+
return (other) => {
|
|
22
|
+
const written = LETTERS.charAt(other - 1);
|
|
23
|
+
return `${label.slice(0, letter.index)}${upper ? written.toUpperCase() : written}${label.slice(letter.index + 1)}`;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* A label set out as one: at the start of a line behind the same marks as the later label (## for a heading, none for a
|
|
28
|
+
* paragraph), after a run of spaces within a line, or after a space in the heading that opens the node before
|
|
29
|
+
* ("##### (10) … (11) …", a label in brackets). A label in a sentence or in an HTML comment ("under clause (d)") is a reference, and a list item's "3." under
|
|
30
|
+
* headings numbered "## 4." is another numbering.
|
|
31
|
+
*/
|
|
32
|
+
const setOutIn = (text, label, lead) => {
|
|
33
|
+
const escaped = escapeRegExp(label);
|
|
34
|
+
const after = String.raw `(?![0-9A-Za-z])`;
|
|
35
|
+
const atLineStart = new RegExp(String.raw `^[ \t]*${escapeRegExp(lead)}[ \t]*${escaped}${after}`, "mu");
|
|
36
|
+
const afterSpaces = new RegExp(String.raw `\S[ \t]{2,}${escaped}${after}`, "u");
|
|
37
|
+
if (atLineStart.test(text) || afterSpaces.test(text))
|
|
38
|
+
return true;
|
|
39
|
+
const firstLine = text.split("\n", 1)[0] ?? "";
|
|
40
|
+
const bracketed = BRACKETED.test(label);
|
|
41
|
+
return bracketed && firstLine.trimStart().startsWith("#") && new RegExp(String.raw `\s${escaped}${after}`, "u").test(firstLine);
|
|
42
|
+
};
|
|
43
|
+
/** The marks before a label on its own line (## of a heading, > of a quotation), spaces left out. */
|
|
44
|
+
const leadOf = (source, start, label) => {
|
|
45
|
+
const lineStart = source.lastIndexOf("\n", start - 1) + 1;
|
|
46
|
+
const lineEnd = source.indexOf("\n", start);
|
|
47
|
+
const line = source.slice(lineStart, lineEnd === -1 ? source.length : lineEnd).normalize("NFKC");
|
|
48
|
+
const at = line.indexOf(label);
|
|
49
|
+
return at === -1 ? "" : line.slice(0, at).trim();
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Whether the text between two numbered nodes sets out a label of the later one's kind with a number the skip leaves out
|
|
53
|
+
* (between previous's last number and current's), which the tree did not read as a node.
|
|
54
|
+
*/
|
|
55
|
+
export const labelWrittenBetween = (source, previous, current) => {
|
|
56
|
+
const missing = current.ordinal - previous.last - 1;
|
|
57
|
+
if (missing < 1 || missing > MAX_MISSING || current.start <= previous.start)
|
|
58
|
+
return false;
|
|
59
|
+
const label = current.label.normalize("NFKC");
|
|
60
|
+
const written = relabel(label, current.ordinal);
|
|
61
|
+
if (written === undefined)
|
|
62
|
+
return false;
|
|
63
|
+
const lead = leadOf(source, current.start, label);
|
|
64
|
+
const text = source
|
|
65
|
+
.slice(source.lastIndexOf("\n", previous.start - 1) + 1, current.start)
|
|
66
|
+
.replaceAll(HTML_COMMENT, "")
|
|
67
|
+
.normalize("NFKC");
|
|
68
|
+
return Array.from({ length: missing }, (_, index) => written(previous.last + 1 + index)).some((missingLabel) => setOutIn(text, missingLabel, lead));
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=unread-label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unread-label.js","sourceRoot":"","sources":["../../src/structure/unread-label.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,yHAAyH;AACzH,yCAAyC;AAEzC,MAAM,OAAO,GAAG,4BAA4B,CAAC;AAE7C,0GAA0G;AAC1G,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB,uGAAuG;AACvG,MAAM,SAAS,GAAG,QAAQ,CAAC;AAC3B,sFAAsF;AACtF,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEzC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;AAE5F,4HAA4H;AAC5H,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,OAAe,EAA2C,EAAE;IAC1F,MAAM,MAAM,GAAG,CAAC,GAAG,KAAK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E,EAAE,CAAC;SAC5B,SAAS,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;AACtJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Lexicon } from "../plugin.ts";
|
|
2
|
+
/** How many of the template's sections an outline needs before it reads as the template: a real proposal has one or two. */
|
|
3
|
+
export declare const TEMPLATE_SECTIONS = 4;
|
|
4
|
+
/**
|
|
5
|
+
* The template sections (the lexicon's groups: summary, background, proposal, benefits…) that the headings stand for,
|
|
6
|
+
* each once, in heading order. `headings` are heading words as headingWords gives them (lower case, numbers dropped).
|
|
7
|
+
*/
|
|
8
|
+
export declare const templateSectionsOf: (headings: readonly string[], lexicon: Lexicon) => string[];
|
|
9
|
+
/** Whether the outline is the template: enough of its sections stand as headings. */
|
|
10
|
+
export declare const isTemplateOutline: (sections: readonly string[]) => boolean;
|
|
11
|
+
//# sourceMappingURL=template-outline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-outline.d.ts","sourceRoot":"","sources":["../../src/structure-shape/template-outline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,cAAc,CAAC;AAG1D,4HAA4H;AAC5H,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAoBnC;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,SAAS,MAAM,EAAE,EAAE,SAAS,OAAO,KAAG,MAAM,EAExF,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,GAAI,UAAU,SAAS,MAAM,EAAE,KAAG,OAA+C,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { startsWithWord } from "./heading-words.js";
|
|
2
|
+
/** How many of the template's sections an outline needs before it reads as the template: a real proposal has one or two. */
|
|
3
|
+
export const TEMPLATE_SECTIONS = 4;
|
|
4
|
+
/** Kanji or katakana: a compound goes on through them, so 効果 does not open 効果測定 and 提案 does not open 提案者. */
|
|
5
|
+
const COMPOUND = /[\p{Script=Han}\p{Script=Katakana}ー]/u;
|
|
6
|
+
const characterAt = (text, index) => {
|
|
7
|
+
const code = text.codePointAt(index);
|
|
8
|
+
return code === undefined ? "" : String.fromCodePoint(code);
|
|
9
|
+
};
|
|
10
|
+
const continuesCompound = (words, phrase) => COMPOUND.test(phrase.at(-1) ?? "") && COMPOUND.test(characterAt(words, phrase.length));
|
|
11
|
+
const opensWith = (words, phrase) => startsWithWord(words, phrase) && !continuesCompound(words, phrase);
|
|
12
|
+
/** The longest entry the heading opens with, so 提案の背景 is the background and not the proposal. */
|
|
13
|
+
const sectionOf = (words, lexicon) => lexicon
|
|
14
|
+
.filter((entry) => entry.group !== undefined && opensWith(words, entry.pattern.toLowerCase()))
|
|
15
|
+
.toSorted((left, right) => right.pattern.length - left.pattern.length)[0];
|
|
16
|
+
/**
|
|
17
|
+
* The template sections (the lexicon's groups: summary, background, proposal, benefits…) that the headings stand for,
|
|
18
|
+
* each once, in heading order. `headings` are heading words as headingWords gives them (lower case, numbers dropped).
|
|
19
|
+
*/
|
|
20
|
+
export const templateSectionsOf = (headings, lexicon) => [
|
|
21
|
+
...new Set(headings.flatMap((words) => sectionOf(words, lexicon)?.group ?? [])),
|
|
22
|
+
];
|
|
23
|
+
/** Whether the outline is the template: enough of its sections stand as headings. */
|
|
24
|
+
export const isTemplateOutline = (sections) => sections.length >= TEMPLATE_SECTIONS;
|
|
25
|
+
//# sourceMappingURL=template-outline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|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,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,QAA2B,EAAE,OAAgB,EAAY,EAAE,CAAC;IAC7F,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;CAChF,CAAC;AAEF,qFAAqF;AACrF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAA2B,EAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,IAAI,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Span } from "./plugin.ts";
|
|
2
|
+
/**
|
|
3
|
+
* A capitalised run: the whole run (Co-working Space), and the part of it that is surely a name (quoted), if any. The first
|
|
4
|
+
* word of the sentence is left out of the quoted part, since a sentence and a title capitalise their first word whatever it is.
|
|
5
|
+
*/
|
|
6
|
+
export type NameRun = {
|
|
7
|
+
readonly name: Span;
|
|
8
|
+
readonly quoted: Span | undefined;
|
|
9
|
+
};
|
|
10
|
+
/** The capitalised runs of two words or more in a sentence, joined by the language's small words (of, and): names. */
|
|
11
|
+
export declare const titleCaseNameRuns: (text: string, joiners: readonly string[]) => NameRun[];
|
|
12
|
+
//# sourceMappingURL=title-case-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title-case-name.d.ts","sourceRoot":"","sources":["../src/title-case-name.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAiCxC;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjF,sHAAsH;AACtH,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,EAAE,SAAS,SAAS,MAAM,EAAE,KAAG,OAAO,EAWnF,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// A name written as a run of capitalised words inside a sentence (the Interagency Group, the Twenty-Nine Palms Band of Mission
|
|
2
|
+
// Indians, Radical Uncertainty: Decision-Making Beyond the Numbers). Pure.
|
|
3
|
+
const LATIN_WORD = /\p{Script=Latin}[\p{Script=Latin}\d'’]*(?:-[\p{Script=Latin}\d]+)*/gu;
|
|
4
|
+
/** A capitalised word, with small letters after its capital, its hyphenated parts too (Twenty-Nine, Co-working, Interagency). */
|
|
5
|
+
const CAPITALISED = /^\p{Lu}[\p{Ll}\d'’]*(?:-[\p{L}\d][\p{Ll}\d]*)*$/u;
|
|
6
|
+
const SPACE_ONLY = /^ $/u;
|
|
7
|
+
const MIN_NAME_WORDS = 2;
|
|
8
|
+
const isCapitalised = (word) => CAPITALISED.test(word.text);
|
|
9
|
+
/** Whether `word` carries on the run that ended at `last`: one space between, and capitalised or a joiner (of, and). */
|
|
10
|
+
const continues = (text, last, word, joiners) => last !== undefined && SPACE_ONLY.test(text.slice(last.end, word.start)) && (isCapitalised(word) || joiners.has(word.text));
|
|
11
|
+
/** A run without the joiners it ends on (the Office of): a name ends on a capitalised word. */
|
|
12
|
+
const trimmed = (run) => run.slice(0, run.findLastIndex(isCapitalised) + 1);
|
|
13
|
+
const runsOf = (text, words, joiners) => words.reduce((runs, word) => {
|
|
14
|
+
const current = runs.at(-1);
|
|
15
|
+
if (current !== undefined && continues(text, current.at(-1), word, joiners))
|
|
16
|
+
return [...runs.slice(0, -1), [...current, word]];
|
|
17
|
+
return isCapitalised(word) ? [...runs, [word]] : runs;
|
|
18
|
+
}, []);
|
|
19
|
+
const isName = (run) => run.filter(isCapitalised).length >= MIN_NAME_WORDS;
|
|
20
|
+
const spanOf = (run) => {
|
|
21
|
+
const [head, last] = [run[0], run.at(-1)];
|
|
22
|
+
return head === undefined || last === undefined ? undefined : { start: head.start, end: last.end };
|
|
23
|
+
};
|
|
24
|
+
/** The capitalised runs of two words or more in a sentence, joined by the language's small words (of, and): names. */
|
|
25
|
+
export const titleCaseNameRuns = (text, joiners) => {
|
|
26
|
+
const words = [...text.matchAll(LATIN_WORD)].map((match) => ({ text: match[0], start: match.index, end: match.index + match[0].length }));
|
|
27
|
+
const first = words[0];
|
|
28
|
+
return runsOf(text, words, new Set(joiners))
|
|
29
|
+
.map(trimmed)
|
|
30
|
+
.filter(isName)
|
|
31
|
+
.flatMap((run) => {
|
|
32
|
+
const name = spanOf(run);
|
|
33
|
+
const named = trimmed(run[0] === first ? run.slice(1) : run);
|
|
34
|
+
return name === undefined ? [] : [{ name, quoted: isName(named) ? spanOf(named) : undefined }];
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=title-case-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title-case-name.js","sourceRoot":"","sources":["../src/title-case-name.ts"],"names":[],"mappings":"AAAA,+HAA+H;AAC/H,2EAA2E;AAI3E,MAAM,UAAU,GAAG,sEAAsE,CAAC;AAC1F,iIAAiI;AACjI,MAAM,WAAW,GAAG,kDAAkD,CAAC;AACvE,MAAM,UAAU,GAAG,MAAM,CAAC;AAC1B,MAAM,cAAc,GAAG,CAAC,CAAC;AAIzB,MAAM,aAAa,GAAG,CAAC,IAAU,EAAW,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAE3E,wHAAwH;AACxH,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,IAAsB,EAAE,IAAU,EAAE,OAA4B,EAAW,EAAE,CAC5G,IAAI,KAAK,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAA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AC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;IACjG,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
|
package/dist/topic-clause.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import type { Token } from "./plugin.ts";
|
|
2
|
+
/** The words a document's language gives for the shapes below (lang-ja's lexicons). Without them, only the shapes that need none. */
|
|
3
|
+
export type TopicClauseWords = {
|
|
4
|
+
/** Words that end a clause right after its predicate (ことから, つつ, としても): the topic-clause-close lexicon. */
|
|
5
|
+
readonly closers: readonly string[];
|
|
6
|
+
};
|
|
2
7
|
/**
|
|
3
8
|
* The index of the word that ends the topic's own clause, between the topic and the sentence's last word, or undefined when the
|
|
4
9
|
* topic's predicate is the one the sentence ends on.
|
|
5
10
|
*/
|
|
6
|
-
export declare const topicClauseEnd: (tokens: readonly Token[], topic: number, last: number) => number | undefined;
|
|
11
|
+
export declare const topicClauseEnd: (tokens: readonly Token[], topic: number, last: number, words?: TopicClauseWords) => number | undefined;
|
|
7
12
|
//# sourceMappingURL=topic-clause.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topic-clause.d.ts","sourceRoot":"","sources":["../src/topic-clause.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"topic-clause.d.ts","sourceRoot":"","sources":["../src/topic-clause.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AA8HzC,qIAAqI;AACrI,MAAM,MAAM,gBAAgB,GAAG;IAC7B,0GAA0G;IAC1G,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAAC;AAqFF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,SAAS,KAAK,EAAE,EAAE,OAAO,MAAM,EAAE,MAAM,MAAM,EAAE,QAAO,gBAA2B,KAAG,MAAM,GAAG,SAWnI,CAAC"}
|
package/dist/topic-clause.js
CHANGED
|
@@ -24,6 +24,15 @@ const isComma = (token) => COMMA.has(token?.surface ?? "");
|
|
|
24
24
|
/** A noun of its own, not a nominaliser (こと, の, ところ) that only turns the clause before it into a noun. */
|
|
25
25
|
const isOwnNoun = (token) => NOMINAL.has(token?.pos ?? "") && token?.features?.["NounType"] !== "Dependent";
|
|
26
26
|
const isParticle = (token, surface) => token.surface === surface && token.pos === "ADP";
|
|
27
|
+
/** A word that stands as a noun only after の: ほとんど and 多く in これらの処理のほとんどは are a part of what the の phrase names. */
|
|
28
|
+
const isNarrowedPart = (tokens, at) => (tokens[at]?.pos === "ADV" || tokens[at]?.features?.["Adverbial"] === "Yes") && tokens[at - 1]?.surface === "の" && tokens[at - 1]?.pos === "ADP";
|
|
29
|
+
/** The word before at heads a subject of its own: a noun (法律は), or a part a の phrase narrows (処理のほとんどは). */
|
|
30
|
+
const headsSubject = (tokens, at) => isOwnNoun(tokens[at - 1]) || isNarrowedPart(tokens, at - 1);
|
|
31
|
+
/** A subject of its own at at: は on its head anywhere, or が on its head when lastComma is before it (-1 to take every が). */
|
|
32
|
+
const isOwnSubjectAt = (tokens, at, lastComma) => {
|
|
33
|
+
const token = tokens[at];
|
|
34
|
+
return token !== undefined && headsSubject(tokens, at) && (isParticle(token, "は") || (isParticle(token, "が") && at > lastComma));
|
|
35
|
+
};
|
|
27
36
|
/**
|
|
28
37
|
* The last place a subject of its own stands before the sentence's last word: a new topic (法律はありませんが) anywhere, or a
|
|
29
38
|
* noun with が that the final predicate takes (no comma after it: 動きが見られ始めている). A noun with が inside a condition
|
|
@@ -31,7 +40,7 @@ const isParticle = (token, surface) => token.surface === surface && token.pos ==
|
|
|
31
40
|
*/
|
|
32
41
|
const lastOwnSubject = (tokens, last) => {
|
|
33
42
|
const lastComma = tokens.findLastIndex((token, at) => at < last && isComma(token));
|
|
34
|
-
return tokens.findLastIndex((
|
|
43
|
+
return tokens.findLastIndex((_, at) => at < last && isOwnSubjectAt(tokens, at, lastComma));
|
|
35
44
|
};
|
|
36
45
|
/** The words of the clause after a comma at from, up to the next clause stopped by a comma, or the sentence's last word. */
|
|
37
46
|
const nextClause = (tokens, from, last) => {
|
|
@@ -88,13 +97,91 @@ const closesIfNewSubject = (tokens, at) => {
|
|
|
88
97
|
return true;
|
|
89
98
|
return token?.pos === "VERB" && token.lemma === "おる" && token.features?.["Bound"] === "Yes";
|
|
90
99
|
};
|
|
100
|
+
const NO_WORDS = { closers: [] };
|
|
101
|
+
/** The first of the words that spell text when they end at at (こと + から for ことから), or -1 when no run of words does. */
|
|
102
|
+
const wordsStart = (tokens, at, text, spelled = "") => {
|
|
103
|
+
const token = tokens[at];
|
|
104
|
+
if (token === undefined)
|
|
105
|
+
return -1;
|
|
106
|
+
const joined = token.surface + spelled;
|
|
107
|
+
if (joined === text)
|
|
108
|
+
return at;
|
|
109
|
+
return joined.length < text.length && text.endsWith(joined) ? wordsStart(tokens, at - 1, text, joined) : -1;
|
|
110
|
+
};
|
|
111
|
+
/** Whether another subject (が or は on a noun, or on a clause made a noun: 行うことは) stands between from and to. */
|
|
112
|
+
const subjectBetween = (tokens, from, to) => tokens.some((token, at) => at > from && at < to && (isParticle(token, "は") || isParticle(token, "が")) && (NOMINAL.has(tokens[at - 1]?.pos ?? "") || headsSubject(tokens, at)));
|
|
113
|
+
const isPoliteMasu = (token) => token?.pos === "AUX" && token.lemma === "ます";
|
|
114
|
+
/** 〜ておりますが / 〜しましたが: a polite predicate and the contrastive が. */
|
|
115
|
+
const isPoliteGa = (tokens, at) => {
|
|
116
|
+
if (tokens[at]?.surface !== "が" || tokens[at]?.pos !== "SCONJ")
|
|
117
|
+
return false;
|
|
118
|
+
const before = tokens[at - 1];
|
|
119
|
+
return isPoliteMasu(before) || (before?.pos === "AUX" && before.surface === "た" && isPoliteMasu(tokens[at - 2]));
|
|
120
|
+
};
|
|
121
|
+
const ownGaSubjectBetween = (tokens, from, to) => tokens.some((token, at) => at > from && at < to && isParticle(token, "が") && headsSubject(tokens, at));
|
|
122
|
+
/** A word of a name (赤澤, 大臣), not a noun that sets the time or the case (今後, 当日). */
|
|
123
|
+
const isNameWord = (token) => NOMINAL.has(token.pos) && token.features?.["Adverbial"] !== "Yes";
|
|
124
|
+
/**
|
|
125
|
+
* 石破総理大臣は…明らかにしましたが、赤澤大臣は…どう考えているか: a name and は straight after the comma is a topic of its own
|
|
126
|
+
* that the rest of the sentence is said of, when no subject of its own (が) follows it. A phrase before は (〜した行為は) is not one.
|
|
127
|
+
*/
|
|
128
|
+
const newNameTopicRunsToEnd = (tokens, comma, last) => {
|
|
129
|
+
const topic = tokens.findIndex((token, index) => index > comma && !isNameWord(token));
|
|
130
|
+
const wa = tokens[topic];
|
|
131
|
+
return topic > comma + 1 && wa !== undefined && isParticle(wa, "は") && lastOwnSubject(tokens, last) <= topic;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* 当社は…を営んでおりますが、…の重要性が乏しいため、…の記載は行っておりません: after 〜ますが、 the words up to the next comma
|
|
135
|
+
* say something of a subject of their own (が) and a new topic takes what comes after, so the predicate before が was the
|
|
136
|
+
* topic's, when no other subject stands between the topic and it (需要の停滞がありましたが is not). A clause with no subject of
|
|
137
|
+
* its own there is read to the end, unless a name stands as a new topic straight after the comma (〜ましたが、B大臣は…).
|
|
138
|
+
*/
|
|
139
|
+
const closesWithPoliteGa = (tokens, topic, at, last) => {
|
|
140
|
+
if (!isPoliteGa(tokens, at) || !isComma(tokens[at + 1]) || subjectBetween(tokens, topic, at))
|
|
141
|
+
return false;
|
|
142
|
+
if (newNameTopicRunsToEnd(tokens, at + 1, last))
|
|
143
|
+
return true;
|
|
144
|
+
const comma = tokens.findIndex((token, index) => index > at + 1 && index < last && isComma(token));
|
|
145
|
+
const clauseEnd = comma === -1 ? last : comma;
|
|
146
|
+
return ownGaSubjectBetween(tokens, at + 1, clauseEnd) && newTopicAfter(tokens, clauseEnd, last);
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* 学校は地域の核となることから、…: a closer after a predicate, then a comma, with no subject of its own
|
|
150
|
+
* between the topic and it. That predicate is the topic's; what follows is said of something else, or by the writer. A topic set
|
|
151
|
+
* off by a comma (AISIは、…連携しつつ、…行っていく) usually runs to the end, so then only a copula's closer counts (〜であることから、).
|
|
152
|
+
*/
|
|
153
|
+
const closesAfterPredicate = (tokens, topic, at, words) => {
|
|
154
|
+
if (!isComma(tokens[at + 1]))
|
|
155
|
+
return false;
|
|
156
|
+
return words.closers.some((connective) => {
|
|
157
|
+
const start = wordsStart(tokens, at, connective);
|
|
158
|
+
if (start <= topic + 1 || !PREDICATE.has(tokens[start - 1]?.pos ?? "") || subjectBetween(tokens, topic, start))
|
|
159
|
+
return false;
|
|
160
|
+
return copulaBefore(tokens, start) || !tokens.slice(topic + 1, start).some(isComma);
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
/** A mark that opens with a circled number (③): an item of a list the source ran into one line. */
|
|
164
|
+
const CIRCLED = /^[①-⒇❶-❿]/u;
|
|
165
|
+
const isBlank = (token) => token.surface.trim() === "";
|
|
166
|
+
/** 〜を向上させる ③ 次の項目: an item mark right after a predicate (spaces between are not read) ends the item before it. */
|
|
167
|
+
const closesWithItemMark = (tokens, at) => {
|
|
168
|
+
if (!PREDICATE.has(tokens[at]?.pos ?? ""))
|
|
169
|
+
return false;
|
|
170
|
+
const next = tokens.findIndex((token, index) => index > at && !isBlank(token));
|
|
171
|
+
return next !== -1 && CIRCLED.test(tokens[next]?.surface ?? "");
|
|
172
|
+
};
|
|
91
173
|
/**
|
|
92
174
|
* The index of the word that ends the topic's own clause, between the topic and the sentence's last word, or undefined when the
|
|
93
175
|
* topic's predicate is the one the sentence ends on.
|
|
94
176
|
*/
|
|
95
|
-
export const topicClauseEnd = (tokens, topic, last) => {
|
|
177
|
+
export const topicClauseEnd = (tokens, topic, last, words = NO_WORDS) => {
|
|
96
178
|
const subject = lastOwnSubject(tokens, last);
|
|
97
|
-
const closes = (at) => closesSurely(tokens, at, last) ||
|
|
179
|
+
const closes = (at) => closesSurely(tokens, at, last) ||
|
|
180
|
+
(closesIfNewSubject(tokens, at) && subject > at) ||
|
|
181
|
+
closesFirstClauseWithNoun(tokens, topic, at, last) ||
|
|
182
|
+
closesWithPoliteGa(tokens, topic, at, last) ||
|
|
183
|
+
closesAfterPredicate(tokens, topic, at, words) ||
|
|
184
|
+
closesWithItemMark(tokens, at);
|
|
98
185
|
const end = tokens.findIndex((_, at) => at > topic && at < last && closes(at));
|
|
99
186
|
return end === -1 ? undefined : end;
|
|
100
187
|
};
|
package/dist/topic-clause.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topic-clause.js","sourceRoot":"","sources":["../src/topic-clause.ts"],"names":[],"mappings":"AAIA,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAClC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACnD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAC3D,gEAAgE;AAChE,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AACxD,qGAAqG;AACrG,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,QAAQ,GAAG,CAAC,KAAwB,EAAW,EAAE,CACrD,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,KAAK,KAAK,IAAI,KAAK,C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AAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,CAAC,EAAU,EAAW,EAAE,CACrC,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC;QAC9B,CAAC,kBAAkB,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,OAAO,GAAG,EAAE,CAAC;QAChD,yBAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC;QAClD,kBAAkB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC;QAC3C,oBAAoB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC;QAC9C,kBAAkB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACjC,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,KAAK,IAAI,EAAE,GAAG,IAAI,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/E,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC;AACtC,CAAC,CAAC"}
|
package/dist/word-use.d.ts
CHANGED
|
@@ -9,25 +9,33 @@ export type InContext = {
|
|
|
9
9
|
export declare const isTouching: (left: Token | undefined, right: Token) => boolean;
|
|
10
10
|
export declare const HIRAGANA_ONLY: RegExp;
|
|
11
11
|
/**
|
|
12
|
-
* The lexicons that set a word's use apart: idioms (気をつける), conjunctions (あわせて、), judging (〜とみられる)
|
|
13
|
-
* spellings that name a sense of their own (モノ for goods).
|
|
12
|
+
* The lexicons that set a word's use apart: idioms (気をつける), conjunctions (あわせて、), judging (〜とみられる), katakana
|
|
13
|
+
* spellings that name a sense of their own (モノ for goods), 以て (〜でもって) and light verbs (〜といたします).
|
|
14
14
|
*/
|
|
15
15
|
export type Uses = {
|
|
16
16
|
readonly idioms: ReadonlySet<string>;
|
|
17
17
|
readonly conjunctions: ReadonlySet<string>;
|
|
18
18
|
readonly judging: ReadonlySet<string>;
|
|
19
19
|
readonly senses: ReadonlySet<string>;
|
|
20
|
+
readonly means: ReadonlySet<string>;
|
|
21
|
+
readonly lightVerbs: ReadonlySet<string>;
|
|
20
22
|
};
|
|
21
23
|
/**
|
|
22
24
|
* A helper verb or a dependent noun (見て下さい, その事) is written kana by many guides while the full word keeps its kanji (資料を下さい).
|
|
23
25
|
* The two uses are compared apart, so a document that follows that convention is consistent. A suffix (業務用, 全員ぶん) is a third use:
|
|
24
26
|
* it is not the dependent noun of the same reading (このように). The verb of an idiom (気をつける) is a fourth, and a
|
|
25
27
|
* conjunction (あわせて、, さらに、) a fifth, a verb of judging (〜とみられる) a sixth, a katakana spelling with a sense of its own (モノ)
|
|
26
|
-
* a seventh
|
|
28
|
+
* a seventh, the head of a compound verb (出来上る) an eighth, its tail (貼り付ける) a ninth and 以て (〜でもって) a tenth. A light verb
|
|
29
|
+
* after と (議題といたします) is a helper.
|
|
27
30
|
*/
|
|
28
|
-
export declare const useOf: (word: InContext, { idioms, conjunctions, judging, senses }: Uses) => string;
|
|
31
|
+
export declare const useOf: (word: InContext, { idioms, conjunctions, judging, senses, means, lightVerbs }: Uses) => string;
|
|
29
32
|
/** A piece the tokenizer cut out of a katakana run (ミスっ read as ミ and スる): not a word of its own. */
|
|
30
33
|
export declare const isCutFromKatakana: ({ token, previous }: InContext) => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* A katakana word the tokenizer cut out of a longer katakana run (カイ of ラオカイ): a piece of a foreign name, whose sound
|
|
36
|
+
* meets a kanji word of the same reading (峡) by chance.
|
|
37
|
+
*/
|
|
38
|
+
export declare const isPieceOfKatakanaRun: ({ token, previous, following }: InContext) => boolean;
|
|
31
39
|
/**
|
|
32
40
|
* で read as the verb 出る right after a word with no particle between (JSON でない): the copula's で, which the tokenizer
|
|
33
41
|
* misreads after a space or a name. 出る after a particle (結果がでない) or at the head of a sentence (でない音) is the verb.
|
package/dist/word-use.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"word-use.d.ts","sourceRoot":"","sources":["../src/word-use.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKzC,6EAA6E;AAC7E,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;CACvC,CAAC;AA0BF,eAAO,MAAM,UAAU,GAAI,MAAM,KAAK,GAAG,SAAS,EAAE,OAAO,KAAK,KAAG,OAAmE,CAAC;AAEvI,eAAO,MAAM,aAAa,QAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"word-use.d.ts","sourceRoot":"","sources":["../src/word-use.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKzC,6EAA6E;AAC7E,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;CACvC,CAAC;AA0BF,eAAO,MAAM,UAAU,GAAI,MAAM,KAAK,GAAG,SAAS,EAAE,OAAO,KAAK,KAAG,OAAmE,CAAC;AAEvI,eAAO,MAAM,aAAa,QAAe,CAAC;AAiF1C;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG;IACjB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC1C,CAAC;AAiBF;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,SAAS,EAAE,8DAA8D,IAAI,KAAG,MAU3G,CAAC;AAMF,qGAAqG;AACrG,eAAO,MAAM,iBAAiB,GAAI,qBAAqB,SAAS,KAAG,OAC6E,CAAC;AAMjJ;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,gCAAgC,SAAS,KAAG,OAIhF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,qBAAqB,SAAS,KAAG,OAC+B,CAAC;AAMpG;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,qBAAqB,SAAS,KAAG,OAIkD,CAAC;AAEtH,sFAAsF;AACtF,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,KAAG,OAAiD,CAAC"}
|
package/dist/word-use.js
CHANGED
|
@@ -54,21 +54,51 @@ const OBSERVED_SUBJECT = new Set(["が", "は", "も"]);
|
|
|
54
54
|
const isObserved = (previous, following) => previous?.pos === "ADP" && OBSERVED_SUBJECT.has(previous.surface) && PASSIVE.has(following?.[0]?.lemma ?? "");
|
|
55
55
|
/** A listed verb after the quotative と (〜とみる) or observing with られる (増加がみられる): judging what is seen, not looking. */
|
|
56
56
|
const isJudgingUse = ({ token, previous, before, following }, judging) => token.pos === "VERB" && judging.has(token.lemma ?? "") && (followsQuotative(previous, before) || isObserved(previous, following));
|
|
57
|
+
/** The particle 以て follows where 持つ never does: 〜でもって. */
|
|
58
|
+
const MEANS_PARTICLE = "で";
|
|
59
|
+
const VERB_LIKE = new Set(["VERB", "AUX"]);
|
|
60
|
+
/**
|
|
61
|
+
* A listed verb's て-form after で with no verb after it (電子でもって申請する): 以て, "by means of", which 持つ never is after
|
|
62
|
+
* で (手で持って運ぶ has its verb after it). After を the two read alike (決意をもって, 信念を持って), and are compared as one word.
|
|
63
|
+
*/
|
|
64
|
+
const isMeansUse = ({ token, previous, following }, means) => token.pos === "VERB" &&
|
|
65
|
+
means.has(token.lemma ?? "") &&
|
|
66
|
+
previous?.pos === "ADP" &&
|
|
67
|
+
previous.surface === MEANS_PARTICLE &&
|
|
68
|
+
TE.has(following?.[0]?.surface ?? "") &&
|
|
69
|
+
following?.[1] !== undefined &&
|
|
70
|
+
!VERB_LIKE.has(following[1].pos);
|
|
71
|
+
/**
|
|
72
|
+
* A listed light verb after the quotative と (議題といたします): the humble する, as it is written onto a noun (開会いたします),
|
|
73
|
+
* where the tokenizer marks it bound. The full verb takes を (思いを致す).
|
|
74
|
+
*/
|
|
75
|
+
const isLightVerbAfterQuotative = ({ token, previous }, lightVerbs) => token.pos === "VERB" && lightVerbs.has(token.lemma ?? "") && previous?.pos === "ADP" && previous.surface === QUOTATIVE;
|
|
57
76
|
/** A verb written straight onto the verb after it (出来上る, 書き込む): the head of a compound verb, which keeps the compound's spelling. */
|
|
58
77
|
const isCompoundVerbHead = ({ token, following }) => {
|
|
59
78
|
const next = following?.[0];
|
|
60
79
|
return token.pos === "VERB" && next?.pos === "VERB" && isTouching(token, next);
|
|
61
80
|
};
|
|
81
|
+
/** A verb written straight onto the verb before it (貼り付ける, 書き込む): the tail of a compound verb, not the verb alone (番号をつける). */
|
|
82
|
+
const isCompoundVerbTail = ({ token, previous }) => token.pos === "VERB" && previous?.pos === "VERB" && isTouching(previous, token);
|
|
83
|
+
/** A word used freely, or as a helper: a bound noun after a word is a suffix, and anything else bound a helper. */
|
|
84
|
+
const helperUseOf = (word, lightVerbs) => {
|
|
85
|
+
if (!isHelper(word) && !isLightVerbAfterQuotative(word, lightVerbs))
|
|
86
|
+
return "free";
|
|
87
|
+
return word.token.pos === "NOUN" && word.token.features?.["NounType"] !== "Dependent" ? "suffix" : "bound";
|
|
88
|
+
};
|
|
62
89
|
/**
|
|
63
90
|
* A helper verb or a dependent noun (見て下さい, その事) is written kana by many guides while the full word keeps its kanji (資料を下さい).
|
|
64
91
|
* The two uses are compared apart, so a document that follows that convention is consistent. A suffix (業務用, 全員ぶん) is a third use:
|
|
65
92
|
* it is not the dependent noun of the same reading (このように). The verb of an idiom (気をつける) is a fourth, and a
|
|
66
93
|
* conjunction (あわせて、, さらに、) a fifth, a verb of judging (〜とみられる) a sixth, a katakana spelling with a sense of its own (モノ)
|
|
67
|
-
* a seventh
|
|
94
|
+
* a seventh, the head of a compound verb (出来上る) an eighth, its tail (貼り付ける) a ninth and 以て (〜でもって) a tenth. A light verb
|
|
95
|
+
* after と (議題といたします) is a helper.
|
|
68
96
|
*/
|
|
69
|
-
export const useOf = (word, { idioms, conjunctions, judging, senses }) => {
|
|
97
|
+
export const useOf = (word, { idioms, conjunctions, judging, senses, means, lightVerbs }) => {
|
|
70
98
|
if (isIdiomVerb(word, idioms))
|
|
71
99
|
return "idiom";
|
|
100
|
+
if (isMeansUse(word, means))
|
|
101
|
+
return "means";
|
|
72
102
|
if (isConjunctionUse(word, conjunctions))
|
|
73
103
|
return "conjunction";
|
|
74
104
|
if (isJudgingUse(word, judging))
|
|
@@ -77,17 +107,29 @@ export const useOf = (word, { idioms, conjunctions, judging, senses }) => {
|
|
|
77
107
|
return "sense";
|
|
78
108
|
if (isCompoundVerbHead(word))
|
|
79
109
|
return "compound-verb";
|
|
110
|
+
if (isCompoundVerbTail(word))
|
|
111
|
+
return "compound-tail";
|
|
80
112
|
if (isKanaSuffix(word))
|
|
81
113
|
return "suffix";
|
|
82
|
-
|
|
83
|
-
return "free";
|
|
84
|
-
return word.token.pos === "NOUN" && word.token.features?.["NounType"] !== "Dependent" ? "suffix" : "bound";
|
|
114
|
+
return helperUseOf(word, lightVerbs);
|
|
85
115
|
};
|
|
86
116
|
/** One katakana and then kana that is not katakana (スる): no verb stem is one katakana long, as サボる and ググる are two. */
|
|
87
117
|
const ONE_KATAKANA_HEAD = /^\p{Script=Katakana}(?!\p{Script=Katakana})/u;
|
|
88
118
|
const KATAKANA_END = /\p{Script=Katakana}$/u;
|
|
89
119
|
/** A piece the tokenizer cut out of a katakana run (ミスっ read as ミ and スる): not a word of its own. */
|
|
90
120
|
export const isCutFromKatakana = ({ token, previous }) => ONE_KATAKANA_HEAD.test(token.surface) && token.surface.length > 1 && isTouching(previous, token) && KATAKANA_END.test(previous?.surface ?? "");
|
|
121
|
+
const KATAKANA_ONLY = /^[\p{Script=Katakana}ー]+$/u;
|
|
122
|
+
const isKatakanaToken = (token) => token !== undefined && KATAKANA_ONLY.test(token.surface);
|
|
123
|
+
/**
|
|
124
|
+
* A katakana word the tokenizer cut out of a longer katakana run (カイ of ラオカイ): a piece of a foreign name, whose sound
|
|
125
|
+
* meets a kanji word of the same reading (峡) by chance.
|
|
126
|
+
*/
|
|
127
|
+
export const isPieceOfKatakanaRun = ({ token, previous, following }) => {
|
|
128
|
+
const next = following?.[0];
|
|
129
|
+
if (!isKatakanaToken(token))
|
|
130
|
+
return false;
|
|
131
|
+
return (isKatakanaToken(previous) && isTouching(previous, token)) || (next !== undefined && isKatakanaToken(next) && isTouching(token, next));
|
|
132
|
+
};
|
|
91
133
|
/**
|
|
92
134
|
* で read as the verb 出る right after a word with no particle between (JSON でない): the copula's で, which the tokenizer
|
|
93
135
|
* misreads after a space or a name. 出る after a particle (結果がでない) or at the head of a sentence (でない音) is the verb.
|
package/dist/word-use.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"word-use.js","sourceRoot":"","sources":["../src/word-use.ts"],"names":[],"mappings":"AAaA,qJAAqJ;AACrJ,MAAM,mBAAmB,GAAG,yBAAyB,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AAG,KAAK,MAAM,IAAI,KAAK,CAAC,OAAO,KAAK,GAAG,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,GAAG,KAAK,KAAK,CAAC;AAEpG,MAAM,YAAY,GAAG,UAAU,CAAC;AAChC,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACvC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAa,EAAW,EAAE,CAC3E,KAAK,CAAC,GAAG,KAAK,MAAM;IACpB,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;IACjC,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC;IAC3B,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAEtH,sFAAsF;AACtF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAY,EAAW,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,KAAK,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chaffjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "Prose validation harness. Finds what is hard to read, and never rewrites it for you.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chaff",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"README.md",
|
|
70
70
|
"README.ja.md",
|
|
71
71
|
"bin",
|
|
72
|
+
"checks",
|
|
72
73
|
"dist",
|
|
73
74
|
"genres.yaml",
|
|
74
75
|
"profiles",
|
|
@@ -88,8 +89,8 @@
|
|
|
88
89
|
},
|
|
89
90
|
"dependencies": {
|
|
90
91
|
"@anthropic-ai/sdk": "^0.125.0",
|
|
91
|
-
"@chaffjs/lang-en": "0.
|
|
92
|
-
"@chaffjs/lang-ja": "0.
|
|
92
|
+
"@chaffjs/lang-en": "0.37.0",
|
|
93
|
+
"@chaffjs/lang-ja": "0.39.0",
|
|
93
94
|
"character-entities": "^2.0.2",
|
|
94
95
|
"mdast-util-from-markdown": "^2.0.3",
|
|
95
96
|
"mdast-util-frontmatter": "^2.0.1",
|