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
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
// Words in capitals that a document itself makes known without spelling them out: a keyword of its code, a cited venue
|
|
1
|
+
// Words in capitals that a document itself makes known without spelling them out: a keyword of its code, a cited venue, a
|
|
2
|
+
// rule its grammar defines, the rungs of a grade ladder. Pure.
|
|
2
3
|
import { codeFences, codeSpans, withoutCodeBlocks } from "./code-fences.ts";
|
|
4
|
+
import { grammarRuleNames } from "./abnf-grammar.ts";
|
|
5
|
+
import { gradeLadderWords } from "./grade-ladder.ts";
|
|
3
6
|
|
|
4
7
|
type Span = { readonly start: number; readonly end: number };
|
|
5
8
|
|
|
@@ -36,5 +39,10 @@ export const citedVenues = (source: string, links: readonly Span[]): Set<string>
|
|
|
36
39
|
}),
|
|
37
40
|
);
|
|
38
41
|
|
|
39
|
-
/**
|
|
40
|
-
export const knownByDocument = (source: string, links: readonly Span[]): string[] => [
|
|
42
|
+
/** All of them: the capitals a document makes known, which undefined-acronym does not ask to spell out. */
|
|
43
|
+
export const knownByDocument = (source: string, links: readonly Span[]): string[] => [
|
|
44
|
+
...codeWords(source),
|
|
45
|
+
...citedVenues(source, links),
|
|
46
|
+
...grammarRuleNames(source),
|
|
47
|
+
...gradeLadderWords(source),
|
|
48
|
+
];
|
|
@@ -26,6 +26,8 @@ export type NameWords = {
|
|
|
26
26
|
readonly streetSuffixes: readonly string[];
|
|
27
27
|
/** 大文字で書く決まり文句(NOW, THEREFORE、AND/OR)。句のままでだけ外す。OR だけなら Oregon でもある。 */
|
|
28
28
|
readonly capitalPhrases: readonly string[];
|
|
29
|
+
/** 大文字で終わる製品の名前(Acrobat Reader DC)。名前のまま書いたときだけ外す。DC だけなら略語。 */
|
|
30
|
+
readonly productNames?: readonly string[];
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
const EDGE_BEFORE = String.raw`(?<![\p{L}\p{N}_&])`;
|
|
@@ -93,14 +95,25 @@ const CURRENCY_PREFIX = new RegExp(String.raw`${EDGE_BEFORE}\p{Lu}{1,3}(?=[$€
|
|
|
93
95
|
|
|
94
96
|
export const currencySymbolSpans = (text: string): Span[] => spansOf(text, CURRENCY_PREFIX);
|
|
95
97
|
|
|
98
|
+
/** 登録商標や商標の印のすぐ前の大文字(Acrobat DC®、XYZ™)。製品の名前の部品で、略語ではない。 */
|
|
99
|
+
const TRADEMARKED = new RegExp(String.raw`${EDGE_BEFORE}\p{Lu}{2,}(?=[®™])`, "gu");
|
|
100
|
+
|
|
101
|
+
export const trademarkSpans = (text: string): Span[] => spansOf(text, TRADEMARKED);
|
|
102
|
+
|
|
96
103
|
/**
|
|
97
|
-
* 引用の形の中の、法令の名前(45 CFR Parts 160、CFR §164.524、21 USC §301、22 CCR §§ 12701、94/820/EC)。後ろに条(§、Part、
|
|
98
|
-
* 番号)があるか、/
|
|
104
|
+
* 引用の形の中の、法令の名前(45 CFR Parts 160、CFR §164.524、21 USC §301、44 USC. 3502、22 CCR §§ 12701、94/820/EC)。後ろに条(§、Part、
|
|
105
|
+
* 番号)があるか、/ で繋いだ番号の後ろのときだけ。名前の後ろの点(USC.)は略しの印で、条の前に書いてもよい。§ の前には大文字で始まる
|
|
106
|
+
* 1 語を挟んでもよい(15 USCA Appendix § 12)。巻の番号の後ろで点で終わる名前(See 44 USC. 3502)も引用で、文を分ける読み手は
|
|
107
|
+
* 点の後ろの条を次の文に送る。法令集そのものを言う所(the CFR title、the 2 CFR export)は略語のまま数える。
|
|
99
108
|
*/
|
|
100
109
|
export const citationSpans = (text: string, series: readonly string[]): Span[] => {
|
|
101
110
|
if (series.length === 0) return [];
|
|
102
111
|
const name = oneOf(series);
|
|
103
|
-
|
|
112
|
+
const section = String.raw`(?:\p{Lu}\p{L}*\.?[ \t]+)?§`;
|
|
113
|
+
return spansOf(
|
|
114
|
+
text,
|
|
115
|
+
new RegExp(String.raw`(?<=\d/)${name}${EDGE_AFTER}|${EDGE_BEFORE}${name}(?=\.?[ \t]*(?:${section}|[Pp]arts?[ \t]+\d|\d))|(?<=\d[ \t]+)${name}(?=\.)`, "gu"),
|
|
116
|
+
);
|
|
104
117
|
};
|
|
105
118
|
|
|
106
119
|
/** 運送会社の名前。同じ文に 2 社以上を並べた所(Federal Express, UPS, DHL)だけ、どれも名前と読む。1 社だけの UPS は電源装置でもある。 */
|
|
@@ -125,6 +138,10 @@ export const streetSuffixSpans = (text: string, suffixes: readonly string[]): Sp
|
|
|
125
138
|
export const capitalPhraseSpans = (text: string, phrases: readonly string[]): Span[] =>
|
|
126
139
|
phrases.length === 0 ? [] : spansOf(text, new RegExp(`${EDGE_BEFORE}${oneOf(phrases)}${EDGE_AFTER}`, "gu"));
|
|
127
140
|
|
|
141
|
+
/** 大文字で終わる製品の名前(Adobe Acrobat Reader DC)。日本語の文では仮名が続く(Reader DCのダウンロード)ので、英字と数字だけを語の続きと見る。 */
|
|
142
|
+
export const productNameSpans = (text: string, names: readonly string[]): Span[] =>
|
|
143
|
+
names.length === 0 ? [] : spansOf(text, new RegExp(String.raw`(?<![A-Za-z0-9_&])${oneOf(names)}(?![A-Za-z0-9_&])`, "gu"));
|
|
144
|
+
|
|
128
145
|
/** 文の中で、名前の部品と決まり文句として略語から外す大文字を含む範囲。語彙表から一度だけ組み立てて、文ごとに呼ぶ。 */
|
|
129
146
|
export const nameSpansOf =
|
|
130
147
|
(words: NameWords) =>
|
|
@@ -132,9 +149,11 @@ export const nameSpansOf =
|
|
|
132
149
|
...companyNameSpans(text, words.legalForms, words.determiners),
|
|
133
150
|
...japaneseCompanyNameSpans(text, words.companyForms),
|
|
134
151
|
...currencySymbolSpans(text),
|
|
152
|
+
...trademarkSpans(text),
|
|
135
153
|
...citationSpans(text, words.citationSeries),
|
|
136
154
|
...carrierListSpans(text, words.carriers),
|
|
137
155
|
...namePrefixSpans(text, words.namePrefixes),
|
|
138
156
|
...streetSuffixSpans(text, words.streetSuffixes),
|
|
139
157
|
...capitalPhraseSpans(text, words.capitalPhrases),
|
|
158
|
+
...productNameSpans(text, words.productNames ?? []),
|
|
140
159
|
];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Capitals a document uses as the name of a numbered series (RFC 5785 and RFC 7230, BCP 78 and BCP 14, DR 4339 and
|
|
2
|
+
// DR 4340). Pure.
|
|
3
|
+
|
|
4
|
+
/** Capitals, a space, and a whole number that is not part of a decimal, a range or a longer identifier. */
|
|
5
|
+
const NUMBERED = /(?<![\p{L}\p{N}_&.-])(?<series>[A-Z]{2,6}) (?<number>\d{1,6})(?![\p{L}\p{N}_&]|[.,:/-]\d)/gu;
|
|
6
|
+
|
|
7
|
+
/** A year after capitals is when something was held or issued (FOSDEM 2024, SKO 2025), not a number in a series. */
|
|
8
|
+
const YEAR = /^(?:19|20)\d\d$/u;
|
|
9
|
+
|
|
10
|
+
/** One number is a single thing cited (STD 66); two different numbers make the capitals a series the reader looks up by number. */
|
|
11
|
+
const MIN_NUMBERS = 2;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The capitals the document writes before at least two different numbers. A numbered series is known by its numbers: a
|
|
15
|
+
* reader of "BCP 78 … BCP 14" looks the numbers up, and the name needs no expansion. Capitals before one number, or before
|
|
16
|
+
* years only, are not read so.
|
|
17
|
+
*/
|
|
18
|
+
export const numberedSeries = (source: string): ReadonlySet<string> => {
|
|
19
|
+
const numbers = new Map<string, Set<string>>();
|
|
20
|
+
[...source.matchAll(NUMBERED)].forEach((match) => {
|
|
21
|
+
const series = match.groups?.["series"] ?? "";
|
|
22
|
+
const number = match.groups?.["number"] ?? "";
|
|
23
|
+
if (YEAR.test(number)) return;
|
|
24
|
+
numbers.set(series, (numbers.get(series) ?? new Set<string>()).add(number));
|
|
25
|
+
});
|
|
26
|
+
return new Set([...numbers].filter(([, seen]) => seen.size >= MIN_NUMBERS).map(([series]) => series));
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Which conjunctive が of a Japanese sentence join two clauses in contrast. Pure: reads the sentence's tokens only.
|
|
2
|
+
import type { Token } from "../plugin.ts";
|
|
3
|
+
|
|
4
|
+
/** The auxiliaries of the volitional (あろう, 見よう) and its negative (あるまい). */
|
|
5
|
+
const VOLITIONAL: ReadonlySet<string> = new Set(["う", "よう", "まい"]);
|
|
6
|
+
const CLOSING_POS: ReadonlySet<string> = new Set(["PUNCT", "SYM"]);
|
|
7
|
+
|
|
8
|
+
const isSpace = (token: Token | undefined): boolean => token !== undefined && token.surface.trim() === "";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A verb's volitional before が (あろうがあるまいが, 何を言おうが): the main clause holds whichever way it goes, so nothing is
|
|
12
|
+
* contrasted. The conjectural でしょうが, だろうが follows an auxiliary, not a verb, and does contrast.
|
|
13
|
+
*/
|
|
14
|
+
const wordBefore = (at: number, tokens: readonly Token[]): number => tokens.findLastIndex((token, index) => index < at && !isSpace(token));
|
|
15
|
+
|
|
16
|
+
const followsVolitional = (at: number, tokens: readonly Token[]): boolean => {
|
|
17
|
+
const auxiliary = wordBefore(at, tokens);
|
|
18
|
+
const verb = tokens[wordBefore(auxiliary, tokens)];
|
|
19
|
+
return VOLITIONAL.has(tokens[auxiliary]?.surface ?? "") && tokens[auxiliary]?.pos === "AUX" && verb?.pos === "VERB";
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** A が with only punctuation after it (思えるんですが……。) softens the sentence's end; it joins no second clause. */
|
|
23
|
+
const endsSentence = (at: number, tokens: readonly Token[]): boolean => tokens.slice(at + 1).every((token) => isSpace(token) || CLOSING_POS.has(token.pos));
|
|
24
|
+
|
|
25
|
+
/** The conjunctive が at `at` contrasts two clauses: not a volitional's concession, not a softened end. */
|
|
26
|
+
export const isContrastiveGa = (at: number, tokens: readonly Token[]): boolean => !followsVolitional(at, tokens) && !endsSentence(at, tokens);
|
|
@@ -22,9 +22,11 @@ export type AgreementLists = {
|
|
|
22
22
|
readonly finite: ReadonlySet<string>;
|
|
23
23
|
/** 単数で書く所を複数で書いた句(ones of the most)。 */
|
|
24
24
|
readonly misnumbered: Lexicon;
|
|
25
|
+
/** 冠詞の後ろに立たない限定詞(some / the)。 */
|
|
26
|
+
readonly afterArticle: ReadonlySet<string>;
|
|
25
27
|
};
|
|
26
28
|
|
|
27
|
-
export type Slip = { readonly variant: "number" | "possessive"; readonly first: Token; readonly last: Token; readonly word: string };
|
|
29
|
+
export type Slip = { readonly variant: "number" | "possessive" | "determiner"; readonly first: Token; readonly last: Token; readonly word: string };
|
|
28
30
|
|
|
29
31
|
const SPACE_ONLY = /^\s+$/u;
|
|
30
32
|
const UPPER_START = /^\p{Lu}/u;
|
|
@@ -148,12 +150,19 @@ const slipOf = (variant: Slip["variant"], source: string, first: Token, last: To
|
|
|
148
150
|
|
|
149
151
|
const isBaseVerb = (token: Token | undefined): boolean => token?.pos === "VERB" && token.features?.["VerbForm"] === undefined;
|
|
150
152
|
|
|
151
|
-
/**
|
|
153
|
+
/** 前置詞の目的語の頭の所有の語の後ろの助動詞は名詞(at its will take away の will)。 */
|
|
154
|
+
const isNounAfterPreposition = (tokens: readonly Token[], at: number): boolean => tokens[at - 1]?.pos === "ADP";
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* 所有の語の直後の be(their is)か、助動詞 + 動詞の原形(Your can check)。名詞にもなる助動詞(your will)は動詞が続くときだけで、
|
|
158
|
+
* 前置詞の後ろ(at its will)では数えない。
|
|
159
|
+
*/
|
|
152
160
|
const possessiveSlipAt = (source: string, tokens: readonly Token[], at: number, lists: AgreementLists): Slip | undefined => {
|
|
153
161
|
const [possessive, verb] = [tokens[at], tokens[at + 1]];
|
|
154
162
|
if (possessive === undefined || verb === undefined || !lists.possessive.has(lower(possessive))) return undefined;
|
|
155
163
|
// 大文字だけの語は略語(Your AM = account manager)。
|
|
156
|
-
const
|
|
164
|
+
const auxiliary = verb.pos === "AUX" && isBaseVerb(tokens[at + 2]) && !isNounAfterPreposition(tokens, at);
|
|
165
|
+
const verbal = LOWER.test(verb.surface) && (lists.finite.has(lower(verb)) || auxiliary);
|
|
157
166
|
if (!verbal || !joinedBySpace(source, [possessive, verb]) || isPartOfLongerWord(source, possessive, verb)) return undefined;
|
|
158
167
|
return slipOf("possessive", source, possessive, verb);
|
|
159
168
|
};
|
|
@@ -166,9 +175,28 @@ const misnumberedAt = (source: string, tokens: readonly Token[], at: number, lis
|
|
|
166
175
|
return joinedBySpace(source, span) ? slipOf("number", source, first, last) : undefined;
|
|
167
176
|
};
|
|
168
177
|
|
|
178
|
+
/**
|
|
179
|
+
* 冠詞のすぐ後ろの、冠詞の後ろに立たない限定詞(the some roads、a the report)。一つを書き直して、もう一つを消し忘れた跡。
|
|
180
|
+
* 文の途中の大文字の冠詞は名前の一部、形容詞や数の後ろの a は記号の名前、大文字の限定詞は名前(the Each family)。
|
|
181
|
+
*/
|
|
182
|
+
const doubledDeterminerAt = (source: string, tokens: readonly Token[], at: number, lists: AgreementLists): Slip | undefined => {
|
|
183
|
+
const [article, second] = [tokens[at], tokens[at + 1]];
|
|
184
|
+
if (article === undefined || second === undefined || !isArticle(article) || !lists.afterArticle.has(lower(second))) return undefined;
|
|
185
|
+
// The same word twice (the the) is doubled-word's.
|
|
186
|
+
if (lower(article) === lower(second)) return undefined;
|
|
187
|
+
const determiner = { head: article, length: 1, plural: false };
|
|
188
|
+
if (isNamePart(tokens, at) || isLetterName(tokens, at, determiner) || !LOWER.test(second.surface.charAt(0))) return undefined;
|
|
189
|
+
if (!joinedBySpace(source, [article, second]) || isPartOfLongerWord(source, article, second)) return undefined;
|
|
190
|
+
return slipOf("determiner", source, article, second);
|
|
191
|
+
};
|
|
192
|
+
|
|
169
193
|
export const agreementIn = (source: string, tokens: readonly Token[], lists: AgreementLists): Slip[] =>
|
|
170
194
|
tokens.flatMap((_, at) => {
|
|
171
|
-
const slip =
|
|
195
|
+
const slip =
|
|
196
|
+
numberSlipAt(source, tokens, at, lists) ??
|
|
197
|
+
possessiveSlipAt(source, tokens, at, lists) ??
|
|
198
|
+
misnumberedAt(source, tokens, at, lists) ??
|
|
199
|
+
doubledDeterminerAt(source, tokens, at, lists);
|
|
172
200
|
return slip === undefined ? [] : [slip];
|
|
173
201
|
});
|
|
174
202
|
|
|
@@ -182,6 +210,7 @@ const listsOf = (lexicons: Readonly<Record<string, Lexicon>>): AgreementLists =>
|
|
|
182
210
|
possessive: setOf(lexicons["dependent-possessive"]),
|
|
183
211
|
finite: setOf(lexicons["finite-auxiliary"]),
|
|
184
212
|
misnumbered: lexicons["misnumbered-phrase"] ?? [],
|
|
213
|
+
afterArticle: setOf(lexicons["determiner-after-article"]),
|
|
185
214
|
});
|
|
186
215
|
|
|
187
216
|
export const agreementSlip: Detector = (doc): Finding[] => {
|
|
@@ -4,8 +4,8 @@ import { MIN_DOCUMENT_LENGTH } from "./signals.ts";
|
|
|
4
4
|
import { entryIn, entryOpens } from "./lexicon-match.ts";
|
|
5
5
|
import { contrastSentences, type ContrastWords } from "./contrast-frame.ts";
|
|
6
6
|
import { placeholderSpans } from "./placeholder-text.ts";
|
|
7
|
-
import { colonLeadIns } from "./list-lead-in.ts";
|
|
8
7
|
import { followsInlineCode } from "./code-before.ts";
|
|
8
|
+
import { isSentenceTail } from "./opener-tail.ts";
|
|
9
9
|
|
|
10
10
|
// 生成文に多い形。語はどれも言語パッケージの語彙表が持ち、ここは形だけを知る。
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ const SCORE_SCALE = 10;
|
|
|
18
18
|
const PILE = 2;
|
|
19
19
|
|
|
20
20
|
/** 当たった文と語。offset は指摘する位置で、無ければ文の頭。 */
|
|
21
|
-
type Hit = { readonly sentence: Sentence; readonly matched: string; readonly offset?: number };
|
|
21
|
+
type Hit = { readonly sentence: Sentence; readonly matched: string; readonly offset?: number; readonly entry?: LexiconEntry };
|
|
22
22
|
|
|
23
23
|
const findingOf = (hit: Hit, values: Readonly<Record<string, number>>): Finding => ({
|
|
24
24
|
rule: "",
|
|
@@ -43,23 +43,35 @@ const contrastWordsOf = (doc: ProseDocument, frames: Lexicon): ContrastWords =>
|
|
|
43
43
|
frames,
|
|
44
44
|
leads: doc.lexicons["contrast-lead"] ?? [],
|
|
45
45
|
turns: doc.lexicons["contrast-turn"] ?? [],
|
|
46
|
+
amounts: doc.lexicons["contrast-amount"] ?? [],
|
|
46
47
|
});
|
|
47
48
|
|
|
48
|
-
/**
|
|
49
|
+
/** 対比の枠は、一つなら論点の整理。二つ目から数える(割合の上限が、長い文書の二つを落とす)。 */
|
|
50
|
+
const MIN_CONTRASTS = 2;
|
|
51
|
+
const PERCENT = 100;
|
|
52
|
+
|
|
53
|
+
/** 文書の言語の文のうち、対比の枠で書いた文の割合(百分率、小数 1 桁)。文の長さが言語で違っても同じ物差しで比べられる。 */
|
|
54
|
+
export const contrastShare = (doc: ProseDocument, contrasts: number): number => {
|
|
55
|
+
const sentences = doc.sentences.filter((sentence) => sentence.embeddedLanguage === undefined).length;
|
|
56
|
+
return sentences === 0 ? 0 : Math.round((contrasts / sentences) * PERCENT * TENTHS) / TENTHS;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** 対比の枠(It's not X, it's Y、単なる X ではなく)。1 つなら論点の整理だが、文の割合が上限を超えると言い回しの癖になる。 */
|
|
49
60
|
export const contrastFraming: Detector = (doc, options): Finding[] => {
|
|
50
61
|
const words = contrastWordsOf(doc, options.lexicon ?? []);
|
|
51
|
-
const hits = contrastSentences(doc.sentences, words)
|
|
52
|
-
sentence
|
|
53
|
-
matched: (firstIn(sentence, words.frames) ?? firstIn(sentence, words.leads))?.pattern ?? ""
|
|
54
|
-
|
|
55
|
-
|
|
62
|
+
const hits = contrastSentences(doc.sentences, words)
|
|
63
|
+
.filter((sentence) => sentence.embeddedLanguage === undefined)
|
|
64
|
+
.map((sentence) => ({ sentence, matched: (firstIn(sentence, words.frames) ?? firstIn(sentence, words.leads))?.pattern ?? "" }));
|
|
65
|
+
if (hits.length < MIN_CONTRASTS || wordsOf(doc) < MIN_DOCUMENT_LENGTH[doc.lengthUnit]) return [];
|
|
66
|
+
const share = contrastShare(doc, hits.length);
|
|
67
|
+
return share <= options.limit ? [] : hits.map((hit) => findingOf(hit, { count: hits.length, share, limit: options.limit }));
|
|
56
68
|
};
|
|
57
69
|
|
|
58
70
|
/** 語彙表の語で始まる文。 */
|
|
59
71
|
const openerHits = (doc: ProseDocument, lexicon: Lexicon): Hit[] =>
|
|
60
72
|
doc.sentences.flatMap((sentence) => {
|
|
61
73
|
const opener = lexicon.find((entry) => entryOpens(sentence, entry));
|
|
62
|
-
return opener === undefined ? [] : [{ sentence, matched: opener.pattern }];
|
|
74
|
+
return opener === undefined ? [] : [{ sentence, matched: opener.pattern, entry: opener }];
|
|
63
75
|
});
|
|
64
76
|
|
|
65
77
|
/** 文頭の決まった接ぎ(Moreover、さらに)の密度。話を運ぶ語(However、また)は語彙表に入れない。 */
|
|
@@ -72,22 +84,15 @@ export const openerDensity: Detector = (doc, options): Finding[] => densityFindi
|
|
|
72
84
|
/** Where the sentence's first word starts: its span may begin with the blanks that masked code left. */
|
|
73
85
|
const firstWordAt = (sentence: Sentence): number => sentence.span.start + sentence.text.length - sentence.text.trimStart().length;
|
|
74
86
|
|
|
87
|
+
/** 語彙表の語で始まるが、その語の後ろが助動詞だけの文(だからである。)。前の文の終わりで、文を始める語ではない。 */
|
|
88
|
+
const opensTail = (hit: Hit): boolean => hit.entry !== undefined && isSentenceTail(hit.sentence, hit.entry);
|
|
89
|
+
|
|
75
90
|
export const openerPile: Detector = (doc, options): Finding[] => {
|
|
76
91
|
// A sentence that opens with inline code (`explain` でも) opens with the code, not with the word after it.
|
|
77
|
-
const hits = openerHits(doc, options.lexicon ?? []).filter((hit) => !followsInlineCode(doc.source, doc.prose, firstWordAt(hit.sentence)));
|
|
92
|
+
const hits = openerHits(doc, options.lexicon ?? []).filter((hit) => !followsInlineCode(doc.source, doc.prose, firstWordAt(hit.sentence)) && !opensTail(hit));
|
|
78
93
|
return hits.length === 0 || hits.length < options.limit ? [] : hits.map((hit) => findingOf(hit, { count: hits.length, limit: options.limit }));
|
|
79
94
|
};
|
|
80
95
|
|
|
81
|
-
/**
|
|
82
|
-
* コロンで箇条書きへ渡す文(以下の通りです:)。1 つなら案内だが、節ごとに続くと説明が箇条書きの前置きだけになる。
|
|
83
|
-
* 数えるのは文書の言語の文だけ。和文の中の英文(Examples include:)は、英語ではふつうの書き方なので数えない。
|
|
84
|
-
*/
|
|
85
|
-
export const colonLeadIn: Detector = (doc, options): Finding[] => {
|
|
86
|
-
const inDocumentLanguage = doc.sentences.filter((sentence) => sentence.embeddedLanguage === undefined);
|
|
87
|
-
const hits = colonLeadIns(inDocumentLanguage, doc.lists, doc.listSpans, doc.source).map((sentence) => ({ sentence, matched: sentence.text.trim() }));
|
|
88
|
-
return densityFindings(doc, hits, options.limit);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
96
|
const distinct = (lexicon: Lexicon): LexiconEntry[] => [...new Map(lexicon.map((entry) => [entry.pattern.toLowerCase(), entry])).values()];
|
|
92
97
|
|
|
93
98
|
const weightOf = (entry: LexiconEntry): number => entry.weight ?? 1;
|
|
@@ -1,17 +1,34 @@
|
|
|
1
|
-
import type { Detector, Finding } from "../plugin.ts";
|
|
2
|
-
import { uiLanguageOf } from "../ui.ts";
|
|
1
|
+
import type { Detector, Finding, ProseDocument } from "../plugin.ts";
|
|
2
|
+
import { uiLanguageOf, type Texts } from "../ui.ts";
|
|
3
3
|
import { STRUCTURE_TEXT } from "../outline/structure-text.ts";
|
|
4
4
|
import { structureOf } from "../structure-shape/of-document.ts";
|
|
5
|
+
import { headedSections } from "../structure-shape/features.ts";
|
|
6
|
+
import { headingWords } from "../structure-shape/heading-words.ts";
|
|
7
|
+
import { isTemplateOutline, templateSectionsOf } from "../structure-shape/template-outline.ts";
|
|
8
|
+
|
|
9
|
+
/** The template outline's name in the message, beside the structure measures past the human articles. */
|
|
10
|
+
const TEMPLATE_NAME: Texts<string> = { ja: "提案書・報告書の定型の見出し", en: "the textbook proposal or report headings" };
|
|
11
|
+
|
|
12
|
+
const templateSections = (doc: ProseDocument): string[] =>
|
|
13
|
+
templateSectionsOf(
|
|
14
|
+
headedSections(doc.sections).map((section) => headingWords(section.heading)),
|
|
15
|
+
doc.lexicons["template-heading"] ?? [],
|
|
16
|
+
);
|
|
5
17
|
|
|
6
18
|
/**
|
|
7
19
|
* The document's outline is past the human articles on several structure measures at once (chaff outline's structure
|
|
8
20
|
* block): many headings, three-way splits, bold labels, uniform sections. One alone is ordinary; the limit is how many.
|
|
21
|
+
* A textbook outline (Summary, Current Situation, Proposed Solution, Expected Benefits…) counts as one more.
|
|
9
22
|
*/
|
|
10
23
|
export const aiStructure: Detector = (doc, options): Finding[] => {
|
|
11
24
|
const scored = structureOf(doc);
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
25
|
+
const template = isTemplateOutline(templateSections(doc));
|
|
26
|
+
const count = scored.score + (template ? 1 : 0);
|
|
27
|
+
if (count < options.limit) return [];
|
|
28
|
+
const language = uiLanguageOf(doc.language);
|
|
29
|
+
const text = STRUCTURE_TEXT[language];
|
|
30
|
+
const measures = scored.placements.filter((placement) => placement.beyond).map((placement) => text.features[placement.feature.id].name);
|
|
31
|
+
const names = template ? [...measures, TEMPLATE_NAME[language]] : measures;
|
|
15
32
|
const heading = (doc.markup?.headings ?? []).find((entry) => entry.depth > 1) ?? doc.markup?.headings[0];
|
|
16
33
|
return [
|
|
17
34
|
{
|
|
@@ -20,7 +37,7 @@ export const aiStructure: Detector = (doc, options): Finding[] => {
|
|
|
20
37
|
line: 0,
|
|
21
38
|
column: 0,
|
|
22
39
|
quote: heading?.text ?? "",
|
|
23
|
-
values: { word: names.join(text.listSeparator), count
|
|
40
|
+
values: { word: names.join(text.listSeparator), count, limit: options.limit, offset: heading?.start ?? 0 },
|
|
24
41
|
},
|
|
25
42
|
];
|
|
26
43
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 英字と数字の並び。小数(1.25、0.5)と分数(1/4、1/3)は、点や斜線をはさんで一つの数と読む。「1桁は全角、2桁以上と
|
|
3
|
+
* 小数・分数は半角」と決めた公用文の書き方では、0.5 の 0 や 1/4 の 1 は一桁の数ではない。区切りは同じ幅の数字の間だけ
|
|
4
|
+
* (1.2 は二つの並び)。点や斜線が二つ以上の番号(2.5.3、2024/4/1)は、今までどおり区切りごとの並び。後ろに続く単位の英字(1.25m)は、区切りの無い数(10mm)と同じく並びに含める。
|
|
5
|
+
*/
|
|
6
|
+
const HALF_NUMBER = String.raw`(?<![\d./])\d+[./]\d+(?!\d|[./]\d)[A-Za-z]*`;
|
|
7
|
+
const FULL_NUMBER = String.raw`(?<![0-9./])[0-9]+[./][0-9]+(?![0-9]|[./][0-9])[A-Za-z]*`;
|
|
8
|
+
|
|
9
|
+
/** 三桁ごとに区切った数(5,500、1,200.5)。5,500 の 5 は一桁の数ではない。 */
|
|
10
|
+
const HALF_GROUPED = String.raw`(?<![\d,.])\d{1,3}(?:,\d{3})+(?:\.\d+)?(?![\d,]|\.\d)[A-Za-z]*`;
|
|
11
|
+
const FULL_GROUPED = String.raw`(?<![0-9,,.])[0-9]{1,3}(?:[,,][0-9]{3})+(?:.[0-9]+)?(?![0-9,,]|.[0-9])[A-Za-z]*`;
|
|
12
|
+
|
|
13
|
+
export const ALNUM_RUN = new RegExp(String.raw`${HALF_GROUPED}|${FULL_GROUPED}|${HALF_NUMBER}|${FULL_NUMBER}|[A-Za-z0-9A-Za-z0-9]+`, "gu");
|
|
14
|
+
/** 並び(ALNUM_RUN が切り出したもの)が一つの幅だけで書かれているか。区切りの点・斜線・コンマは数字の間にしか来ない。 */
|
|
15
|
+
export const FULLWIDTH = /^[A-Za-z0-9][A-Za-z0-9./,,]*$/u;
|
|
16
|
+
export const HALFWIDTH = /^[A-Za-z0-9][A-Za-z0-9./,]*$/u;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { LexiconEntry, Section, Sentence } from "../plugin.ts";
|
|
2
|
+
|
|
3
|
+
// A section whose heading names what a reader asked (【相談事例等】, ご質問内容) quotes the asker in their own words; its sentences
|
|
4
|
+
// are not in the writer's voice. The heading words come from the language's asker-heading lexicon. Pure.
|
|
5
|
+
|
|
6
|
+
/** Marks around a heading's words (【相談事例等】, [ご質問内容], a trailing colon); they are not part of the words. */
|
|
7
|
+
const OPENING: ReadonlySet<string> = new Set(" \t\u3000【〔[[((「『");
|
|
8
|
+
const CLOSING: ReadonlySet<string> = new Set(" \t\u3000】〕]]))」』::");
|
|
9
|
+
|
|
10
|
+
const headingWords = (section: Section): string => {
|
|
11
|
+
const chars = [...(section.unlabeledHeading ?? section.heading)];
|
|
12
|
+
const start = chars.findIndex((char) => !OPENING.has(char));
|
|
13
|
+
return start === -1 ? "" : chars.slice(start, chars.findLastIndex((char) => !CLOSING.has(char)) + 1).join("");
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** Whether the section's heading, without its number and brackets, is one of the words naming a reader's question. */
|
|
17
|
+
export const isAskerSection = (section: Section, headings: readonly LexiconEntry[]): boolean => {
|
|
18
|
+
const words = headingWords(section);
|
|
19
|
+
return words !== "" && headings.some((entry) => entry.pattern === words);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** The sentences of every section whose heading names a reader's question. */
|
|
23
|
+
export const askerSentences = (sections: readonly Section[], headings: readonly LexiconEntry[]): Set<Sentence> =>
|
|
24
|
+
new Set(sections.filter((section) => isAskerSection(section, headings)).flatMap((section) => section.sentences));
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Detector, Finding, Lexicon, ProseDocument, Sentence, Span, Token } from "../plugin.ts";
|
|
2
2
|
import { quotedIn } from "../quoted-span.ts";
|
|
3
3
|
import { followsInlineCode } from "./code-before.ts";
|
|
4
|
+
import { followsTwoExamples } from "./example-baseline.ts";
|
|
4
5
|
import { isNamedStep, plainStepKeys } from "./graded-step.ts";
|
|
6
|
+
import { comparesComparatives, comparesKinds, followsCause, madeComparative, opensWithCause, withoutNegation } from "./comparative-context.ts";
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* 比べる相手の無い比較(より良い結果、さらに高速に、The new engine is faster.)。何より良いのか、何より速いのかが書かれていない。
|
|
@@ -10,6 +12,11 @@ import { isNamedStep, plainStepKeys } from "./graded-step.ts";
|
|
|
10
12
|
* condition は比較を条件や仮定の下に置く語(使うと、if、would)。条件を書いた比較は、その条件の無い場合と比べている。
|
|
11
13
|
* beyond は比べた形のすぐ前で、いま述べたものを越えると言う語(even better、still faster)。相手はその直前に書いてある。
|
|
12
14
|
* aim は比べた語の後ろで、今より良くする目当てを言う語(より良い社会、より良いものにする)。比べる相手は今の状態。
|
|
15
|
+
* intent は比べた語より後ろで、比較を願いや目的の中に置く語(より広く進めたい、より円滑にするためには)。比べる相手は今の状態。
|
|
16
|
+
* phrase は比べた形で終わる決まった言い方(to be more precise)。前の言葉を言い直すだけで、何も比べていない。
|
|
17
|
+
* pointer は文の頭で、いま見せた例を指す語(This is much better!)。二つのコードの例のすぐ後ろなら、相手は前の例。
|
|
18
|
+
* cause は比べた形より前で、比較が何の結果か、何に対してかを言う語(これにより、…できるため、…, but)。opener は文の頭で同じことをする語(As …, By …)。
|
|
19
|
+
* 英語の aim は比べた形の少し前で、今の状態から変えると言う動詞(to make results more predictable、do better)。
|
|
13
20
|
* 同じ文か前の二文に相手を言う語があれば、相手は書いてある。
|
|
14
21
|
*/
|
|
15
22
|
|
|
@@ -22,9 +29,15 @@ export type ComparativeLists = {
|
|
|
22
29
|
readonly conditions: ReadonlySet<string>;
|
|
23
30
|
readonly beyond: ReadonlySet<string>;
|
|
24
31
|
readonly aims: ReadonlySet<string>;
|
|
32
|
+
readonly intents: ReadonlySet<string>;
|
|
33
|
+
readonly phrases: readonly string[];
|
|
34
|
+
readonly pointers: ReadonlySet<string>;
|
|
35
|
+
readonly causes: ReadonlySet<string>;
|
|
36
|
+
readonly openers: ReadonlySet<string>;
|
|
25
37
|
};
|
|
26
38
|
|
|
27
|
-
|
|
39
|
+
/** head は英語の比べた形の前の述語(is faster の is)。 */
|
|
40
|
+
export type BareComparative = { readonly first: Token; readonly last: Token; readonly head?: Token };
|
|
28
41
|
|
|
29
42
|
/** 前に立てば、比べた形が述語として読める語の品詞(is faster、runs faster)。 */
|
|
30
43
|
const PREDICATE_HEAD = new Set(["VERB", "AUX"]);
|
|
@@ -65,10 +78,38 @@ const headsCompound = (tokens: readonly Token[], after: number): boolean => {
|
|
|
65
78
|
return last?.pos === "NOUN" && next?.pos === "NOUN" && last.span.end === next.span.start;
|
|
66
79
|
};
|
|
67
80
|
|
|
68
|
-
/**
|
|
81
|
+
/** at から続けて書いた名詞の並び(高齢|社会)の、最後の名詞の位置。at が名詞でなければ -1。 */
|
|
82
|
+
const compoundEnd = (tokens: readonly Token[], at: number): number => {
|
|
83
|
+
const breaks = tokens.slice(at).findIndex((token, index) => token.pos !== "NOUN" || (index > 0 && tokens[at + index - 1]?.span.end !== token.span.start));
|
|
84
|
+
const nouns = breaks === -1 ? tokens.length - at : breaks;
|
|
85
|
+
return nouns === 0 ? -1 : at + nouns - 1;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/** 目当ての語で終わる複合語か(より良い高齢社会、より良い地域社会)。目当ての語が頭なだけの語(社会保障)は目当てでない。 */
|
|
89
|
+
const endsInAim = (tokens: readonly Token[], at: number, aims: ReadonlySet<string>): boolean => {
|
|
90
|
+
const end = compoundEnd(tokens, at);
|
|
91
|
+
return end > at && aims.has(tokens[end]?.surface ?? "");
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/** 名詞の並びの中の語か。名詞の前に付いた形容詞(多文化の「多」)も並びの一部。 */
|
|
95
|
+
const inNounPhrase = (tokens: readonly Token[], at: number): boolean =>
|
|
96
|
+
tokens[at]?.pos === "NOUN" || (tokens[at]?.pos === "ADJ" && tokens[at + 1]?.pos === "NOUN");
|
|
97
|
+
|
|
98
|
+
/** 名詞の並びに「の」と目当ての語が続くか(より良い多文化共生の実現)。比べた語は、その目当ての中の語。 */
|
|
99
|
+
const aimAfterOf = (tokens: readonly Token[], at: number, aims: ReadonlySet<string>): boolean => {
|
|
100
|
+
const length = tokens.slice(at).findIndex((_, index) => !inNounPhrase(tokens, at + index));
|
|
101
|
+
const of = at + (length === -1 ? tokens.length - at : length);
|
|
102
|
+
return length > 0 && tokens[of]?.surface === "の" && runsFrom(tokens, of + 1).some(({ run }) => aims.has(run));
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** 程度を言う語(at)の後ろが、今より良くする目当てか(より良い社会、より豊かな暮らし、より良いものにする、より良い共生の実現)。 */
|
|
69
106
|
const namesAim = (tokens: readonly Token[], at: number, aims: ReadonlySet<string>): boolean => {
|
|
70
107
|
const next = tokens[at]?.pos === "NOUN" && ADJECTIVAL_TAIL.has(tokens[at + 1]?.surface ?? "") ? at + 2 : at + 1;
|
|
71
|
-
return
|
|
108
|
+
return (
|
|
109
|
+
runsFrom(tokens, next).some(({ run, after }) => aims.has(run) && !headsCompound(tokens, after)) ||
|
|
110
|
+
endsInAim(tokens, next, aims) ||
|
|
111
|
+
aimAfterOf(tokens, next, aims)
|
|
112
|
+
);
|
|
72
113
|
};
|
|
73
114
|
|
|
74
115
|
/** 日本語: 副詞の「より」「さらに」の直後の、程度を言える語。比較の決まった言い方(より多くの)と、今より良くする目当て(より良い社会)は除く。 */
|
|
@@ -106,13 +147,15 @@ const predicateAt = (tokens: readonly Token[], at: number, lists: ComparativeLis
|
|
|
106
147
|
const first = tokens[start] ?? word;
|
|
107
148
|
const adverbs = tokens.slice(Math.max(0, start - MAX_ADVERBS), start).reverse();
|
|
108
149
|
const skipped = adverbs.findIndex((token) => token.pos !== "ADV");
|
|
109
|
-
const
|
|
110
|
-
|
|
150
|
+
const headAt = start - 1 - (skipped === -1 ? adverbs.length : skipped);
|
|
151
|
+
const head = tokens[headAt];
|
|
152
|
+
if (head === undefined || !(PREDICATE_HEAD.has(head.pos) || isThirdPersonVerb(head))) return undefined;
|
|
153
|
+
return comparesComparatives(tokens, headAt, new Set([...lists.comparatives, ...lists.more])) ? undefined : { first, last: word, head };
|
|
111
154
|
};
|
|
112
155
|
|
|
113
156
|
/** 比べた形より前に、条件か仮定を言う語があるか。並べる「と」(A と B)は条件でない。 */
|
|
114
157
|
const isConditional = (tokens: readonly Token[], found: BareComparative, conditions: ReadonlySet<string>): boolean =>
|
|
115
|
-
tokens.some((token) => token.span.start < found.first.span.start && token.pos !== "CCONJ" && conditions.has(lower(token)));
|
|
158
|
+
tokens.some((token) => token.span.start < found.first.span.start && token.pos !== "CCONJ" && conditions.has(withoutNegation(lower(token))));
|
|
116
159
|
|
|
117
160
|
/** 比べた形のすぐ前が、いま述べたものを越えると言う語か(performed even better)。 */
|
|
118
161
|
const goesBeyond = (tokens: readonly Token[], found: BareComparative, beyond: ReadonlySet<string>): boolean => {
|
|
@@ -120,10 +163,45 @@ const goesBeyond = (tokens: readonly Token[], found: BareComparative, beyond: Re
|
|
|
120
163
|
return beyond.has(lower(tokens[before]));
|
|
121
164
|
};
|
|
122
165
|
|
|
166
|
+
/**
|
|
167
|
+
* 理由を言う「ため」の前の語: 過去の「た」(速くなったため)、「の」(雨のため)、ありさまを言う「ある」「いる」(書き方があるため、
|
|
168
|
+
* 使われているため)。目的の「ため」は、する動作の動詞の辞書の形に付く(接続させていくため)。
|
|
169
|
+
*/
|
|
170
|
+
const CAUSE_BEFORE: ReadonlySet<string> = new Set(["た", "だ", "の", "ある", "いる"]);
|
|
171
|
+
|
|
172
|
+
const isIntentWord = (tokens: readonly Token[], at: number, intents: ReadonlySet<string>): boolean => {
|
|
173
|
+
const token = tokens[at];
|
|
174
|
+
if (token === undefined || !(intents.has(lower(token)) || intents.has(token.lemma?.toLowerCase() ?? ""))) return false;
|
|
175
|
+
return token.surface !== "ため" || !CAUSE_BEFORE.has(tokens[at - 1]?.surface ?? "");
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/** 比べた形より後ろに、比較を願いや目的の中に置く語があるか(より広く進めたい、より円滑にするためには)。 */
|
|
179
|
+
const isIntended = (tokens: readonly Token[], found: BareComparative, intents: ReadonlySet<string>): boolean =>
|
|
180
|
+
tokens.some((token, at) => token.span.start >= found.last.span.end && isIntentWord(tokens, at, intents));
|
|
181
|
+
|
|
182
|
+
/** 決まった言い方の後ろの、挟み込みを閉じる印(or to be more precise, it …)。印が無ければ述語(we want it to be more precise.)。 */
|
|
183
|
+
const ASIDE_END = new Set([",", ":"]);
|
|
184
|
+
|
|
185
|
+
/** 比べた形で終わる決まった言い方を、挟み込みとして書いたか(or to be more precise, …)。語を空白でつないで照らす。 */
|
|
186
|
+
const endsSetPhrase = (tokens: readonly Token[], found: BareComparative, phrases: readonly string[]): boolean => {
|
|
187
|
+
const through = tokens.filter((token) => token.span.end <= found.last.span.end);
|
|
188
|
+
if (!ASIDE_END.has(tokens[through.length]?.surface ?? "")) return false;
|
|
189
|
+
const words = ` ${through.map((token) => lower(token)).join(" ")}`;
|
|
190
|
+
return phrases.some((phrase) => words.endsWith(` ${phrase}`));
|
|
191
|
+
};
|
|
192
|
+
|
|
123
193
|
export const bareComparativesIn = (tokens: readonly Token[], lists: ComparativeLists): BareComparative[] =>
|
|
124
194
|
tokens
|
|
125
195
|
.flatMap((_, at) => markedAt(tokens, at, lists) ?? predicateAt(tokens, at, lists) ?? [])
|
|
126
|
-
.filter(
|
|
196
|
+
.filter(
|
|
197
|
+
(found) =>
|
|
198
|
+
!isConditional(tokens, found, lists.conditions) &&
|
|
199
|
+
!goesBeyond(tokens, found, lists.beyond) &&
|
|
200
|
+
!isIntended(tokens, found, lists.intents) &&
|
|
201
|
+
!endsSetPhrase(tokens, found, lists.phrases) &&
|
|
202
|
+
!followsCause(tokens, found.first, lists.causes) &&
|
|
203
|
+
!(found.head !== undefined && madeComparative(tokens, found.first, lists.aims)),
|
|
204
|
+
);
|
|
127
205
|
|
|
128
206
|
/**
|
|
129
207
|
* 語が比べる相手を言う語か。語の形か原形で照らし、一字の語(旧)は語の頭だけ(旧版は相手、復旧は相手でない)。
|
|
@@ -133,14 +211,13 @@ const isBaselineWord = (token: Token, baselines: readonly string[]): boolean =>
|
|
|
133
211
|
return baselines.some((baseline) => surface === baseline || lemma === baseline || ([...baseline].length === 1 && surface.startsWith(baseline)));
|
|
134
212
|
};
|
|
135
213
|
|
|
136
|
-
/**
|
|
214
|
+
/** 相手を言う語が、続く語に分かれて書かれているか(これ・まで、で・は・なく、that follows)。語を詰めても、空白でつないでも照らす。 */
|
|
137
215
|
const MAX_BASELINE_TOKENS = 3;
|
|
216
|
+
const runsJoinedBy = (surfaces: readonly string[], glue: string): string[] =>
|
|
217
|
+
surfaces.reduce<string[]>((runs, surface) => [...runs, runs.length === 0 ? surface : `${runs.at(-1) ?? ""}${glue}${surface}`], []).slice(1);
|
|
138
218
|
const isSplitBaseline = (tokens: readonly Token[], at: number, baselines: readonly string[]): boolean => {
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
.map((token) => token.surface.toLowerCase())
|
|
142
|
-
.reduce<string[]>((runs, surface) => [...runs, `${runs.at(-1) ?? ""}${surface}`], []);
|
|
143
|
-
return joined.slice(1).some((run) => baselines.includes(run));
|
|
219
|
+
const surfaces = tokens.slice(at, at + MAX_BASELINE_TOKENS).map((token) => token.surface.toLowerCase());
|
|
220
|
+
return [...runsJoinedBy(surfaces, ""), ...runsJoinedBy(surfaces, " ")].some((run) => baselines.includes(run));
|
|
144
221
|
};
|
|
145
222
|
|
|
146
223
|
/** 文の中に、比べる相手を言う語か、相手を受ける助詞の「より」(従来より)があるか。 */
|
|
@@ -163,11 +240,20 @@ export const listsOf = (lexicon: Lexicon): ComparativeLists => ({
|
|
|
163
240
|
conditions: new Set(groupOf(lexicon, "condition")),
|
|
164
241
|
beyond: new Set(groupOf(lexicon, "beyond")),
|
|
165
242
|
aims: new Set(groupOf(lexicon, "aim")),
|
|
243
|
+
intents: new Set(groupOf(lexicon, "intent")),
|
|
244
|
+
phrases: groupOf(lexicon, "phrase"),
|
|
245
|
+
pointers: new Set(groupOf(lexicon, "pointer")),
|
|
246
|
+
causes: new Set(groupOf(lexicon, "cause")),
|
|
247
|
+
openers: new Set(groupOf(lexicon, "opener")),
|
|
166
248
|
});
|
|
167
249
|
|
|
168
250
|
/** 鉤括弧の中の比較(「給与所得の確定申告がさらに簡単に!」ページ)は題や語を挙げたもので、書き手の比較ではない。 */
|
|
169
251
|
const insideSpan = (found: BareComparative, span: Span): boolean => found.first.span.start >= span.start && found.last.span.end <= span.end;
|
|
170
252
|
|
|
253
|
+
/** 文の頭の語が、いま見せた例を指す語か(This is much better!)。 */
|
|
254
|
+
const pointsAtExample = (sentence: Sentence, pointers: ReadonlySet<string>): boolean =>
|
|
255
|
+
pointers.has(lower((sentence.tokens ?? []).find((token) => token.surface.trim() !== "")));
|
|
256
|
+
|
|
171
257
|
/** より right after inline code (`relaxed` より長い) is the particle "than" after a word the masking hid, not the adverb. */
|
|
172
258
|
const isThanAfterCode = (doc: ProseDocument, found: BareComparative): boolean =>
|
|
173
259
|
found.first.surface === "より" && followsInlineCode(doc.source, doc.prose, found.first.span.start);
|
|
@@ -179,12 +265,16 @@ export const bareComparative: Detector = (doc): Finding[] => {
|
|
|
179
265
|
lists.markers,
|
|
180
266
|
isGradable,
|
|
181
267
|
);
|
|
268
|
+
const spans = doc.sentences.map((sentence) => sentence.span);
|
|
182
269
|
return doc.sentences.flatMap((sentence, at) => {
|
|
183
270
|
const nearby = doc.sentences.slice(Math.max(0, at - BASELINE_REACH), at + 1);
|
|
184
271
|
if (sentence.embeddedLanguage !== undefined || nearby.some((near) => namesBaseline(near, lists.baselines))) return [];
|
|
272
|
+
if (pointsAtExample(sentence, lists.pointers) && followsTwoExamples(doc.source, spans, at)) return [];
|
|
273
|
+
if (opensWithCause(sentence.tokens ?? [], lists.openers)) return [];
|
|
185
274
|
const quoted = quotedIn(sentence);
|
|
186
275
|
return bareComparativesIn(sentence.tokens ?? [], lists)
|
|
187
276
|
.filter((found) => !quoted.some((span) => insideSpan(found, span)) && !isThanAfterCode(doc, found))
|
|
277
|
+
.filter((found) => !comparesKinds(doc.sentences[at - 1]?.tokens ?? [], sentence.tokens ?? [], found.head))
|
|
188
278
|
.filter((found) => !lists.markers.has(found.first.surface) || !isNamedStep(sentence.tokens ?? [], found.last, steps))
|
|
189
279
|
.map((found) => ({
|
|
190
280
|
rule: "",
|
|
@@ -9,6 +9,7 @@ import { amountColumnOf, isTotalRowGap, type BodyRow } from "../structure/total-
|
|
|
9
9
|
import { isAmountNameLine, isTotalLine } from "../structure/total-line.ts";
|
|
10
10
|
import { isTotalLabel, withoutLeadingBlankCells } from "../structure/total.ts";
|
|
11
11
|
import { isSpannedLabelGap } from "../structure/spanned-label-blank.ts";
|
|
12
|
+
import { picturesSpreadsheet } from "./spreadsheet-grid.ts";
|
|
12
13
|
|
|
13
14
|
/** Fewer body rows than this, and one blank is as likely a choice as a gap. */
|
|
14
15
|
const MIN_BODY_ROWS = 3;
|
|
@@ -107,6 +108,14 @@ type TableRows = { readonly header: MarkdownNode; readonly body: readonly Markdo
|
|
|
107
108
|
const tableBlanksOf = (source: string, table: MarkdownNode, reading: TableReading): Blank[] => {
|
|
108
109
|
const [header, ...body] = table.children ?? [];
|
|
109
110
|
if (header === undefined || body.length < MIN_BODY_ROWS) return [];
|
|
111
|
+
const headerCells = (header.children ?? []).map((cell) => sourceOf(source, cell));
|
|
112
|
+
if (
|
|
113
|
+
picturesSpreadsheet(
|
|
114
|
+
headerCells,
|
|
115
|
+
body.map((row) => sourceOf(source, row.children?.[0])),
|
|
116
|
+
)
|
|
117
|
+
)
|
|
118
|
+
return [];
|
|
110
119
|
const rows = body.map((row) => bodyRowOf(source, row, reading.isTotalRow));
|
|
111
120
|
const columns = header.children?.length ?? 0;
|
|
112
121
|
return Array.from({ length: columns }, (_unused, column) => column)
|