chaffjs 0.37.0 → 0.39.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 +22 -4
- package/README.md +21 -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/acronym-expansions.d.ts.map +1 -1
- package/dist/acronym-expansions.js +8 -1
- package/dist/acronym-expansions.js.map +1 -1
- package/dist/ai-score/human-shares.d.ts.map +1 -1
- package/dist/ai-score/human-shares.js +85 -16
- 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 +8 -0
- package/dist/alternative-words.d.ts.map +1 -0
- package/dist/alternative-words.js +15 -0
- package/dist/alternative-words.js.map +1 -0
- package/dist/article-h-style.d.ts +7 -0
- package/dist/article-h-style.d.ts.map +1 -0
- package/dist/article-h-style.js +12 -0
- package/dist/article-h-style.js.map +1 -0
- 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/bracket-annotation.d.ts +6 -0
- package/dist/bracket-annotation.d.ts.map +1 -0
- package/dist/bracket-annotation.js +46 -0
- package/dist/bracket-annotation.js.map +1 -0
- 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/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/compare/misopened-quotes.d.ts +7 -0
- package/dist/compare/misopened-quotes.d.ts.map +1 -0
- package/dist/compare/misopened-quotes.js +22 -0
- package/dist/compare/misopened-quotes.js.map +1 -0
- package/dist/compare/outcome.d.ts +2 -0
- package/dist/compare/outcome.d.ts.map +1 -1
- package/dist/compare/outcome.js +5 -2
- package/dist/compare/outcome.js.map +1 -1
- package/dist/compare/render.d.ts +1 -1
- package/dist/compare/render.d.ts.map +1 -1
- package/dist/compare/render.js +14 -4
- package/dist/compare/render.js.map +1 -1
- package/dist/compare/respelled.d.ts +19 -0
- package/dist/compare/respelled.d.ts.map +1 -0
- package/dist/compare/respelled.js +52 -0
- package/dist/compare/respelled.js.map +1 -0
- package/dist/compare/text-atoms.d.ts +1 -1
- package/dist/compare/text-atoms.d.ts.map +1 -1
- package/dist/compare/text-atoms.js +8 -2
- package/dist/compare/text-atoms.js.map +1 -1
- package/dist/compare/text.d.ts +2 -1
- package/dist/compare/text.d.ts.map +1 -1
- package/dist/compare/text.js +7 -2
- package/dist/compare/text.js.map +1 -1
- package/dist/contact-entry.d.ts +8 -0
- package/dist/contact-entry.d.ts.map +1 -0
- package/dist/contact-entry.js +16 -0
- package/dist/contact-entry.js.map +1 -0
- package/dist/contraction-words.d.ts +2 -0
- package/dist/contraction-words.d.ts.map +1 -0
- package/dist/contraction-words.js +11 -0
- package/dist/contraction-words.js.map +1 -0
- package/dist/derived/relative-dates.d.ts +4 -0
- package/dist/derived/relative-dates.d.ts.map +1 -1
- package/dist/derived/relative-dates.js +28 -1
- package/dist/derived/relative-dates.js.map +1 -1
- package/dist/detectors/abnf-grammar.d.ts +10 -0
- package/dist/detectors/abnf-grammar.d.ts.map +1 -0
- package/dist/detectors/abnf-grammar.js +65 -0
- package/dist/detectors/abnf-grammar.js.map +1 -0
- package/dist/detectors/acronym-context.d.ts +12 -0
- package/dist/detectors/acronym-context.d.ts.map +1 -1
- package/dist/detectors/acronym-context.js +44 -1
- 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 +52 -3
- package/dist/detectors/acronym-expansion.js.map +1 -1
- package/dist/detectors/acronym-gloss.d.ts +23 -0
- package/dist/detectors/acronym-gloss.d.ts.map +1 -0
- package/dist/detectors/acronym-gloss.js +143 -0
- package/dist/detectors/acronym-gloss.js.map +1 -0
- package/dist/detectors/acronym-known.d.ts +1 -1
- package/dist/detectors/acronym-known.d.ts.map +1 -1
- package/dist/detectors/acronym-known.js +11 -3
- package/dist/detectors/acronym-known.js.map +1 -1
- package/dist/detectors/acronym-name.d.ts +9 -2
- package/dist/detectors/acronym-name.d.ts.map +1 -1
- package/dist/detectors/acronym-name.js +13 -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/adversative-ga.d.ts +4 -0
- package/dist/detectors/adversative-ga.d.ts.map +1 -0
- package/dist/detectors/adversative-ga.js +19 -0
- package/dist/detectors/adversative-ga.js.map +1 -0
- package/dist/detectors/agreement-slip.d.ts +3 -1
- package/dist/detectors/agreement-slip.d.ts.map +1 -1
- package/dist/detectors/agreement-slip.js +31 -3
- package/dist/detectors/agreement-slip.js.map +1 -1
- package/dist/detectors/ai-phrasing.d.ts +5 -7
- package/dist/detectors/ai-phrasing.d.ts.map +1 -1
- package/dist/detectors/ai-phrasing.js +22 -18
- 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 +5 -0
- package/dist/detectors/alnum-number.d.ts.map +1 -0
- package/dist/detectors/alnum-number.js +15 -0
- package/dist/detectors/alnum-number.js.map +1 -0
- package/dist/detectors/asker-voice.d.ts +6 -0
- package/dist/detectors/asker-voice.d.ts.map +1 -0
- package/dist/detectors/asker-voice.js +18 -0
- package/dist/detectors/asker-voice.js.map +1 -0
- package/dist/detectors/bare-comparative.d.ts +12 -0
- package/dist/detectors/bare-comparative.d.ts.map +1 -1
- package/dist/detectors/bare-comparative.js +77 -12
- package/dist/detectors/bare-comparative.js.map +1 -1
- package/dist/detectors/blank-structure.d.ts.map +1 -1
- package/dist/detectors/blank-structure.js +4 -0
- package/dist/detectors/blank-structure.js.map +1 -1
- 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 +5 -0
- package/dist/detectors/bold-emphasis.d.ts.map +1 -0
- package/dist/detectors/bold-emphasis.js +40 -0
- package/dist/detectors/bold-emphasis.js.map +1 -0
- package/dist/detectors/bold-label.d.ts +2 -0
- package/dist/detectors/bold-label.d.ts.map +1 -1
- package/dist/detectors/bold-label.js +2 -0
- package/dist/detectors/bold-label.js.map +1 -1
- package/dist/detectors/broken-link.d.ts.map +1 -1
- package/dist/detectors/broken-link.js +13 -4
- package/dist/detectors/broken-link.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/case-citation.d.ts +15 -0
- package/dist/detectors/case-citation.d.ts.map +1 -0
- package/dist/detectors/case-citation.js +50 -0
- package/dist/detectors/case-citation.js.map +1 -0
- package/dist/detectors/char-shape.d.ts.map +1 -1
- package/dist/detectors/char-shape.js +179 -28
- 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-entry.d.ts +4 -0
- package/dist/detectors/citation-entry.d.ts.map +1 -1
- package/dist/detectors/citation-entry.js +17 -5
- package/dist/detectors/citation-entry.js.map +1 -1
- package/dist/detectors/citation-marks.d.ts +8 -0
- package/dist/detectors/citation-marks.d.ts.map +1 -1
- package/dist/detectors/citation-marks.js +74 -13
- package/dist/detectors/citation-marks.js.map +1 -1
- package/dist/detectors/citation-note.d.ts +18 -0
- package/dist/detectors/citation-note.d.ts.map +1 -0
- package/dist/detectors/citation-note.js +60 -0
- package/dist/detectors/citation-note.js.map +1 -0
- package/dist/detectors/citation-string.d.ts +3 -0
- package/dist/detectors/citation-string.d.ts.map +1 -0
- package/dist/detectors/citation-string.js +34 -0
- package/dist/detectors/citation-string.js.map +1 -0
- package/dist/detectors/citation-style.d.ts.map +1 -1
- package/dist/detectors/citation-style.js +3 -1
- package/dist/detectors/citation-style.js.map +1 -1
- package/dist/detectors/clause-shape.d.ts.map +1 -1
- package/dist/detectors/clause-shape.js +24 -2
- package/dist/detectors/clause-shape.js.map +1 -1
- 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/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 +16 -0
- package/dist/detectors/coordinate-adjective.d.ts.map +1 -0
- package/dist/detectors/coordinate-adjective.js +36 -0
- package/dist/detectors/coordinate-adjective.js.map +1 -0
- package/dist/detectors/date-run.d.ts +15 -0
- package/dist/detectors/date-run.d.ts.map +1 -0
- package/dist/detectors/date-run.js +35 -0
- package/dist/detectors/date-run.js.map +1 -0
- package/dist/detectors/date-year.d.ts +5 -2
- package/dist/detectors/date-year.d.ts.map +1 -1
- package/dist/detectors/date-year.js +27 -11
- package/dist/detectors/date-year.js.map +1 -1
- package/dist/detectors/dateline.d.ts +16 -0
- package/dist/detectors/dateline.d.ts.map +1 -0
- package/dist/detectors/dateline.js +34 -0
- package/dist/detectors/dateline.js.map +1 -0
- package/dist/detectors/defined-term-form.d.ts +5 -2
- package/dist/detectors/defined-term-form.d.ts.map +1 -1
- package/dist/detectors/defined-term-form.js +18 -7
- package/dist/detectors/defined-term-form.js.map +1 -1
- package/dist/detectors/definition-scope-unit.d.ts +9 -0
- package/dist/detectors/definition-scope-unit.d.ts.map +1 -0
- package/dist/detectors/definition-scope-unit.js +67 -0
- package/dist/detectors/definition-scope-unit.js.map +1 -0
- package/dist/detectors/definition-use.d.ts.map +1 -1
- package/dist/detectors/definition-use.js +11 -3
- package/dist/detectors/definition-use.js.map +1 -1
- package/dist/detectors/division-label-separator.d.ts +8 -0
- package/dist/detectors/division-label-separator.d.ts.map +1 -0
- package/dist/detectors/division-label-separator.js +22 -0
- package/dist/detectors/division-label-separator.js.map +1 -0
- package/dist/detectors/document-shape.d.ts +6 -0
- package/dist/detectors/document-shape.d.ts.map +1 -1
- package/dist/detectors/document-shape.js +22 -1
- package/dist/detectors/document-shape.js.map +1 -1
- package/dist/detectors/doubled-punctuation.d.ts.map +1 -1
- package/dist/detectors/doubled-punctuation.js +16 -1
- package/dist/detectors/doubled-punctuation.js.map +1 -1
- package/dist/detectors/doubled-word.d.ts.map +1 -1
- package/dist/detectors/doubled-word.js +15 -2
- package/dist/detectors/doubled-word.js.map +1 -1
- 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 +6 -7
- package/dist/detectors/email-letter.d.ts.map +1 -1
- package/dist/detectors/email-letter.js +24 -24
- package/dist/detectors/email-letter.js.map +1 -1
- package/dist/detectors/empty-intensifier.d.ts +11 -0
- package/dist/detectors/empty-intensifier.d.ts.map +1 -0
- package/dist/detectors/empty-intensifier.js +28 -0
- package/dist/detectors/empty-intensifier.js.map +1 -0
- package/dist/detectors/en-shape.d.ts.map +1 -1
- package/dist/detectors/en-shape.js +9 -5
- package/dist/detectors/en-shape.js.map +1 -1
- package/dist/detectors/example-baseline.d.ts +7 -0
- package/dist/detectors/example-baseline.d.ts.map +1 -0
- package/dist/detectors/example-baseline.js +21 -0
- package/dist/detectors/example-baseline.js.map +1 -0
- package/dist/detectors/figure-number-list.d.ts +24 -0
- package/dist/detectors/figure-number-list.d.ts.map +1 -0
- package/dist/detectors/figure-number-list.js +78 -0
- package/dist/detectors/figure-number-list.js.map +1 -0
- package/dist/detectors/figure-order.d.ts +10 -0
- package/dist/detectors/figure-order.d.ts.map +1 -1
- package/dist/detectors/figure-order.js +36 -2
- package/dist/detectors/figure-order.js.map +1 -1
- package/dist/detectors/fullwidth-alnum.d.ts.map +1 -1
- package/dist/detectors/fullwidth-alnum.js +45 -8
- package/dist/detectors/fullwidth-alnum.js.map +1 -1
- package/dist/detectors/grade-ladder.d.ts +3 -0
- package/dist/detectors/grade-ladder.d.ts.map +1 -0
- package/dist/detectors/grade-ladder.js +19 -0
- package/dist/detectors/grade-ladder.js.map +1 -0
- package/dist/detectors/gram-furniture.d.ts +23 -1
- package/dist/detectors/gram-furniture.d.ts.map +1 -1
- package/dist/detectors/gram-furniture.js +79 -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-case.d.ts +7 -0
- package/dist/detectors/heading-case.d.ts.map +1 -1
- package/dist/detectors/heading-case.js +10 -2
- package/dist/detectors/heading-case.js.map +1 -1
- package/dist/detectors/heading-end-mark.d.ts.map +1 -1
- package/dist/detectors/heading-end-mark.js +9 -3
- package/dist/detectors/heading-end-mark.js.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/detectors/heading-numbering.js +4 -3
- package/dist/detectors/heading-numbering.js.map +1 -1
- package/dist/detectors/humble-for-others.d.ts +4 -0
- package/dist/detectors/humble-for-others.d.ts.map +1 -0
- package/dist/detectors/humble-for-others.js +53 -0
- package/dist/detectors/humble-for-others.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 +46 -0
- package/dist/detectors/kanji-name-edge.d.ts.map +1 -0
- package/dist/detectors/kanji-name-edge.js +94 -0
- package/dist/detectors/kanji-name-edge.js.map +1 -0
- package/dist/detectors/kanji-run-pieces.d.ts +30 -0
- package/dist/detectors/kanji-run-pieces.d.ts.map +1 -0
- package/dist/detectors/kanji-run-pieces.js +58 -0
- package/dist/detectors/kanji-run-pieces.js.map +1 -0
- package/dist/detectors/kutoten-consistency.d.ts.map +1 -1
- package/dist/detectors/kutoten-consistency.js +31 -6
- package/dist/detectors/kutoten-consistency.js.map +1 -1
- package/dist/detectors/lead-in-dash.d.ts +12 -0
- package/dist/detectors/lead-in-dash.d.ts.map +1 -0
- package/dist/detectors/lead-in-dash.js +50 -0
- package/dist/detectors/lead-in-dash.js.map +1 -0
- 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.map +1 -1
- package/dist/detectors/lexicon.js +19 -5
- package/dist/detectors/lexicon.js.map +1 -1
- package/dist/detectors/licence-notice.d.ts +9 -0
- package/dist/detectors/licence-notice.d.ts.map +1 -0
- package/dist/detectors/licence-notice.js +23 -0
- package/dist/detectors/licence-notice.js.map +1 -0
- package/dist/detectors/link-label.d.ts +3 -0
- package/dist/detectors/link-label.d.ts.map +1 -0
- package/dist/detectors/link-label.js +15 -0
- package/dist/detectors/link-label.js.map +1 -0
- package/dist/detectors/link-shape.d.ts +4 -1
- package/dist/detectors/link-shape.d.ts.map +1 -1
- package/dist/detectors/link-shape.js +7 -3
- package/dist/detectors/link-shape.js.map +1 -1
- package/dist/detectors/list-comma-aside.d.ts +14 -0
- package/dist/detectors/list-comma-aside.d.ts.map +1 -0
- package/dist/detectors/list-comma-aside.js +49 -0
- package/dist/detectors/list-comma-aside.js.map +1 -0
- 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 +6 -1
- package/dist/detectors/list-lead-in.d.ts.map +1 -1
- package/dist/detectors/list-lead-in.js +69 -4
- 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 +155 -21
- 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 +13 -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 +4 -1
- package/dist/detectors/mark-shape.d.ts.map +1 -1
- package/dist/detectors/mark-shape.js +28 -7
- package/dist/detectors/mark-shape.js.map +1 -1
- package/dist/detectors/markdown-slip.d.ts.map +1 -1
- package/dist/detectors/markdown-slip.js +24 -10
- package/dist/detectors/markdown-slip.js.map +1 -1
- package/dist/detectors/missing-final-period.d.ts +2 -1
- package/dist/detectors/missing-final-period.d.ts.map +1 -1
- package/dist/detectors/missing-final-period.js +28 -3
- package/dist/detectors/missing-final-period.js.map +1 -1
- package/dist/detectors/name-list-sentence.d.ts +3 -0
- package/dist/detectors/name-list-sentence.d.ts.map +1 -0
- package/dist/detectors/name-list-sentence.js +26 -0
- package/dist/detectors/name-list-sentence.js.map +1 -0
- 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-reference-list.d.ts +14 -0
- package/dist/detectors/name-variant-reference-list.d.ts.map +1 -0
- package/dist/detectors/name-variant-reference-list.js +21 -0
- package/dist/detectors/name-variant-reference-list.js.map +1 -0
- 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 +18 -18
- package/dist/detectors/name-variant.js.map +1 -1
- package/dist/detectors/next-word.d.ts +4 -1
- package/dist/detectors/next-word.d.ts.map +1 -1
- package/dist/detectors/next-word.js +26 -9
- package/dist/detectors/next-word.js.map +1 -1
- package/dist/detectors/number-style.d.ts.map +1 -1
- package/dist/detectors/number-style.js +16 -1
- package/dist/detectors/number-style.js.map +1 -1
- package/dist/detectors/numbering-readings.d.ts +8 -0
- package/dist/detectors/numbering-readings.d.ts.map +1 -0
- package/dist/detectors/numbering-readings.js +17 -0
- package/dist/detectors/numbering-readings.js.map +1 -0
- package/dist/detectors/numeral-opener.d.ts +5 -2
- package/dist/detectors/numeral-opener.d.ts.map +1 -1
- package/dist/detectors/numeral-opener.js +30 -4
- package/dist/detectors/numeral-opener.js.map +1 -1
- package/dist/detectors/open-end-names.d.ts.map +1 -1
- package/dist/detectors/open-end-names.js +23 -2
- package/dist/detectors/open-end-names.js.map +1 -1
- package/dist/detectors/open-end-scope.d.ts +2 -0
- package/dist/detectors/open-end-scope.d.ts.map +1 -1
- package/dist/detectors/open-end-scope.js +22 -1
- package/dist/detectors/open-end-scope.js.map +1 -1
- package/dist/detectors/opener-phrase.d.ts +6 -0
- package/dist/detectors/opener-phrase.d.ts.map +1 -0
- package/dist/detectors/opener-phrase.js +15 -0
- package/dist/detectors/opener-phrase.js.map +1 -0
- package/dist/detectors/opener-tail.d.ts +7 -0
- package/dist/detectors/opener-tail.d.ts.map +1 -0
- package/dist/detectors/opener-tail.js +18 -0
- package/dist/detectors/opener-tail.js.map +1 -0
- package/dist/detectors/organisation-run.d.ts +8 -1
- package/dist/detectors/organisation-run.d.ts.map +1 -1
- package/dist/detectors/organisation-run.js +29 -4
- package/dist/detectors/organisation-run.js.map +1 -1
- package/dist/detectors/orthographic-variant-open.d.ts +35 -0
- package/dist/detectors/orthographic-variant-open.d.ts.map +1 -0
- package/dist/detectors/orthographic-variant-open.js +79 -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 +85 -118
- package/dist/detectors/orthographic-variant.js.map +1 -1
- package/dist/detectors/orthography.d.ts.map +1 -1
- package/dist/detectors/orthography.js +5 -0
- package/dist/detectors/orthography.js.map +1 -1
- package/dist/detectors/over-general-claim.d.ts +11 -0
- package/dist/detectors/over-general-claim.d.ts.map +1 -0
- package/dist/detectors/over-general-claim.js +115 -0
- package/dist/detectors/over-general-claim.js.map +1 -0
- package/dist/detectors/oxford-comma.d.ts.map +1 -1
- package/dist/detectors/oxford-comma.js +80 -27
- package/dist/detectors/oxford-comma.js.map +1 -1
- package/dist/detectors/paragraph-run.d.ts +2 -1
- package/dist/detectors/paragraph-run.d.ts.map +1 -1
- package/dist/detectors/paragraph-run.js +4 -2
- package/dist/detectors/paragraph-run.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/phrase-match.d.ts +6 -1
- package/dist/detectors/phrase-match.d.ts.map +1 -1
- package/dist/detectors/phrase-match.js +5 -0
- package/dist/detectors/phrase-match.js.map +1 -1
- package/dist/detectors/placeholder-text.d.ts +1 -1
- package/dist/detectors/placeholder-text.d.ts.map +1 -1
- package/dist/detectors/placeholder-text.js +57 -1
- 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/q-fragment-answer.d.ts +15 -0
- package/dist/detectors/q-fragment-answer.d.ts.map +1 -0
- package/dist/detectors/q-fragment-answer.js +51 -0
- package/dist/detectors/q-fragment-answer.js.map +1 -0
- package/dist/detectors/quotation-paragraph.d.ts +10 -0
- package/dist/detectors/quotation-paragraph.d.ts.map +1 -0
- package/dist/detectors/quotation-paragraph.js +22 -0
- package/dist/detectors/quotation-paragraph.js.map +1 -0
- 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/quoted-sentences.d.ts +6 -0
- package/dist/detectors/quoted-sentences.d.ts.map +1 -0
- package/dist/detectors/quoted-sentences.js +61 -0
- package/dist/detectors/quoted-sentences.js.map +1 -0
- package/dist/detectors/quoted-wording.d.ts +9 -0
- package/dist/detectors/quoted-wording.d.ts.map +1 -0
- package/dist/detectors/quoted-wording.js +18 -0
- package/dist/detectors/quoted-wording.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 +7 -0
- package/dist/detectors/register-neutral-shape.d.ts.map +1 -0
- package/dist/detectors/register-neutral-shape.js +54 -0
- package/dist/detectors/register-neutral-shape.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/bold-emphasis.d.ts +3 -0
- package/dist/detectors/registry/bold-emphasis.d.ts.map +1 -0
- package/dist/detectors/registry/bold-emphasis.js +3 -0
- package/dist/detectors/registry/bold-emphasis.js.map +1 -0
- 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/empty-intensifier.d.ts +3 -0
- package/dist/detectors/registry/empty-intensifier.d.ts.map +1 -0
- package/dist/detectors/registry/empty-intensifier.js +3 -0
- package/dist/detectors/registry/empty-intensifier.js.map +1 -0
- package/dist/detectors/registry/humble-for-others.d.ts +3 -0
- package/dist/detectors/registry/humble-for-others.d.ts.map +1 -0
- package/dist/detectors/registry/humble-for-others.js +3 -0
- package/dist/detectors/registry/humble-for-others.js.map +1 -0
- package/dist/detectors/registry/ngram-repetition.js +1 -1
- package/dist/detectors/registry/ngram-repetition.js.map +1 -1
- package/dist/detectors/registry/over-general-claim.d.ts +3 -0
- package/dist/detectors/registry/over-general-claim.d.ts.map +1 -0
- package/dist/detectors/registry/over-general-claim.js +3 -0
- package/dist/detectors/registry/over-general-claim.js.map +1 -0
- 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/q-fragment-answer.d.ts +3 -0
- package/dist/detectors/registry/q-fragment-answer.d.ts.map +1 -0
- package/dist/detectors/registry/q-fragment-answer.js +3 -0
- package/dist/detectors/registry/q-fragment-answer.js.map +1 -0
- 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/registry/unused-definition.d.ts.map +1 -1
- package/dist/detectors/registry/unused-definition.js +2 -2
- package/dist/detectors/registry/unused-definition.js.map +1 -1
- package/dist/detectors/registry/weasel-word.d.ts +3 -0
- package/dist/detectors/registry/weasel-word.d.ts.map +1 -0
- package/dist/detectors/registry/weasel-word.js +3 -0
- package/dist/detectors/registry/weasel-word.js.map +1 -0
- package/dist/detectors/relative-dates.d.ts.map +1 -1
- package/dist/detectors/relative-dates.js +1 -0
- package/dist/detectors/relative-dates.js.map +1 -1
- package/dist/detectors/relative-pronoun-mix.d.ts.map +1 -1
- package/dist/detectors/relative-pronoun-mix.js +9 -2
- package/dist/detectors/relative-pronoun-mix.js.map +1 -1
- package/dist/detectors/reported-speech.d.ts +14 -0
- package/dist/detectors/reported-speech.d.ts.map +1 -0
- package/dist/detectors/reported-speech.js +36 -0
- package/dist/detectors/reported-speech.js.map +1 -0
- package/dist/detectors/request-owner.d.ts +7 -1
- package/dist/detectors/request-owner.d.ts.map +1 -1
- package/dist/detectors/request-owner.js +45 -2
- package/dist/detectors/request-owner.js.map +1 -1
- package/dist/detectors/revision-date.d.ts +30 -0
- package/dist/detectors/revision-date.d.ts.map +1 -0
- package/dist/detectors/revision-date.js +55 -0
- package/dist/detectors/revision-date.js.map +1 -0
- package/dist/detectors/sentence-counts.d.ts +7 -2
- package/dist/detectors/sentence-counts.d.ts.map +1 -1
- package/dist/detectors/sentence-counts.js +31 -7
- package/dist/detectors/sentence-counts.js.map +1 -1
- package/dist/detectors/sentence-ending.d.ts +13 -1
- package/dist/detectors/sentence-ending.d.ts.map +1 -1
- package/dist/detectors/sentence-ending.js +55 -10
- 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 +40 -4
- package/dist/detectors/sentence-length.js.map +1 -1
- package/dist/detectors/sentence-load.d.ts +8 -4
- package/dist/detectors/sentence-load.d.ts.map +1 -1
- package/dist/detectors/sentence-load.js +9 -7
- package/dist/detectors/sentence-load.js.map +1 -1
- package/dist/detectors/sentence-parts.d.ts +9 -0
- package/dist/detectors/sentence-parts.d.ts.map +1 -0
- package/dist/detectors/sentence-parts.js +62 -0
- package/dist/detectors/sentence-parts.js.map +1 -0
- package/dist/detectors/sentence-title.d.ts +19 -0
- package/dist/detectors/sentence-title.d.ts.map +1 -0
- package/dist/detectors/sentence-title.js +53 -0
- package/dist/detectors/sentence-title.js.map +1 -0
- package/dist/detectors/signals.d.ts +4 -2
- package/dist/detectors/signals.d.ts.map +1 -1
- package/dist/detectors/signals.js +30 -175
- package/dist/detectors/signals.js.map +1 -1
- package/dist/detectors/spreadsheet-grid.d.ts +3 -0
- package/dist/detectors/spreadsheet-grid.d.ts.map +1 -0
- package/dist/detectors/spreadsheet-grid.js +16 -0
- package/dist/detectors/spreadsheet-grid.js.map +1 -0
- package/dist/detectors/structure-tree.d.ts.map +1 -1
- package/dist/detectors/structure-tree.js +13 -18
- 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 +32 -13
- 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-phrase.d.ts +14 -0
- package/dist/detectors/superlative-phrase.d.ts.map +1 -0
- package/dist/detectors/superlative-phrase.js +52 -0
- package/dist/detectors/superlative-phrase.js.map +1 -0
- package/dist/detectors/superlative-scope.d.ts +7 -2
- package/dist/detectors/superlative-scope.d.ts.map +1 -1
- package/dist/detectors/superlative-scope.js +35 -7
- 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 +10 -1
- package/dist/detectors/titled-run.d.ts.map +1 -1
- package/dist/detectors/titled-run.js +21 -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 +36 -12
- 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/typewritten.d.ts +3 -0
- package/dist/detectors/typewritten.d.ts.map +1 -0
- package/dist/detectors/typewritten.js +6 -0
- package/dist/detectors/typewritten.js.map +1 -0
- package/dist/detectors/undefined-term.d.ts +7 -1
- package/dist/detectors/undefined-term.d.ts.map +1 -1
- package/dist/detectors/undefined-term.js +34 -11
- package/dist/detectors/undefined-term.js.map +1 -1
- package/dist/detectors/unfilled-placeholder.d.ts +4 -1
- package/dist/detectors/unfilled-placeholder.d.ts.map +1 -1
- package/dist/detectors/unfilled-placeholder.js +8 -3
- package/dist/detectors/unfilled-placeholder.js.map +1 -1
- package/dist/detectors/unknown-word-context.d.ts +28 -0
- package/dist/detectors/unknown-word-context.d.ts.map +1 -0
- package/dist/detectors/unknown-word-context.js +89 -0
- package/dist/detectors/unknown-word-context.js.map +1 -0
- package/dist/detectors/unknown-word.d.ts.map +1 -1
- package/dist/detectors/unknown-word.js +16 -11
- 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/detectors/unused-definition-kept.d.ts +12 -0
- package/dist/detectors/unused-definition-kept.d.ts.map +1 -0
- package/dist/detectors/unused-definition-kept.js +61 -0
- package/dist/detectors/unused-definition-kept.js.map +1 -0
- package/dist/detectors/weasel-word.d.ts +3 -0
- package/dist/detectors/weasel-word.d.ts.map +1 -0
- package/dist/detectors/weasel-word.js +22 -0
- package/dist/detectors/weasel-word.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/document.d.ts.map +1 -1
- package/dist/document.js +10 -5
- package/dist/document.js.map +1 -1
- package/dist/field-label-heading.d.ts +8 -0
- package/dist/field-label-heading.d.ts.map +1 -0
- package/dist/field-label-heading.js +32 -0
- package/dist/field-label-heading.js.map +1 -0
- 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/furigana.d.ts +2 -2
- package/dist/furigana.d.ts.map +1 -1
- package/dist/furigana.js +9 -5
- package/dist/furigana.js.map +1 -1
- package/dist/genre-load.d.ts.map +1 -1
- package/dist/genre-load.js +3 -2
- package/dist/genre-load.js.map +1 -1
- package/dist/heading-numbering.d.ts +9 -2
- package/dist/heading-numbering.d.ts.map +1 -1
- package/dist/heading-numbering.js +55 -11
- package/dist/heading-numbering.js.map +1 -1
- package/dist/honorific-group.d.ts +8 -0
- package/dist/honorific-group.d.ts.map +1 -0
- package/dist/honorific-group.js +15 -0
- package/dist/honorific-group.js.map +1 -0
- package/dist/html/html-elements.d.ts +1 -0
- package/dist/html/html-elements.d.ts.map +1 -1
- package/dist/html/html-elements.js +1 -1
- package/dist/html/html-elements.js.map +1 -1
- package/dist/html/html-footnote-marks.d.ts.map +1 -1
- package/dist/html/html-footnote-marks.js +10 -4
- package/dist/html/html-footnote-marks.js.map +1 -1
- package/dist/html/html-heading-links.d.ts +2 -5
- package/dist/html/html-heading-links.d.ts.map +1 -1
- package/dist/html/html-heading-links.js +19 -2
- package/dist/html/html-heading-links.js.map +1 -1
- package/dist/html/html-links.d.ts +5 -0
- package/dist/html/html-links.d.ts.map +1 -0
- package/dist/html/html-links.js +59 -0
- package/dist/html/html-links.js.map +1 -0
- package/dist/html/html-markdown.d.ts.map +1 -1
- package/dist/html/html-markdown.js +30 -35
- package/dist/html/html-markdown.js.map +1 -1
- package/dist/html/html-section-number.d.ts +5 -0
- package/dist/html/html-section-number.d.ts.map +1 -0
- package/dist/html/html-section-number.js +19 -0
- package/dist/html/html-section-number.js.map +1 -0
- 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/html/html-tables.d.ts +1 -1
- package/dist/html/html-tables.d.ts.map +1 -1
- package/dist/html/html-tables.js +24 -7
- package/dist/html/html-tables.js.map +1 -1
- package/dist/html/html-widgets.d.ts +7 -0
- package/dist/html/html-widgets.d.ts.map +1 -1
- package/dist/html/html-widgets.js +33 -2
- package/dist/html/html-widgets.js.map +1 -1
- 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/link-path.d.ts +10 -0
- package/dist/link-path.d.ts.map +1 -0
- package/dist/link-path.js +66 -0
- package/dist/link-path.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-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-form.d.ts +14 -0
- package/dist/name-word-form.d.ts.map +1 -0
- package/dist/name-word-form.js +34 -0
- package/dist/name-word-form.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/newsletter-issue.d.ts +12 -0
- package/dist/newsletter-issue.d.ts.map +1 -0
- package/dist/newsletter-issue.js +24 -0
- package/dist/newsletter-issue.js.map +1 -0
- package/dist/note-paragraphs.d.ts +8 -0
- package/dist/note-paragraphs.d.ts.map +1 -0
- package/dist/note-paragraphs.js +37 -0
- package/dist/note-paragraphs.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-runs.d.ts +8 -3
- package/dist/paragraph-runs.d.ts.map +1 -1
- package/dist/paragraph-runs.js +29 -3
- package/dist/paragraph-runs.js.map +1 -1
- package/dist/plugin.d.ts +9 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/profile/parse.d.ts.map +1 -1
- package/dist/profile/parse.js +9 -0
- package/dist/profile/parse.js.map +1 -1
- 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/return-type.d.ts +2 -0
- package/dist/return-type.d.ts.map +1 -1
- package/dist/return-type.js +34 -15
- package/dist/return-type.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/rule-offs.d.ts +6 -0
- package/dist/rule-offs.d.ts.map +1 -1
- package/dist/rule-offs.js +6 -0
- package/dist/rule-offs.js.map +1 -1
- 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 +13 -0
- 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 +31 -3
- package/dist/sentence-load.js.map +1 -1
- package/dist/single-quoted-span.d.ts +8 -0
- package/dist/single-quoted-span.d.ts.map +1 -0
- package/dist/single-quoted-span.js +30 -0
- package/dist/single-quoted-span.js.map +1 -0
- package/dist/spelling-mention.d.ts +7 -0
- package/dist/spelling-mention.d.ts.map +1 -0
- package/dist/spelling-mention.js +24 -0
- package/dist/spelling-mention.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/stage-directions.d.ts +12 -0
- package/dist/stage-directions.d.ts.map +1 -0
- package/dist/stage-directions.js +29 -0
- package/dist/stage-directions.js.map +1 -0
- package/dist/stray-space.d.ts.map +1 -1
- package/dist/stray-space.js +19 -4
- package/dist/stray-space.js.map +1 -1
- package/dist/structure/alternative-clause.d.ts +9 -0
- package/dist/structure/alternative-clause.d.ts.map +1 -0
- package/dist/structure/alternative-clause.js +43 -0
- package/dist/structure/alternative-clause.js.map +1 -0
- package/dist/structure/build.d.ts.map +1 -1
- package/dist/structure/build.js +7 -2
- package/dist/structure/build.js.map +1 -1
- package/dist/structure/change-rate.d.ts.map +1 -1
- package/dist/structure/change-rate.js +20 -1
- package/dist/structure/change-rate.js.map +1 -1
- package/dist/structure/cited-document-section.d.ts.map +1 -1
- package/dist/structure/cited-document-section.js +15 -1
- package/dist/structure/cited-document-section.js.map +1 -1
- package/dist/structure/cited-elsewhere.d.ts +4 -0
- package/dist/structure/cited-elsewhere.d.ts.map +1 -0
- package/dist/structure/cited-elsewhere.js +15 -0
- package/dist/structure/cited-elsewhere.js.map +1 -0
- package/dist/structure/definition-use.d.ts +7 -4
- package/dist/structure/definition-use.d.ts.map +1 -1
- package/dist/structure/definition-use.js +32 -6
- package/dist/structure/definition-use.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 +36 -7
- package/dist/structure/issues.js.map +1 -1
- package/dist/structure/joined-labels.d.ts +8 -0
- package/dist/structure/joined-labels.d.ts.map +1 -0
- package/dist/structure/joined-labels.js +19 -0
- package/dist/structure/joined-labels.js.map +1 -0
- package/dist/structure/numbering.d.ts +10 -1
- package/dist/structure/numbering.d.ts.map +1 -1
- package/dist/structure/numbering.js +13 -5
- package/dist/structure/numbering.js.map +1 -1
- package/dist/structure/restated-name.d.ts +7 -0
- package/dist/structure/restated-name.d.ts.map +1 -0
- package/dist/structure/restated-name.js +25 -0
- package/dist/structure/restated-name.js.map +1 -0
- package/dist/structure/summary-lines.d.ts +15 -0
- package/dist/structure/summary-lines.d.ts.map +1 -0
- package/dist/structure/summary-lines.js +19 -0
- package/dist/structure/summary-lines.js.map +1 -0
- package/dist/structure/title-lines.d.ts.map +1 -1
- package/dist/structure/title-lines.js +41 -8
- package/dist/structure/title-lines.js.map +1 -1
- package/dist/structure/unit-word.d.ts +6 -0
- package/dist/structure/unit-word.d.ts.map +1 -1
- package/dist/structure/unit-word.js +10 -0
- package/dist/structure/unit-word.js.map +1 -1
- package/dist/structure/wrapped-reference.d.ts +10 -0
- package/dist/structure/wrapped-reference.d.ts.map +1 -0
- package/dist/structure/wrapped-reference.js +17 -0
- package/dist/structure/wrapped-reference.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/subheading-line.d.ts +4 -1
- package/dist/subheading-line.d.ts.map +1 -1
- package/dist/subheading-line.js +14 -2
- package/dist/subheading-line.js.map +1 -1
- 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 +91 -3
- package/dist/topic-clause.js.map +1 -1
- package/dist/voice-parts.d.ts +12 -0
- package/dist/voice-parts.d.ts.map +1 -0
- package/dist/voice-parts.js +8 -0
- package/dist/voice-parts.js.map +1 -0
- package/dist/word-use.d.ts +51 -0
- package/dist/word-use.d.ts.map +1 -0
- package/dist/word-use.js +151 -0
- package/dist/word-use.js.map +1 -0
- package/genres.yaml +4 -0
- package/package.json +4 -3
- package/profiles/play.yaml +14 -0
- package/profiles/verse.yaml +14 -0
- package/rules/acronym-expansion-conflict.yaml +2 -2
- package/rules/adversative-ga-repeat.yaml +3 -3
- package/rules/agreement-slip.yaml +20 -7
- package/rules/ai-generated-composite.yaml +11 -3
- package/rules/ai-structure.yaml +7 -6
- package/rules/ai-tell.yaml +4 -4
- package/rules/all-caps-shouting.yaml +2 -2
- package/rules/announced-count-mismatch.yaml +2 -2
- package/rules/article-sound.yaml +2 -2
- package/rules/bold-emphasis.yaml +114 -0
- package/rules/bold-label-list.yaml +38 -5
- package/rules/bracket-nesting.yaml +2 -2
- package/rules/bracket-width-consistency.yaml +11 -11
- package/rules/citation-reference-mismatch.yaml +2 -2
- package/rules/clause-chain.yaml +2 -0
- package/rules/closing-cliche.yaml +4 -5
- package/rules/closing-exhortation.yaml +74 -0
- package/rules/cold-open.yaml +95 -0
- package/rules/colloquial-opener.yaml +2 -2
- package/rules/colon-lead-in.yaml +68 -10
- package/rules/comparative-without-baseline.yaml +2 -2
- package/rules/concrete-evidence-density.yaml +3 -2
- package/rules/contrast-framing.yaml +16 -13
- package/rules/dangling-reference.yaml +2 -2
- package/rules/date-weekday-mismatch.yaml +2 -2
- package/rules/date-without-year.yaml +5 -5
- package/rules/defined-name-repeated.yaml +2 -2
- package/rules/defined-term-form.yaml +2 -2
- package/rules/demonstrative-opener-run.yaml +4 -2
- package/rules/doubled-punctuation.yaml +2 -2
- package/rules/doubled-word.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/empty-intensifier.yaml +3 -3
- package/rules/figure-reference-order.yaml +2 -2
- package/rules/fullwidth-alnum-consistency.yaml +2 -2
- package/rules/generic-opening.yaml +63 -0
- package/rules/heading-end-punctuation-mix.yaml +2 -2
- package/rules/heading-level-skip.yaml +2 -2
- package/rules/heading-numbering-mix.yaml +20 -20
- package/rules/humble-for-others.yaml +4 -3
- package/rules/hyphen-as-dash.yaml +2 -2
- package/rules/kutoten-consistency.yaml +4 -4
- package/rules/latin-spacing.yaml +3 -2
- package/rules/link-text-url-mismatch.yaml +4 -4
- package/rules/list-item-form-mix.yaml +21 -6
- package/rules/max-kanji-continuous.yaml +36 -5
- package/rules/max-paragraph-length.yaml +2 -0
- package/rules/max-sentence-length.yaml +4 -2
- package/rules/max-ten.yaml +1 -0
- 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 +8 -2
- package/rules/number-style-consistency.yaml +2 -2
- package/rules/numbering-gap.yaml +2 -2
- package/rules/numeral-sentence-start.yaml +2 -2
- package/rules/one-sentence-paragraph-run.yaml +3 -2
- package/rules/orthographic-variant.yaml +2 -2
- package/rules/over-general-claim.yaml +73 -0
- package/rules/oxford-comma-consistency.yaml +15 -3
- package/rules/proper-noun-density.yaml +14 -7
- package/rules/q-fragment-answer.yaml +69 -0
- package/rules/relative-date-mismatch.yaml +2 -2
- package/rules/repeated-sentence-ending.yaml +2 -0
- package/rules/request-without-deadline.yaml +2 -2
- package/rules/requirement-smell.yaml +2 -2
- package/rules/return-type-mismatch.yaml +2 -2
- package/rules/rule-of-three.yaml +3 -3
- package/rules/section-length-uniformity.yaml +2 -2
- package/rules/sentence-initial-conjunction-run.yaml +2 -2
- package/rules/sentence-rhythm.yaml +7 -4
- package/rules/stray-space.yaml +2 -2
- package/rules/taigen-dome-in-prose.yaml +2 -2
- package/rules/tari-unpaired.yaml +2 -2
- package/rules/teki-overuse.yaml +2 -2
- package/rules/title-case-consistency.yaml +4 -4
- package/rules/title-length.yaml +9 -2
- package/rules/topic-predicate-distance.yaml +5 -2
- package/rules/undefined-acronym.yaml +10 -2
- package/rules/undefined-term.yaml +2 -2
- package/rules/unfilled-placeholder.yaml +4 -4
- package/rules/unknown-word.yaml +2 -2
- package/rules/unprompted-denial.yaml +88 -0
- package/rules/unqualified-superlative.yaml +8 -2
- package/rules/unused-definition.yaml +2 -2
- package/rules/use-before-definition.yaml +2 -2
- package/rules/weasel-word.yaml +4 -3
- package/rules/which-that-consistency.yaml +2 -2
- package/rules/wordy-phrase.yaml +2 -2
- package/skills/chaff/SKILL.md +45 -8
- package/src/acronym-expansion.ts +57 -0
- package/src/acronym-expansions.ts +11 -1
- package/src/ai-score/human-shares.ts +85 -16
- package/src/ai-score/of-document.ts +5 -2
- package/src/alternative-words.ts +20 -0
- package/src/article-h-style.ts +16 -0
- package/src/body-section.ts +11 -2
- package/src/bracket-annotation.ts +57 -0
- 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/commands/fix-plan.ts +72 -5
- package/src/commands/test.ts +18 -2
- package/src/compare/misopened-quotes.ts +26 -0
- package/src/compare/outcome.ts +11 -2
- package/src/compare/render.ts +20 -7
- package/src/compare/respelled.ts +68 -0
- package/src/compare/text-atoms.ts +9 -2
- package/src/compare/text.ts +12 -3
- package/src/contact-entry.ts +19 -0
- package/src/contraction-words.ts +11 -0
- package/src/derived/relative-dates.ts +32 -1
- package/src/detectors/abnf-grammar.ts +79 -0
- package/src/detectors/acronym-context.ts +61 -1
- package/src/detectors/acronym-expansion.ts +57 -4
- package/src/detectors/acronym-gloss.ts +157 -0
- package/src/detectors/acronym-known.ts +11 -3
- package/src/detectors/acronym-name.ts +22 -3
- package/src/detectors/acronym-series.ts +27 -0
- package/src/detectors/adversative-ga.ts +26 -0
- package/src/detectors/agreement-slip.ts +33 -4
- package/src/detectors/ai-phrasing.ts +25 -20
- package/src/detectors/ai-structure.ts +23 -6
- package/src/detectors/alnum-number.ts +16 -0
- package/src/detectors/asker-voice.ts +24 -0
- package/src/detectors/bare-comparative.ts +103 -13
- package/src/detectors/blank-structure.ts +9 -0
- package/src/detectors/bold-emphasis-form.ts +58 -0
- package/src/detectors/bold-emphasis.ts +44 -0
- package/src/detectors/bold-label.ts +3 -0
- package/src/detectors/broken-link.ts +13 -4
- package/src/detectors/caps-caption.ts +24 -2
- package/src/detectors/case-citation.ts +70 -0
- package/src/detectors/char-shape.ts +240 -33
- package/src/detectors/chat-log-line.ts +17 -0
- package/src/detectors/citation-entry.ts +22 -7
- package/src/detectors/citation-marks.ts +97 -15
- package/src/detectors/citation-note.ts +78 -0
- package/src/detectors/citation-string.ts +36 -0
- package/src/detectors/citation-style.ts +6 -1
- package/src/detectors/clause-shape.ts +27 -2
- 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/contrast-frame.ts +65 -7
- package/src/detectors/coordinate-adjective.ts +43 -0
- package/src/detectors/date-run.ts +39 -0
- package/src/detectors/date-year.ts +44 -10
- package/src/detectors/dateline.ts +48 -0
- package/src/detectors/defined-term-form.ts +24 -7
- package/src/detectors/definition-scope-unit.ts +90 -0
- package/src/detectors/definition-use.ts +18 -5
- package/src/detectors/division-label-separator.ts +25 -0
- package/src/detectors/document-shape.ts +24 -1
- package/src/detectors/doubled-punctuation.ts +19 -1
- package/src/detectors/doubled-word.ts +21 -2
- package/src/detectors/duplicate-heading.ts +44 -15
- package/src/detectors/email-frame-words.ts +39 -0
- package/src/detectors/email-letter.ts +26 -23
- package/src/detectors/empty-intensifier.ts +36 -0
- package/src/detectors/en-shape.ts +11 -5
- package/src/detectors/example-baseline.ts +31 -0
- package/src/detectors/figure-number-list.ts +101 -0
- package/src/detectors/figure-order.ts +43 -2
- package/src/detectors/fullwidth-alnum.ts +59 -9
- package/src/detectors/grade-ladder.ts +23 -0
- package/src/detectors/gram-furniture.ts +96 -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-case.ts +11 -2
- package/src/detectors/heading-end-mark.ts +12 -4
- package/src/detectors/heading-level-skip.ts +31 -1
- package/src/detectors/heading-numbering.ts +12 -3
- package/src/detectors/humble-for-others.ts +63 -0
- package/src/detectors/hyphen-copied-text.ts +65 -0
- package/src/detectors/kanji-name-edge.ts +110 -0
- package/src/detectors/kanji-run-pieces.ts +86 -0
- package/src/detectors/kutoten-consistency.ts +36 -6
- package/src/detectors/lead-in-dash.ts +54 -0
- package/src/detectors/letter-joined-name.ts +14 -0
- package/src/detectors/lexicon.ts +27 -5
- package/src/detectors/licence-notice.ts +30 -0
- package/src/detectors/link-label.ts +17 -0
- package/src/detectors/link-shape.ts +7 -3
- package/src/detectors/list-comma-aside.ts +58 -0
- 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 +78 -3
- package/src/detectors/list-parallel.ts +175 -20
- package/src/detectors/list-run.ts +86 -0
- package/src/detectors/list-sentence.ts +13 -0
- package/src/detectors/mark-shape.ts +35 -8
- package/src/detectors/markdown-slip.ts +20 -3
- package/src/detectors/missing-final-period.ts +42 -5
- package/src/detectors/name-list-sentence.ts +28 -0
- package/src/detectors/name-run.ts +2 -1
- package/src/detectors/name-variant-reference-list.ts +34 -0
- package/src/detectors/name-variant-two-things.ts +136 -0
- package/src/detectors/name-variant.ts +18 -22
- package/src/detectors/next-word.ts +38 -9
- package/src/detectors/number-style.ts +17 -1
- package/src/detectors/numbering-readings.ts +22 -0
- package/src/detectors/numeral-opener.ts +37 -5
- package/src/detectors/open-end-names.ts +23 -2
- package/src/detectors/open-end-scope.ts +32 -2
- package/src/detectors/opener-phrase.ts +15 -0
- package/src/detectors/opener-tail.ts +19 -0
- package/src/detectors/organisation-run.ts +29 -4
- package/src/detectors/orthographic-variant-open.ts +119 -0
- package/src/detectors/orthographic-variant.ts +120 -179
- package/src/detectors/orthography.ts +4 -0
- package/src/detectors/over-general-claim.ts +145 -0
- package/src/detectors/oxford-comma.ts +85 -28
- package/src/detectors/paragraph-run.ts +11 -2
- package/src/detectors/particle-run-names.ts +17 -0
- package/src/detectors/phrase-match.ts +6 -0
- package/src/detectors/placeholder-text.ts +62 -1
- package/src/detectors/proper-noun-density.ts +109 -0
- package/src/detectors/q-fragment-answer.ts +64 -0
- package/src/detectors/quotation-paragraph.ts +28 -0
- package/src/detectors/quoted-excerpt.ts +68 -0
- package/src/detectors/quoted-sentences.ts +62 -0
- package/src/detectors/quoted-wording.ts +28 -0
- package/src/detectors/reference-entry.ts +42 -0
- package/src/detectors/register-neutral-shape.ts +66 -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/bold-emphasis.ts +4 -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/empty-intensifier.ts +4 -0
- package/src/detectors/registry/humble-for-others.ts +4 -0
- package/src/detectors/registry/ngram-repetition.ts +1 -1
- package/src/detectors/registry/over-general-claim.ts +4 -0
- package/src/detectors/registry/proper-noun-density.ts +1 -1
- package/src/detectors/registry/q-fragment-answer.ts +4 -0
- package/src/detectors/registry/topic-predicate-distance.ts +1 -1
- package/src/detectors/registry/unprompted-denial.ts +4 -0
- package/src/detectors/registry/unused-definition.ts +2 -2
- package/src/detectors/registry/weasel-word.ts +4 -0
- package/src/detectors/relative-dates.ts +1 -0
- package/src/detectors/relative-pronoun-mix.ts +12 -2
- package/src/detectors/reported-speech.ts +37 -0
- package/src/detectors/request-owner.ts +62 -2
- package/src/detectors/revision-date.ts +80 -0
- package/src/detectors/sentence-counts.ts +35 -8
- package/src/detectors/sentence-ending.ts +87 -13
- package/src/detectors/sentence-length.ts +50 -6
- package/src/detectors/sentence-load.ts +9 -8
- package/src/detectors/sentence-parts.ts +70 -0
- package/src/detectors/sentence-title.ts +70 -0
- package/src/detectors/signals.ts +34 -207
- package/src/detectors/spreadsheet-grid.ts +20 -0
- package/src/detectors/structure-tree.ts +16 -18
- package/src/detectors/structure.ts +35 -15
- package/src/detectors/superlative-clause.ts +21 -2
- package/src/detectors/superlative-context.ts +99 -0
- package/src/detectors/superlative-phrase.ts +57 -0
- package/src/detectors/superlative-scope.ts +43 -10
- package/src/detectors/team.ts +1 -50
- package/src/detectors/titled-code-citation.ts +19 -0
- package/src/detectors/titled-run.ts +31 -5
- package/src/detectors/token-shape.ts +42 -15
- package/src/detectors/topic-predicate-distance.ts +25 -0
- package/src/detectors/typewritten.ts +7 -0
- package/src/detectors/undefined-term.ts +45 -9
- package/src/detectors/unfilled-placeholder.ts +8 -3
- package/src/detectors/unknown-word-context.ts +112 -0
- package/src/detectors/unknown-word.ts +19 -12
- package/src/detectors/unprompted-denial.ts +133 -0
- package/src/detectors/unused-definition-kept.ts +80 -0
- package/src/detectors/weasel-word.ts +24 -0
- package/src/document-sections.ts +3 -1
- package/src/document.ts +17 -6
- package/src/field-label-heading.ts +41 -0
- 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/furigana.ts +9 -5
- package/src/genre-load.ts +3 -2
- package/src/heading-numbering.ts +67 -13
- package/src/honorific-group.ts +22 -0
- package/src/html/html-elements.ts +1 -1
- package/src/html/html-footnote-marks.ts +12 -4
- package/src/html/html-heading-links.ts +25 -2
- package/src/html/html-links.ts +70 -0
- package/src/html/html-markdown.ts +42 -36
- package/src/html/html-section-number.ts +20 -0
- package/src/html/html-site-chrome.ts +9 -2
- package/src/html/html-tables.ts +29 -7
- package/src/html/html-widgets.ts +48 -1
- package/src/law-title.ts +38 -0
- package/src/link-path.ts +70 -0
- package/src/name-ending-run.ts +49 -0
- package/src/name-title-slip.ts +59 -0
- package/src/name-variant-shapes.ts +58 -0
- package/src/name-word-form.ts +42 -0
- package/src/name-word-use.ts +17 -0
- package/src/newsletter-issue.ts +38 -0
- package/src/note-paragraphs.ts +48 -0
- package/src/opening-passage.ts +31 -0
- package/src/paragraph-runs.ts +38 -4
- package/src/plugin.ts +6 -0
- package/src/profile/parse.ts +11 -0
- package/src/quote-gloss.ts +11 -0
- package/src/quoted-spelling.ts +48 -0
- package/src/render/semantic.ts +2 -2
- package/src/return-type.ts +38 -16
- package/src/rule-of-three.ts +50 -0
- package/src/rule-offs.ts +10 -0
- package/src/run-semantic.ts +2 -2
- package/src/section-levels.ts +98 -0
- package/src/semantic.ts +14 -0
- package/src/sentence-load.ts +38 -4
- package/src/single-quoted-span.ts +40 -0
- package/src/spelling-mention.ts +30 -0
- package/src/spelling.ts +37 -7
- package/src/stage-directions.ts +39 -0
- package/src/stray-space.ts +24 -5
- package/src/structure/alternative-clause.ts +46 -0
- package/src/structure/build.ts +13 -2
- package/src/structure/change-rate.ts +21 -1
- package/src/structure/cited-document-section.ts +16 -1
- package/src/structure/cited-elsewhere.ts +23 -0
- package/src/structure/definition-use.ts +42 -7
- package/src/structure/issues.ts +42 -7
- package/src/structure/joined-labels.ts +24 -0
- package/src/structure/numbering.ts +23 -4
- package/src/structure/restated-name.ts +28 -0
- package/src/structure/summary-lines.ts +26 -0
- package/src/structure/title-lines.ts +40 -2
- package/src/structure/unit-word.ts +12 -0
- package/src/structure/wrapped-reference.ts +25 -0
- package/src/structure-shape/template-outline.ts +34 -0
- package/src/subheading-line.ts +17 -2
- package/src/title-case-name.ts +55 -0
- package/src/topic-clause.ts +115 -5
- package/src/voice-parts.ts +11 -0
- package/src/word-use.ts +213 -0
|
@@ -27,6 +27,16 @@ const verbAfterSubject = (tokens: readonly Token[], at: number, subjects: Lexico
|
|
|
27
27
|
return isVerbal(tokens[phraseEnd(tokens, at)]);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* 代名詞の後ろの一語で節が終わる(the files you own.)。品詞の読みが own を形容詞とすることがあるので、品詞でなく
|
|
32
|
+
* 節の終わりで読む。代名詞と一語だけの節は、名詞句を限る節のほかにない。
|
|
33
|
+
*/
|
|
34
|
+
const closingWord = (tokens: readonly Token[], at: number): boolean => {
|
|
35
|
+
const word = tokens[at];
|
|
36
|
+
const next = tokens[at + 1];
|
|
37
|
+
return word !== undefined && word.pos !== "PUNCT" && (next === undefined || next.pos === "PUNCT");
|
|
38
|
+
};
|
|
39
|
+
|
|
30
40
|
const isArticle = (token: Token | undefined): boolean => token?.features?.["PronType"] === "Art";
|
|
31
41
|
|
|
32
42
|
/**
|
|
@@ -34,7 +44,7 @@ const isArticle = (token: Token | undefined): boolean => token?.features?.["Pron
|
|
|
34
44
|
* each・all のような限定詞(The best teams all adapt)や、冠詞の無い名詞(The best teams adapt)は節の始まりと読まない。
|
|
35
45
|
*/
|
|
36
46
|
const contactClause = (tokens: readonly Token[], at: number, subjects: Lexicon): boolean => {
|
|
37
|
-
if (isWord(tokens[at], subjects)) return isVerbal(tokens[at + 1]);
|
|
47
|
+
if (isWord(tokens[at], subjects)) return isVerbal(tokens[at + 1]) || closingWord(tokens, at + 1);
|
|
38
48
|
return isArticle(tokens[at]) && isVerbal(tokens[phraseEnd(tokens, at + 1)]);
|
|
39
49
|
};
|
|
40
50
|
|
|
@@ -64,10 +74,19 @@ const participle = (tokens: readonly Token[], range: TokenRange, at: number): bo
|
|
|
64
74
|
const bounded = (tokens: readonly Token[], range: TokenRange, at: number, bounds: Lexicon): boolean =>
|
|
65
75
|
isWord(tokens[range.end], bounds) || isWord(tokens[at], bounds);
|
|
66
76
|
|
|
77
|
+
/**
|
|
78
|
+
* 修飾の語の並びが動詞で終わって、その後ろに代名詞の主語が来る(the most irreplaceable files you own)。修飾の動詞の後ろには
|
|
79
|
+
* 名詞が要るので、終わりの「動詞」は名詞を動詞と読んだもの。分詞(the most watched)は Part なので除く。
|
|
80
|
+
*/
|
|
81
|
+
const headReadAsVerb = (tokens: readonly Token[], range: TokenRange, at: number, subjects: Lexicon): boolean => {
|
|
82
|
+
const last = tokens[at - 1];
|
|
83
|
+
return at > range.end && last?.pos === "VERB" && last.features?.["VerbForm"] !== "Part" && isWord(tokens[at], subjects);
|
|
84
|
+
};
|
|
85
|
+
|
|
67
86
|
/** 修飾の語は名詞の前に来るので、句の後ろで止まった分詞は名詞の後ろにある。 */
|
|
68
87
|
const clauseOrParticiple = (tokens: readonly Token[], range: TokenRange, at: number, restrictors: Restrictors): boolean => {
|
|
69
88
|
const last = tokens[at - 1];
|
|
70
|
-
const endsPhrase = at === range.end || (last !== undefined && PHRASE_END.has(last.pos));
|
|
89
|
+
const endsPhrase = at === range.end || (last !== undefined && (PHRASE_END.has(last.pos) || headReadAsVerb(tokens, range, at, restrictors.subjects)));
|
|
71
90
|
return (endsPhrase && clause(tokens, at, restrictors)) || participle(tokens, range, at);
|
|
72
91
|
};
|
|
73
92
|
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { Lexicon, LexiconEntry, Sentence, Token } from "../plugin.ts";
|
|
2
|
+
import { entryEndsAt, entryRanges, type TokenRange } from "./lexicon-match.ts";
|
|
3
|
+
import { phraseEnd } from "./superlative-scope.ts";
|
|
4
|
+
|
|
5
|
+
/** 最上級の周りで、比べて言い切ってはいないことを示す語。どれも言語パッケージの語彙表が持つ。 */
|
|
6
|
+
export type Context = {
|
|
7
|
+
/** 求める・選ぶ動詞(achieve・decide・求める)。position は最上級のどちら側に立つか。 */
|
|
8
|
+
readonly goals: Lexicon;
|
|
9
|
+
/** 述語の後ろで、どれが最もなのかを指す語(the one・the second)。 */
|
|
10
|
+
readonly referents: Lexicon;
|
|
11
|
+
/** 誰にとっての最もなのかを言う語(にとって)。 */
|
|
12
|
+
readonly viewpoints: Lexicon;
|
|
13
|
+
/** 全体の部分を言う名詞(part・role・step)。 */
|
|
14
|
+
readonly parts: Lexicon;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** 語彙表の語が最上級まで届く語の数。これより離れた動詞は、間に別の目的語や節がある。 */
|
|
18
|
+
const GOAL_REACH = 4;
|
|
19
|
+
|
|
20
|
+
/** 文の終わりの記号の後ろに付く、閉じの記号と強調の印(?」・?**)。 */
|
|
21
|
+
const CLOSING = new Set(" \t\n*_\"'”’」』))]");
|
|
22
|
+
const QUESTION = new Set(["?", "?"]);
|
|
23
|
+
|
|
24
|
+
/** 問いの文(What takes the longest?・最も良い道は何か?)。問う文は何かが一番だと言い切っていない。 */
|
|
25
|
+
export const asked = (sentence: Sentence): boolean => {
|
|
26
|
+
const chars = [...sentence.text];
|
|
27
|
+
return QUESTION.has(chars[chars.findLastIndex((char) => !CLOSING.has(char))] ?? "");
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** 語彙表から、最上級の周りを読む語を集める。 */
|
|
31
|
+
export const contextOf = (lexicons: Readonly<Record<string, Lexicon>>): Context => ({
|
|
32
|
+
goals: lexicons["superlative-goal"] ?? [],
|
|
33
|
+
referents: lexicons["superlative-referent"] ?? [],
|
|
34
|
+
viewpoints: lexicons["superlative-viewpoint"] ?? [],
|
|
35
|
+
parts: lexicons["superlative-part"] ?? [],
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const isPunct = (token: Token | undefined): boolean => token === undefined || token.pos === "PUNCT";
|
|
39
|
+
|
|
40
|
+
/** from 番目から to 番目の手前までに句読点が無いか。句読点を越えた語は別の節にかかる。 */
|
|
41
|
+
const sameClause = (tokens: readonly Token[], from: number, to: number): boolean => !tokens.slice(from, to).some((token) => isPunct(token));
|
|
42
|
+
|
|
43
|
+
/** 語彙の語が、最上級の手前 reach 語までのどこかで終わり、間に句読点が無いか。 */
|
|
44
|
+
const endsBefore = (tokens: readonly Token[], range: TokenRange, entry: LexiconEntry, reach: number): boolean => {
|
|
45
|
+
const ends = Array.from({ length: Math.min(reach, range.start) + 1 }, (_unused, back) => range.start - back);
|
|
46
|
+
return ends.some((end) => entryEndsAt(tokens, entry, end) && sameClause(tokens, end, range.start));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** 語彙の語が最上級より後ろにあるか。 */
|
|
50
|
+
const after = (sentence: Sentence, range: TokenRange, entry: LexiconEntry): boolean => entryRanges(sentence, entry).some((found) => found.start >= range.end);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 最上級が、求めるか選ぶものとして書かれているか(achieve the best results・decide the best way・最高の規律が求められる)。
|
|
54
|
+
* 目指す先や選ぶ基準を言っていて、何かが一番だという主張ではない。英語の動詞は最上級の前に、日本語の述語は後ろに来る。
|
|
55
|
+
*/
|
|
56
|
+
export const sought = (sentence: Sentence, range: TokenRange, goals: Lexicon): boolean => {
|
|
57
|
+
const tokens = sentence.tokens ?? [];
|
|
58
|
+
return goals.some((entry) => (entry.position === "after" ? after(sentence, range, entry) : endsBefore(tokens, range, entry, GOAL_REACH)));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const isWord = (token: Token | undefined, words: Lexicon): boolean =>
|
|
62
|
+
token !== undefined && words.some((entry) => entry.pattern.toLowerCase() === token.surface.toLowerCase());
|
|
63
|
+
|
|
64
|
+
const VERBAL = new Set(["VERB", "AUX"]);
|
|
65
|
+
|
|
66
|
+
const isVerbal = (token: Token | undefined): boolean => VERBAL.has(token?.pos ?? "");
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 名詞句の後ろの述語の動詞。数(the best one is)の後ろの動詞は修飾として句に読み込まれるので、句の最後の語も見る。
|
|
70
|
+
*/
|
|
71
|
+
const verbAt = (tokens: readonly Token[], range: TokenRange, end: number): number | undefined => {
|
|
72
|
+
if (isVerbal(tokens[end])) return end;
|
|
73
|
+
return end - 1 > range.end && isVerbal(tokens[end - 1]) ? end - 1 : undefined;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 最上級の名詞句が主語で、述語がどれかを指しているか(The best plan is the one you keep・The most important divergence is
|
|
78
|
+
* the second)。どれが一番なのかを決める言い方で、一番だという主張ではない。
|
|
79
|
+
*/
|
|
80
|
+
export const pointsAtReferent = (tokens: readonly Token[], range: TokenRange, referents: Lexicon): boolean => {
|
|
81
|
+
const end = phraseEnd(tokens, range.end);
|
|
82
|
+
const at = verbAt(tokens, range, end);
|
|
83
|
+
if (at === undefined) return false;
|
|
84
|
+
const next = tokens[at + 1]?.pos === "DET" ? at + 2 : at + 1;
|
|
85
|
+
return isWord(tokens[next], referents);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/** 誰にとっての最もなのかが、同じ節の最上級より前にあるか(俺にとって今日は最高の日だ)。 */
|
|
89
|
+
export const viewpointBefore = (tokens: readonly Token[], range: TokenRange, viewpoints: Lexicon): boolean =>
|
|
90
|
+
viewpoints.some((entry) => endsBefore(tokens, range, entry, range.start));
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 最上級の名詞が全体の部分を言うか(the most important part・the most important role)。比べているのは、文章が述べている
|
|
94
|
+
* 全体の部分どうしで、世の中のものと比べた主張ではない。名詞は最上級の修飾の後ろに来る(英語)。
|
|
95
|
+
*/
|
|
96
|
+
export const ranksParts = (tokens: readonly Token[], range: TokenRange, parts: Lexicon): boolean => {
|
|
97
|
+
const at = phraseEnd(tokens, range.end);
|
|
98
|
+
return at > range.end && isWord(tokens[at - 1], parts);
|
|
99
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Lexicon, Token } from "../plugin.ts";
|
|
2
|
+
import { comparableWords, type TokenRange } from "./lexicon-match.ts";
|
|
3
|
+
import { isNamed } from "./superlative-scope.ts";
|
|
4
|
+
|
|
5
|
+
const SPACE = /\s+/gu;
|
|
6
|
+
|
|
7
|
+
/** 語の並びの字(空白を除き、照らす形に)。 */
|
|
8
|
+
const lettersOf = (text: string): string => comparableWords(text).replace(SPACE, "");
|
|
9
|
+
|
|
10
|
+
/** start 番目の語から、end 番目より手前で終わらずに、語の並びの字がちょうど phrase になるか。 */
|
|
11
|
+
const runsTo = (words: readonly string[], start: number, end: number, phrase: string): boolean => {
|
|
12
|
+
let joined = words.slice(start, end).join("");
|
|
13
|
+
for (let next = end; joined.length < phrase.length && next < words.length; next += 1) joined += words[next];
|
|
14
|
+
return joined === phrase;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** 最上級の始まりから前へ、言い方の字数に収まるだけ戻った始まりの候補。 */
|
|
18
|
+
const startsWithin = (words: readonly string[], range: TokenRange, length: number): number[] => {
|
|
19
|
+
const starts: number[] = [];
|
|
20
|
+
let joined = words.slice(range.start, range.end).join("").length;
|
|
21
|
+
for (let start = range.start; start >= 0 && joined <= length; start -= 1) {
|
|
22
|
+
starts.push(start);
|
|
23
|
+
joined += words[start - 1]?.length ?? 0;
|
|
24
|
+
}
|
|
25
|
+
return starts;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 言い方が、語の境目で始まり語の境目で終わる語の並びとして、最上級を包んでいるか。字で照らすので、言い方を単独で
|
|
30
|
+
* 分けたとき(最高裁判所で 1 語)と文の中で分けたとき(最高|裁判所)とで語の切り方が違っても当たる。
|
|
31
|
+
*/
|
|
32
|
+
const wraps = (words: readonly string[], range: TokenRange, phrase: string): boolean =>
|
|
33
|
+
startsWithin(words, range, phrase.length).some((start) => runsTo(words, start, range.end, phrase));
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 最上級を含む決まった言い方の中にあるか(even the best・in the best case・最高裁判所・最も近い)。譲歩や仮定、職名、
|
|
37
|
+
* 場所からの近さを言っていて、何かが一番だという主張ではない。言い方は言語パッケージの語彙表 superlative-phrase が持つ。
|
|
38
|
+
*/
|
|
39
|
+
export const inPhrase = (tokens: readonly Token[], range: TokenRange, phrases: Lexicon): boolean => {
|
|
40
|
+
if (phrases.length === 0) return false;
|
|
41
|
+
const words = tokens.map((token) => lettersOf(token.surface));
|
|
42
|
+
return phrases.some((entry) => wraps(words, range, lettersOf(entry.pattern)));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 持ち主の名前と「の」が、空白を挟まずに最上級のすぐ前にあるか(芭蕉の最も有名な作品・国連の最も大事な目的)。
|
|
47
|
+
* 何の中で最もなのか(芭蕉の作品の中で)を言っている。範囲の「で」と同じく、前の語が名前のときだけ。「そのあとの最大の山場」
|
|
48
|
+
* 「大切なことの最大の理由」の「あと」「こと」は持ち主ではない。持ち主を受ける語は言語パッケージの語彙表 superlative-owner が持つ。
|
|
49
|
+
*/
|
|
50
|
+
export const ownedBefore = (tokens: readonly Token[], range: TokenRange, owners: Lexicon): boolean => {
|
|
51
|
+
const owner = tokens[range.start - 2];
|
|
52
|
+
const marker = tokens[range.start - 1];
|
|
53
|
+
const first = tokens[range.start];
|
|
54
|
+
if (owner === undefined || marker === undefined || first === undefined || !isNamed(owner)) return false;
|
|
55
|
+
const joined = owner.span.end === marker.span.start && marker.span.end === first.span.start;
|
|
56
|
+
return joined && owners.some((entry) => entry.pattern === marker.surface);
|
|
57
|
+
};
|
|
@@ -8,14 +8,20 @@ import type { TokenRange } from "./lexicon-match.ts";
|
|
|
8
8
|
export type ScopeMarkers = {
|
|
9
9
|
/** 最上級の直前に置く語(で)。その前に固有名詞か地名が要る。 */
|
|
10
10
|
readonly before: Lexicon;
|
|
11
|
-
/** 最上級の名詞句の直後に置く語(in・of
|
|
11
|
+
/** 最上級の名詞句の直後に置く語(in・of)。その後ろに名詞句か動名詞が要る。 */
|
|
12
12
|
readonly after: Lexicon;
|
|
13
|
+
/** 名詞句の直後で、動名詞が続くときだけ範囲を言う語(the best tool for creating)。for + 名詞(the best opportunity for government)は受け手。 */
|
|
14
|
+
readonly purposes: Lexicon;
|
|
15
|
+
/** 名前でなくても、範囲の「で」の前で範囲になる名詞(世界で唯一の・業界で最も)。 */
|
|
16
|
+
readonly realms: Lexicon;
|
|
13
17
|
};
|
|
14
18
|
|
|
15
19
|
/** 語彙表の position で分ける。position の無い語は、どちら側の語か分からないので使わない。 */
|
|
16
|
-
export const scopeMarkersOf = (lexicon: Lexicon): ScopeMarkers => ({
|
|
20
|
+
export const scopeMarkersOf = (lexicon: Lexicon, purposes: Lexicon = [], realms: Lexicon = []): ScopeMarkers => ({
|
|
17
21
|
before: lexicon.filter((entry) => entry.position === "before"),
|
|
18
22
|
after: lexicon.filter((entry) => entry.position === "after"),
|
|
23
|
+
purposes,
|
|
24
|
+
realms,
|
|
19
25
|
});
|
|
20
26
|
|
|
21
27
|
const NOMINAL = new Set(["NOUN", "PROPN"]);
|
|
@@ -33,7 +39,7 @@ export const PHRASE_END = new Set(["NOUN", "PROPN", "NUM", "ADJ"]);
|
|
|
33
39
|
const isMarker = (token: Token | undefined, markers: Lexicon): boolean =>
|
|
34
40
|
token !== undefined && markers.some((entry) => entry.pattern.toLowerCase() === token.surface.toLowerCase());
|
|
35
41
|
|
|
36
|
-
const isNamed = (token: Token | undefined): boolean => token !== undefined && (token.pos === "PROPN" || token.features?.["NameType"] !== undefined);
|
|
42
|
+
export const isNamed = (token: Token | undefined): boolean => token !== undefined && (token.pos === "PROPN" || token.features?.["NameType"] !== undefined);
|
|
37
43
|
|
|
38
44
|
/** 空白も助詞も挟まずに名詞が付いた最上級(国内最大・業界最速・世界唯一)。前の名詞が範囲。 */
|
|
39
45
|
const compound = (tokens: readonly Token[], range: TokenRange): boolean => {
|
|
@@ -54,9 +60,23 @@ const clauseBefore = (tokens: readonly Token[], range: TokenRange): boolean => {
|
|
|
54
60
|
return before !== undefined && first !== undefined && CLAUSE_END.has(before.pos) && before.surface === before.lemma && before.span.end === first.span.start;
|
|
55
61
|
};
|
|
56
62
|
|
|
57
|
-
/**
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
/**
|
|
64
|
+
* 名前 + 範囲の語 + 最上級(日本で最も・トヨタで最も・東京都で最大)。「費用で最大の効果」の「費用」は名前ではないので範囲にしない。
|
|
65
|
+
* 名前でなくても、場や分野を言う名詞(世界で唯一の)は範囲。その名詞は言語パッケージの語彙表 superlative-realm が持つ。
|
|
66
|
+
*/
|
|
67
|
+
const namedBefore = (tokens: readonly Token[], range: TokenRange, markers: ScopeMarkers): boolean =>
|
|
68
|
+
isMarker(tokens[range.start - 1], markers.before) && (isNamed(tokens[range.start - 2]) || isMarker(tokens[range.start - 2], markers.realms));
|
|
69
|
+
|
|
70
|
+
const HYPHENS = new Set(["-", "\u2010", "\u2011"]);
|
|
71
|
+
|
|
72
|
+
/** 空白を挟まずに前後の語をつなぐハイフン(commonly-used・award-winning・state-of-the-art)。つないだ語は一つの修飾として読む。 */
|
|
73
|
+
const joiningHyphen = (tokens: readonly Token[], at: number): boolean => {
|
|
74
|
+
const before = tokens[at - 1];
|
|
75
|
+
const token = tokens[at];
|
|
76
|
+
const after = tokens[at + 1];
|
|
77
|
+
if (before === undefined || token === undefined || after === undefined || !HYPHENS.has(token.surface)) return false;
|
|
78
|
+
return before.span.end === token.span.start && token.span.end === after.span.start;
|
|
79
|
+
};
|
|
60
80
|
|
|
61
81
|
/** 最上級に続く名詞句の終わり。名詞が出るまでは修飾を、出た後は名詞の連なりを読む。 */
|
|
62
82
|
export const phraseEnd = (tokens: readonly Token[], at: number, nounSeen = false): number => {
|
|
@@ -64,20 +84,33 @@ export const phraseEnd = (tokens: readonly Token[], at: number, nounSeen = false
|
|
|
64
84
|
let seen = nounSeen;
|
|
65
85
|
for (;;) {
|
|
66
86
|
const token = tokens[end];
|
|
87
|
+
if (joiningHyphen(tokens, end)) {
|
|
88
|
+
end += 2;
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
67
91
|
if (token === undefined || !(seen ? NOUN_RUN : PREMODIFIER).has(token.pos)) return end;
|
|
68
92
|
seen ||= NOMINAL.has(token.pos);
|
|
69
93
|
end += 1;
|
|
70
94
|
}
|
|
71
95
|
};
|
|
72
96
|
|
|
73
|
-
|
|
74
|
-
|
|
97
|
+
const isGerund = (token: Token | undefined): boolean => token?.features?.["VerbForm"] === "Ger";
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* 最上級 + 名詞句 + 範囲の語 + 名詞句か動名詞(the best pizza in Chicago・the most famous of the sculptures・the most common
|
|
101
|
+
* form of debunking)。目的の語(for)は動名詞が続くときだけ(the most important tool for creating the culture)。
|
|
102
|
+
* 動名詞は、最上級に名詞が付いているときだけ範囲を言う。名詞の無い the best in helping teams は何の中で一番なのかを言っていない。
|
|
103
|
+
*/
|
|
104
|
+
const phraseAfter = (tokens: readonly Token[], range: TokenRange, markers: ScopeMarkers): boolean => {
|
|
75
105
|
const at = phraseEnd(tokens, range.end);
|
|
76
106
|
const last = tokens[at - 1];
|
|
77
107
|
const endsPhrase = at === range.end || (last !== undefined && PHRASE_END.has(last.pos));
|
|
78
108
|
const opens = tokens[at + 1];
|
|
79
|
-
|
|
109
|
+
if (!endsPhrase || opens === undefined) return false;
|
|
110
|
+
const gerund = at > range.end && isGerund(opens);
|
|
111
|
+
const scope = isMarker(tokens[at], markers.after) && (PHRASE_START.has(opens.pos) || gerund);
|
|
112
|
+
return scope || (isMarker(tokens[at], markers.purposes) && gerund);
|
|
80
113
|
};
|
|
81
114
|
|
|
82
115
|
export const scoped = (tokens: readonly Token[], range: TokenRange, markers: ScopeMarkers): boolean =>
|
|
83
|
-
compound(tokens, range) || clauseBefore(tokens, range) || namedBefore(tokens, range, markers
|
|
116
|
+
compound(tokens, range) || clauseBefore(tokens, range) || namedBefore(tokens, range, markers) || phraseAfter(tokens, range, markers);
|
package/src/detectors/team.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { proseText } from "../measure.ts";
|
|
2
1
|
import { joinWords } from "./word-list.ts";
|
|
3
|
-
import { wordsOf } from "./structure.ts";
|
|
4
|
-
import { nameSpans } from "../team-names.ts";
|
|
5
2
|
import { conjugatedSpans } from "./conjugated-entry.ts";
|
|
6
|
-
import type { Detector, Finding, LexiconEntry, ProseDocument, Sentence
|
|
3
|
+
import type { Detector, Finding, LexiconEntry, ProseDocument, Sentence } from "../plugin.ts";
|
|
7
4
|
|
|
8
5
|
/**
|
|
9
6
|
* チームの言葉。社内でしか通じない語を、チームが chaff.yaml に自分で並べる。
|
|
@@ -77,49 +74,3 @@ export const requiredSections: Detector = (doc, options): Finding[] => {
|
|
|
77
74
|
},
|
|
78
75
|
];
|
|
79
76
|
};
|
|
80
|
-
|
|
81
|
-
const PER = 1000;
|
|
82
|
-
|
|
83
|
-
/** 密度を見る rule は短い文書を測らない。単位は言語で違うので床も分ける。 */
|
|
84
|
-
const FLOOR = { word: 200, char: 500 };
|
|
85
|
-
|
|
86
|
-
const isProperNoun = (token: Token): boolean => token.pos === "PROPN";
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* 固有名詞の密度。製品名・社名・人名が続くと、知らない読者は文の骨組みを見失う。
|
|
90
|
-
*
|
|
91
|
-
* spec は未知語率としていたが、**品詞解析があれば PROPN を数えるだけで足りる**。
|
|
92
|
-
* 辞書を別に持つ必要はない。
|
|
93
|
-
*/
|
|
94
|
-
const within = (spans: readonly Span[], token: Token): Span | undefined => spans.find((span) => token.span.start >= span.start && token.span.end <= span.end);
|
|
95
|
-
|
|
96
|
-
/** 並べた名前は、何語に割れても 1 つの固有名詞(Bank of England は 2 つでなく 1 つ)。名前の中の 2 語目からを落とす。 */
|
|
97
|
-
const properNounsOf = (sentence: Sentence, names: readonly string[]): Token[] => {
|
|
98
|
-
const named = nameSpans(sentence.text, names).map((span) => ({ start: sentence.span.start + span.start, end: sentence.span.start + span.end }));
|
|
99
|
-
const counted = new Set<Span>();
|
|
100
|
-
return (sentence.tokens ?? []).filter(isProperNoun).filter((token) => {
|
|
101
|
-
const name = within(named, token);
|
|
102
|
-
if (name === undefined) return true;
|
|
103
|
-
if (counted.has(name)) return false;
|
|
104
|
-
counted.add(name);
|
|
105
|
-
return true;
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export const properNounDensity: Detector = (doc, options): Finding[] => {
|
|
110
|
-
const hits = doc.sentences.flatMap((sentence) => properNounsOf(sentence, doc.names ?? []).map((token) => ({ sentence, token })));
|
|
111
|
-
const length = wordsOf(doc);
|
|
112
|
-
const rate = length === 0 ? 0 : Math.round((hits.length / length) * PER);
|
|
113
|
-
const first = hits[0];
|
|
114
|
-
if (length < FLOOR[doc.lengthUnit] || first === undefined || rate <= options.limit) return [];
|
|
115
|
-
return [
|
|
116
|
-
{
|
|
117
|
-
rule: "proper-noun-density",
|
|
118
|
-
severity: "info",
|
|
119
|
-
line: 0,
|
|
120
|
-
column: 0,
|
|
121
|
-
quote: proseText(first.sentence),
|
|
122
|
-
values: { count: hits.length, density: rate, limit: options.limit, offset: first.token.span.start },
|
|
123
|
-
},
|
|
124
|
-
];
|
|
125
|
-
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { oneOf } from "./acronym-name.ts";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 巻の番号と区分で引く法令集の名前(21 CFR subpart J、21 CFR chapter I、40 CFR subchapter C)。巻の番号の後ろの名前に、
|
|
5
|
+
* 区分の語と、その番号(数字、ローマ数字、1 文字の大文字)が続く形だけ。語は語彙表 citation-series から読む。区分の番号が続かない所
|
|
6
|
+
* (The 2 CFR export was generated)は法令集そのものを言うので、略語のまま数える。
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
type Span = { readonly start: number; readonly end: number };
|
|
10
|
+
|
|
11
|
+
const TITLE_NUMBER = String.raw`(?<![\p{L}\p{N}_.,])\d{1,3}[ \t]+`;
|
|
12
|
+
const DIVISION = String.raw`[ \t]+\p{L}+\.?[ \t]+`;
|
|
13
|
+
const DESIGNATOR = String.raw`(?:\d|[IVXLC]+(?![\p{L}\p{N}])|\p{Lu}(?![\p{L}\p{N}]))`;
|
|
14
|
+
|
|
15
|
+
export const titledCodeSpans = (text: string, series: readonly string[]): Span[] => {
|
|
16
|
+
if (series.length === 0) return [];
|
|
17
|
+
const pattern = new RegExp(String.raw`(?<=${TITLE_NUMBER})${oneOf(series)}(?=${DIVISION}${DESIGNATOR})`, "gu");
|
|
18
|
+
return [...text.matchAll(pattern)].map((match) => ({ start: match.index, end: match.index + match[0].length }));
|
|
19
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Token } from "../plugin.ts";
|
|
1
|
+
import type { Span, Token } from "../plugin.ts";
|
|
2
2
|
import { quotedSpans } from "../quoted-span.ts";
|
|
3
3
|
|
|
4
4
|
/** 題の付いたものの名前を閉じる語(語彙表 title-ending: 〜要綱、〜試験、〜事業、〜法)。 */
|
|
@@ -22,11 +22,16 @@ const surfaceOf = (tokens: readonly Token[]): string => tokens.map((token) => to
|
|
|
22
22
|
* 連なりの語(run: 隙間なく並ぶ語)が、題の名前を閉じる語で終わるか。閉じる語は語の切れ目で始まる
|
|
23
23
|
* (地方自治法の「法」は語、解決方法の「法」は方法の一部)。閉じる語の前に 2 字以上の語が要る。
|
|
24
24
|
*/
|
|
25
|
-
export const endsInTitle = (run: readonly Token[], words: TitleWords): boolean =>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
export const endsInTitle = (run: readonly Token[], words: TitleWords): boolean => titleBody(run, words) !== undefined;
|
|
26
|
+
|
|
27
|
+
/** endsInTitle のときの、閉じる語の前の字(愛玩動物看護師法の「愛玩動物看護師」)。閉じなければ undefined。 */
|
|
28
|
+
export const titleBody = (run: readonly Token[], words: TitleWords): string | undefined => {
|
|
29
|
+
const at = run.findIndex((_, index) => {
|
|
30
|
+
const tail = surfaceOf(run.slice(index));
|
|
31
|
+
return words.endings.includes(tail) && [...surfaceOf(run.slice(0, index))].length >= MIN_BODY_LENGTH;
|
|
29
32
|
});
|
|
33
|
+
return at < 0 ? undefined : surfaceOf(run.slice(0, at));
|
|
34
|
+
};
|
|
30
35
|
|
|
31
36
|
/**
|
|
32
37
|
* 文(text)の start から end までの連なりが、題の名前の置き方をしているか。
|
|
@@ -46,3 +51,24 @@ export const isTitlePosition = (text: string, start: number, end: number): boole
|
|
|
46
51
|
* この連なりの字(text)が名前の終わりとして含まれるか。同じ名前は、文の中で使っても名前(認定職業訓練実施奨励金の支給額)。
|
|
47
52
|
*/
|
|
48
53
|
export const isTitledName = (text: string, titled: readonly string[]): boolean => titled.some((name) => name.endsWith(text));
|
|
54
|
+
|
|
55
|
+
/** 名前として繰り返したと読む、同じ連なりの最少の回数。 */
|
|
56
|
+
const MIN_REPEATS = 2;
|
|
57
|
+
|
|
58
|
+
/** 文書の漢字の連なり(runs)のうち、同じ字で二度以上出るもの。書き手が一つの名前として使い回している(自衛隊高級幹部会同)。 */
|
|
59
|
+
export const repeatedRuns = (runs: readonly string[]): Set<string> => {
|
|
60
|
+
const counts = runs.reduce((seen, run) => seen.set(run, (seen.get(run) ?? 0) + 1), new Map<string, number>());
|
|
61
|
+
return new Set([...counts].flatMap(([run, count]) => (count >= MIN_REPEATS ? [run] : [])));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 連なりを含む括弧(brackets: 中身の範囲、文書全体の座標)のどれかが、法令の題(「〜に関する法律」、(〜法))か。
|
|
66
|
+
* 中身の語(tokens のうち括弧の中のもの)が法令の名前を閉じる語(fixedName)で終われば題。題は、中の語ごと変えられない名前。
|
|
67
|
+
*/
|
|
68
|
+
export const inStatuteTitle = (tokens: readonly Token[], brackets: readonly Span[], fixedName: TitleWords): boolean =>
|
|
69
|
+
brackets.some((bracket) =>
|
|
70
|
+
endsInTitle(
|
|
71
|
+
tokens.filter((token) => bracket.start <= token.span.start && token.span.end <= bracket.end),
|
|
72
|
+
fixedName,
|
|
73
|
+
),
|
|
74
|
+
);
|
|
@@ -3,11 +3,15 @@ import { isWithinAny, quotedIn } from "../quoted-span.ts";
|
|
|
3
3
|
import { chronologyRows } from "../chronology-rows.ts";
|
|
4
4
|
import { externalLinkTitleSpans } from "../link-title.ts";
|
|
5
5
|
import type { Detector, Finding, Span, Token } from "../plugin.ts";
|
|
6
|
-
import { countedTokens, uncountedWordsOf } from "../uncounted-particles.ts";
|
|
6
|
+
import { countedTokens, uncountedWordsOf, type UncountedWords } from "../uncounted-particles.ts";
|
|
7
|
+
import { honorificGroupParticles } from "../honorific-group.ts";
|
|
8
|
+
import { noteSentences } from "../note-paragraphs.ts";
|
|
9
|
+
import { documentNameSpans } from "./particle-run-names.ts";
|
|
7
10
|
|
|
8
11
|
/**
|
|
9
12
|
* 文末が名詞で終わる(体言止め)。箇条書きでは普通だが、本文では文が途中で切れて読める。
|
|
10
13
|
* 実文書で測ったら、指摘の 9 割が箇条書きの項目だった。箇条書きは除く。年表の行(1950年4月 設立。)も名詞で止める書き方なので除く。
|
|
14
|
+
* 注や文献の一覧((1) 著者. 題. 誌名.)も、名前や題を並べた項目なので除く(note-paragraphs.ts)。
|
|
11
15
|
*/
|
|
12
16
|
const NOMINAL = new Set(["NOUN", "PROPN"]);
|
|
13
17
|
|
|
@@ -18,8 +22,9 @@ const inside = (span: Span, spans: readonly Span[]): boolean => spans.some((othe
|
|
|
18
22
|
|
|
19
23
|
export const nounEnding: Detector = (doc, options): Finding[] => {
|
|
20
24
|
const rows = chronologyRows(doc);
|
|
25
|
+
const notes = noteSentences(doc.source, doc.paragraphs);
|
|
21
26
|
const ended = doc.sentences.filter((sentence) => {
|
|
22
|
-
if (inside(sentence.span, doc.listSpans) || rows.has(sentence) || !isClosed(sentence) || !hasParticle(sentence)) return false;
|
|
27
|
+
if (inside(sentence.span, doc.listSpans) || rows.has(sentence) || notes.has(sentence) || !isClosed(sentence) || !hasParticle(sentence)) return false;
|
|
23
28
|
const last = lastContent(sentence);
|
|
24
29
|
return last !== undefined && NOMINAL.has(last.pos) && !isDependent(last);
|
|
25
30
|
});
|
|
@@ -60,6 +65,12 @@ const PARTICLE = new Set(["ADP", "SCONJ", "PART", "CCONJ"]);
|
|
|
60
65
|
|
|
61
66
|
const BREAK: Run = { surface: "", tokens: [] };
|
|
62
67
|
|
|
68
|
+
/** 括弧だけの語。解析器が括弧の続き(「分析】(1)経営成績」の「】(」)を名詞と読んでも、句読点と同じく句を閉じる。%や半角の・は句を閉じない。 */
|
|
69
|
+
const BRACKETS_ONLY = /^[\p{Ps}\p{Pe}]+$/u;
|
|
70
|
+
|
|
71
|
+
const breaksRun = (token: Token, breaks: readonly string[]): boolean =>
|
|
72
|
+
token.pos === "PUNCT" || PARTICLE.has(token.pos) || breaks.includes(token.surface) || BRACKETS_ONLY.test(token.surface);
|
|
73
|
+
|
|
63
74
|
/**
|
|
64
75
|
* 名詞は連なりの中身なので飛ばす。読点と、語彙表に無い助詞は連なりを切る。
|
|
65
76
|
* 「弊社のAはBの」を 2 回続いたと数えないため。「は」でいちど句が閉じている。
|
|
@@ -72,28 +83,44 @@ const runsOf = (tokens: readonly Token[], nesting: readonly string[], breaks: re
|
|
|
72
83
|
tokens.reduce<Run[]>((acc, token) => {
|
|
73
84
|
if (isWithinAny(quoted, token.span)) return acc;
|
|
74
85
|
if (nesting.includes(token.surface)) return extend(acc, token);
|
|
75
|
-
if (
|
|
86
|
+
if (breaksRun(token, breaks)) acc.push(BREAK);
|
|
76
87
|
return acc;
|
|
77
88
|
}, []);
|
|
78
89
|
|
|
79
90
|
/** 句と句の間の記号(制限=タグの制限、A→B)。半角の = や : は名詞として読まれ、句読点のようには切れない。 */
|
|
80
91
|
const RUN_BREAK_LEXICON = "particle-run-break";
|
|
81
92
|
|
|
93
|
+
/** 人の集まりを敬って呼ぶ語(国民の皆様の「皆様」)。直前の助詞は呼び方の一部で、入れ子の輪に数えない。 */
|
|
94
|
+
const HONORIFIC_GROUP_LEXICON = "honorific-group";
|
|
95
|
+
|
|
96
|
+
/** 数えない助詞(番号をつなぐ「の」と、敬って呼ぶ語の前の「の」)を除いた語。 */
|
|
97
|
+
const chainTokens = (tokens: readonly Token[], numbering: UncountedWords, groups: readonly string[]): readonly Token[] => {
|
|
98
|
+
const honorific = honorificGroupParticles(tokens, numbering.particles, groups);
|
|
99
|
+
const counted = countedTokens(tokens, numbering);
|
|
100
|
+
return honorific.size === 0 ? counted : counted.filter((token) => !honorific.has(token));
|
|
101
|
+
};
|
|
102
|
+
|
|
82
103
|
export const doubledParticle: Detector = (doc, options): Finding[] => {
|
|
83
104
|
const nesting = (options.lexicon ?? []).map((entry) => entry.pattern);
|
|
84
105
|
const titles = externalLinkTitleSpans(doc.source, doc.links);
|
|
85
106
|
const breaks = (doc.lexicons[RUN_BREAK_LEXICON] ?? []).map((entry) => entry.pattern);
|
|
86
107
|
const numbering = uncountedWordsOf(doc.lexicons, nesting);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
108
|
+
const groups = (doc.lexicons[HONORIFIC_GROUP_LEXICON] ?? []).map((entry) => entry.pattern);
|
|
109
|
+
const prose = doc.prose ?? doc.source;
|
|
110
|
+
return doc.sentences.flatMap((sentence) => {
|
|
111
|
+
const tokens = chainTokens(sentence.tokens ?? [], numbering, groups);
|
|
112
|
+
const quoted = [...quotedIn(sentence), ...titles];
|
|
113
|
+
const longRuns = (skipped: readonly Span[]): Run[] => runsOf(tokens, nesting, breaks, skipped).filter((run) => run.tokens.length > options.limit);
|
|
114
|
+
const found = longRuns(quoted);
|
|
115
|
+
// 文書の名前を読むのは長い連なりのある文だけ。名前は位置ごとに読むので、全部の文で読むと遅い。
|
|
116
|
+
const runs = found.length === 0 ? found : longRuns([...quoted, ...documentNameSpans(prose, sentence.span, doc.namedDocument)]);
|
|
117
|
+
return runs.map((run) => ({
|
|
118
|
+
rule: "no-doubled-joshi",
|
|
119
|
+
severity: "warning" as const,
|
|
120
|
+
line: 0,
|
|
121
|
+
column: 0,
|
|
122
|
+
quote: sentence.text.trim(),
|
|
123
|
+
values: { word: run.surface, count: run.tokens.length, limit: options.limit, offset: run.tokens[0]?.span.start ?? sentence.span.start },
|
|
124
|
+
}));
|
|
125
|
+
});
|
|
99
126
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Detector, ProseDocument, Sentence } from "../plugin.ts";
|
|
2
|
+
import { topicDistance } from "../sentence-load.ts";
|
|
3
|
+
import type { TopicClauseWords } from "../topic-clause.ts";
|
|
4
|
+
import { isIn } from "../lexicon-genres.ts";
|
|
5
|
+
import { overLimit, ownTokens } from "./sentence-load.ts";
|
|
6
|
+
|
|
7
|
+
const CLOSER_LEXICON = "topic-clause-close";
|
|
8
|
+
const ARTICLE_LEXICON = "statute-article-opener";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Whether the sentence is an article of a statute quoted in another kind of document (第7条 … in a manual): the law's wording,
|
|
12
|
+
* which the writer cannot change. In a statute or a contract (its genre, or a profile chaff reads it by) the articles are its own.
|
|
13
|
+
*/
|
|
14
|
+
const quotesArticle = (doc: ProseDocument, genre: string | undefined): ((sentence: Sentence) => boolean) => {
|
|
15
|
+
if (doc.profile !== undefined || genre === undefined || isIn(genre, "legal")) return () => false;
|
|
16
|
+
const openers = (doc.lexicons[ARTICLE_LEXICON] ?? []).map((entry) => new RegExp(entry.pattern, "u"));
|
|
17
|
+
return (sentence) => openers.some((opener) => opener.test(sentence.text.trimStart()));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** The distance from the sentence's topic (〜は) to the end, where its predicate is. Needs the language's tokens. */
|
|
21
|
+
export const topicPredicateDistance: Detector = (doc, options) => {
|
|
22
|
+
const words: TopicClauseWords = { closers: (doc.lexicons[CLOSER_LEXICON] ?? []).map((entry) => entry.pattern) };
|
|
23
|
+
const quoted = quotesArticle(doc, options.genre);
|
|
24
|
+
return overLimit((sentence) => (sentence.tokens === undefined || quoted(sentence) ? undefined : topicDistance(ownTokens(sentence), words)))(doc, options);
|
|
25
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// A typewritten document: plain text that sets no typographic mark at all (no dash, no curly quote, no ellipsis
|
|
2
|
+
// character). It can only type a dash as a hyphen ("Fetch - Living Standard"), the way a plain-text standard does. Pure.
|
|
3
|
+
|
|
4
|
+
const TYPOGRAPHIC_MARK = /[—–‘’“”…]/u;
|
|
5
|
+
|
|
6
|
+
/** Whether a document is plain text (not Markdown) and sets no typographic mark. */
|
|
7
|
+
export const isTypewritten = (source: string, markdown: boolean): boolean => !markdown && !TYPOGRAPHIC_MARK.test(source);
|