chaffjs 0.42.0 → 0.44.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/dist/bound-word-particles.d.ts +9 -0
- package/dist/bound-word-particles.d.ts.map +1 -0
- package/dist/bound-word-particles.js +16 -0
- package/dist/bound-word-particles.js.map +1 -0
- package/dist/derived/stays.d.ts +0 -1
- package/dist/derived/stays.d.ts.map +1 -1
- package/dist/derived/stays.js +3 -1
- package/dist/derived/stays.js.map +1 -1
- package/dist/detectors/absolute-exception.d.ts.map +1 -1
- package/dist/detectors/absolute-exception.js +10 -4
- package/dist/detectors/absolute-exception.js.map +1 -1
- package/dist/detectors/agreement-slip.d.ts +2 -0
- package/dist/detectors/agreement-slip.d.ts.map +1 -1
- package/dist/detectors/agreement-slip.js +22 -8
- package/dist/detectors/agreement-slip.js.map +1 -1
- package/dist/detectors/bold-label.d.ts +7 -1
- package/dist/detectors/bold-label.d.ts.map +1 -1
- package/dist/detectors/bold-label.js +26 -3
- package/dist/detectors/bold-label.js.map +1 -1
- package/dist/detectors/bold-quoted.d.ts +4 -0
- package/dist/detectors/bold-quoted.d.ts.map +1 -0
- package/dist/detectors/bold-quoted.js +17 -0
- package/dist/detectors/bold-quoted.js.map +1 -0
- 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 +7 -0
- package/dist/detectors/caps-caption.js.map +1 -1
- package/dist/detectors/clause-shape.d.ts +8 -2
- package/dist/detectors/clause-shape.d.ts.map +1 -1
- package/dist/detectors/clause-shape.js +14 -6
- package/dist/detectors/clause-shape.js.map +1 -1
- package/dist/detectors/count-per-section.d.ts.map +1 -1
- package/dist/detectors/count-per-section.js +7 -4
- package/dist/detectors/count-per-section.js.map +1 -1
- package/dist/detectors/defined-term-form.d.ts.map +1 -1
- package/dist/detectors/defined-term-form.js +2 -1
- package/dist/detectors/defined-term-form.js.map +1 -1
- package/dist/detectors/document-shape.d.ts +6 -1
- package/dist/detectors/document-shape.d.ts.map +1 -1
- package/dist/detectors/document-shape.js +14 -4
- package/dist/detectors/document-shape.js.map +1 -1
- package/dist/detectors/doubled-word.d.ts.map +1 -1
- package/dist/detectors/doubled-word.js +5 -1
- package/dist/detectors/doubled-word.js.map +1 -1
- package/dist/detectors/emoticon.d.ts +6 -0
- package/dist/detectors/emoticon.d.ts.map +1 -0
- package/dist/detectors/emoticon.js +19 -0
- package/dist/detectors/emoticon.js.map +1 -0
- package/dist/detectors/en-shape.d.ts +6 -1
- package/dist/detectors/en-shape.d.ts.map +1 -1
- package/dist/detectors/en-shape.js +21 -2
- package/dist/detectors/en-shape.js.map +1 -1
- package/dist/detectors/ending-refrain.d.ts +9 -0
- package/dist/detectors/ending-refrain.d.ts.map +1 -0
- package/dist/detectors/ending-refrain.js +52 -0
- package/dist/detectors/ending-refrain.js.map +1 -0
- package/dist/detectors/fact-consistency.d.ts.map +1 -1
- package/dist/detectors/fact-consistency.js +5 -1
- package/dist/detectors/fact-consistency.js.map +1 -1
- package/dist/detectors/gram-predicate.d.ts.map +1 -1
- package/dist/detectors/gram-predicate.js +12 -3
- package/dist/detectors/gram-predicate.js.map +1 -1
- package/dist/detectors/katakana-density.d.ts +6 -1
- package/dist/detectors/katakana-density.d.ts.map +1 -1
- package/dist/detectors/katakana-density.js +14 -1
- package/dist/detectors/katakana-density.js.map +1 -1
- package/dist/detectors/lexicon.d.ts.map +1 -1
- package/dist/detectors/lexicon.js +3 -1
- package/dist/detectors/lexicon.js.map +1 -1
- package/dist/detectors/lookalike-character.d.ts +2 -0
- package/dist/detectors/lookalike-character.d.ts.map +1 -1
- package/dist/detectors/lookalike-character.js +36 -9
- package/dist/detectors/lookalike-character.js.map +1 -1
- package/dist/detectors/mark-shape.d.ts +3 -3
- package/dist/detectors/mark-shape.d.ts.map +1 -1
- package/dist/detectors/mark-shape.js +53 -17
- package/dist/detectors/mark-shape.js.map +1 -1
- package/dist/detectors/mentioned-phrase.d.ts +3 -1
- package/dist/detectors/mentioned-phrase.d.ts.map +1 -1
- package/dist/detectors/mentioned-phrase.js +9 -0
- package/dist/detectors/mentioned-phrase.js.map +1 -1
- package/dist/detectors/number-style.d.ts +7 -1
- package/dist/detectors/number-style.d.ts.map +1 -1
- package/dist/detectors/number-style.js +34 -2
- package/dist/detectors/number-style.js.map +1 -1
- package/dist/detectors/number-unit.d.ts +7 -1
- package/dist/detectors/number-unit.d.ts.map +1 -1
- package/dist/detectors/number-unit.js +20 -6
- package/dist/detectors/number-unit.js.map +1 -1
- package/dist/detectors/obligation-without-deadline.d.ts +10 -2
- package/dist/detectors/obligation-without-deadline.d.ts.map +1 -1
- package/dist/detectors/obligation-without-deadline.js +47 -2
- package/dist/detectors/obligation-without-deadline.js.map +1 -1
- package/dist/detectors/open-end-names.d.ts +2 -0
- package/dist/detectors/open-end-names.d.ts.map +1 -1
- package/dist/detectors/open-end-names.js +8 -1
- package/dist/detectors/open-end-names.js.map +1 -1
- package/dist/detectors/orthographic-variant.d.ts.map +1 -1
- package/dist/detectors/orthographic-variant.js +5 -3
- package/dist/detectors/orthographic-variant.js.map +1 -1
- package/dist/detectors/paragraph-pointer.d.ts +4 -0
- package/dist/detectors/paragraph-pointer.d.ts.map +1 -0
- package/dist/detectors/paragraph-pointer.js +22 -0
- package/dist/detectors/paragraph-pointer.js.map +1 -0
- package/dist/detectors/particle-run-long-forms.d.ts +7 -0
- package/dist/detectors/particle-run-long-forms.d.ts.map +1 -0
- package/dist/detectors/particle-run-long-forms.js +23 -0
- package/dist/detectors/particle-run-long-forms.js.map +1 -0
- package/dist/detectors/particle-run-quoted-names.d.ts +6 -0
- package/dist/detectors/particle-run-quoted-names.d.ts.map +1 -0
- package/dist/detectors/particle-run-quoted-names.js +18 -0
- package/dist/detectors/particle-run-quoted-names.js.map +1 -0
- package/dist/detectors/phrase-match.d.ts +4 -1
- package/dist/detectors/phrase-match.d.ts.map +1 -1
- package/dist/detectors/phrase-match.js +12 -5
- package/dist/detectors/phrase-match.js.map +1 -1
- package/dist/detectors/redundant-pair.d.ts +5 -0
- package/dist/detectors/redundant-pair.d.ts.map +1 -0
- package/dist/detectors/redundant-pair.js +18 -0
- package/dist/detectors/redundant-pair.js.map +1 -0
- package/dist/detectors/register-separate-part.d.ts +9 -1
- package/dist/detectors/register-separate-part.d.ts.map +1 -1
- package/dist/detectors/register-separate-part.js +23 -0
- package/dist/detectors/register-separate-part.js.map +1 -1
- package/dist/detectors/register-voice.d.ts +4 -3
- package/dist/detectors/register-voice.d.ts.map +1 -1
- package/dist/detectors/register-voice.js +11 -4
- package/dist/detectors/register-voice.js.map +1 -1
- package/dist/detectors/register.d.ts.map +1 -1
- package/dist/detectors/register.js +9 -6
- package/dist/detectors/register.js.map +1 -1
- package/dist/detectors/registry/redundant-pair.d.ts +3 -0
- package/dist/detectors/registry/redundant-pair.d.ts.map +1 -0
- package/dist/detectors/registry/redundant-pair.js +3 -0
- package/dist/detectors/registry/redundant-pair.js.map +1 -0
- package/dist/detectors/request-owner.d.ts +1 -0
- package/dist/detectors/request-owner.d.ts.map +1 -1
- package/dist/detectors/request-owner.js +6 -3
- package/dist/detectors/request-owner.js.map +1 -1
- package/dist/detectors/sentence-ending.d.ts +1 -0
- package/dist/detectors/sentence-ending.d.ts.map +1 -1
- package/dist/detectors/sentence-ending.js +7 -3
- package/dist/detectors/sentence-ending.js.map +1 -1
- package/dist/detectors/signals.d.ts.map +1 -1
- package/dist/detectors/signals.js +5 -2
- package/dist/detectors/signals.js.map +1 -1
- package/dist/detectors/stacked-hedge.d.ts +4 -2
- package/dist/detectors/stacked-hedge.d.ts.map +1 -1
- package/dist/detectors/stacked-hedge.js +16 -3
- package/dist/detectors/stacked-hedge.js.map +1 -1
- package/dist/detectors/structure-tree.d.ts.map +1 -1
- package/dist/detectors/structure-tree.js +1 -0
- package/dist/detectors/structure-tree.js.map +1 -1
- package/dist/detectors/structure.js +3 -3
- package/dist/detectors/structure.js.map +1 -1
- package/dist/detectors/superlative-context.d.ts +7 -0
- package/dist/detectors/superlative-context.d.ts.map +1 -1
- package/dist/detectors/superlative-context.js +9 -0
- package/dist/detectors/superlative-context.js.map +1 -1
- package/dist/detectors/token-shape.d.ts.map +1 -1
- package/dist/detectors/token-shape.js +20 -6
- package/dist/detectors/token-shape.js.map +1 -1
- package/dist/detectors/unbalanced-bracket.d.ts.map +1 -1
- package/dist/detectors/unbalanced-bracket.js +2 -1
- package/dist/detectors/unbalanced-bracket.js.map +1 -1
- package/dist/detectors/unknown-word-context.d.ts +5 -0
- package/dist/detectors/unknown-word-context.d.ts.map +1 -1
- package/dist/detectors/unknown-word-context.js +8 -0
- package/dist/detectors/unknown-word-context.js.map +1 -1
- package/dist/detectors/unknown-word.d.ts.map +1 -1
- package/dist/detectors/unknown-word.js +3 -3
- package/dist/detectors/unknown-word.js.map +1 -1
- package/dist/detectors/weasel-word.d.ts.map +1 -1
- package/dist/detectors/weasel-word.js +23 -4
- package/dist/detectors/weasel-word.js.map +1 -1
- package/dist/facts/era-year.d.ts +2 -0
- package/dist/facts/era-year.d.ts.map +1 -0
- package/dist/facts/era-year.js +7 -0
- package/dist/facts/era-year.js.map +1 -0
- package/dist/facts/fact-scope.d.ts +1 -1
- package/dist/facts/fact-scope.d.ts.map +1 -1
- package/dist/facts/fact-scope.js +18 -8
- package/dist/facts/fact-scope.js.map +1 -1
- package/dist/facts/table-facts.d.ts.map +1 -1
- package/dist/facts/table-facts.js +18 -2
- package/dist/facts/table-facts.js.map +1 -1
- package/dist/own-title-quote.d.ts +7 -0
- package/dist/own-title-quote.d.ts.map +1 -0
- package/dist/own-title-quote.js +19 -0
- package/dist/own-title-quote.js.map +1 -0
- package/dist/paragraph-length.d.ts +4 -0
- package/dist/paragraph-length.d.ts.map +1 -1
- package/dist/paragraph-length.js +6 -0
- package/dist/paragraph-length.js.map +1 -1
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/rule-of-three.d.ts +7 -0
- package/dist/rule-of-three.d.ts.map +1 -1
- package/dist/rule-of-three.js +22 -1
- package/dist/rule-of-three.js.map +1 -1
- package/dist/structure/build.d.ts.map +1 -1
- package/dist/structure/build.js +2 -1
- package/dist/structure/build.js.map +1 -1
- package/dist/structure/definition-use.d.ts.map +1 -1
- package/dist/structure/definition-use.js +3 -1
- package/dist/structure/definition-use.js.map +1 -1
- package/dist/structure/negated-act.d.ts +1 -0
- package/dist/structure/negated-act.d.ts.map +1 -1
- package/dist/structure/negated-act.js +1 -1
- package/dist/structure/negated-act.js.map +1 -1
- package/dist/structure/own-name.d.ts +4 -0
- package/dist/structure/own-name.d.ts.map +1 -0
- package/dist/structure/own-name.js +20 -0
- package/dist/structure/own-name.js.map +1 -0
- package/dist/structure/percent-sum-prose.d.ts.map +1 -1
- package/dist/structure/percent-sum-prose.js +9 -1
- package/dist/structure/percent-sum-prose.js.map +1 -1
- package/dist/structure/percent-sum.d.ts +2 -0
- package/dist/structure/percent-sum.d.ts.map +1 -1
- package/dist/structure/percent-sum.js.map +1 -1
- package/dist/structure/reference-text.d.ts.map +1 -1
- package/dist/structure/reference-text.js +3 -1
- package/dist/structure/reference-text.js.map +1 -1
- package/dist/structure-shape/features.d.ts.map +1 -1
- package/dist/structure-shape/features.js +15 -2
- package/dist/structure-shape/features.js.map +1 -1
- package/dist/te-form-helper.d.ts +22 -0
- package/dist/te-form-helper.d.ts.map +1 -0
- package/dist/te-form-helper.js +35 -0
- package/dist/te-form-helper.js.map +1 -0
- package/dist/word-use.d.ts +7 -0
- package/dist/word-use.d.ts.map +1 -1
- package/dist/word-use.js +20 -1
- package/dist/word-use.js.map +1 -1
- package/package.json +3 -3
- package/rules/absolute-exception.yaml +3 -3
- package/rules/adverb-overuse.yaml +2 -2
- package/rules/all-caps-shouting.yaml +2 -2
- package/rules/bold-label-list.yaml +9 -2
- package/rules/bracket-nesting.yaml +7 -2
- package/rules/bracket-width-consistency.yaml +2 -2
- package/rules/doubled-word.yaml +2 -2
- package/rules/duration-mismatch.yaml +2 -2
- package/rules/excessive-hedging.yaml +2 -1
- package/rules/fact-conflict.yaml +2 -2
- package/rules/katakana-density.yaml +3 -3
- package/rules/lookalike-character.yaml +2 -2
- package/rules/ngram-repetition.yaml +2 -2
- package/rules/no-doubled-joshi.yaml +2 -2
- package/rules/no-mixed-desumasu.yaml +3 -2
- package/rules/number-style-consistency.yaml +2 -2
- package/rules/number-without-unit.yaml +2 -2
- package/rules/obligation-without-deadline.yaml +2 -2
- package/rules/orthographic-variant.yaml +2 -2
- package/rules/padded-intro.yaml +1 -1
- package/rules/redundant-expression.yaml +1 -1
- package/rules/repeated-sentence-ending.yaml +2 -2
- package/rules/request-without-deadline.yaml +2 -2
- package/rules/requirement-smell.yaml +2 -2
- package/rules/rule-of-three.yaml +2 -2
- package/rules/title-length.yaml +7 -2
- package/rules/undefined-acronym.yaml +2 -2
- package/rules/unknown-word.yaml +2 -2
- package/rules/unused-definition.yaml +4 -2
- package/src/bound-word-particles.ts +23 -0
- package/src/derived/stays.ts +4 -1
- package/src/detectors/absolute-exception.ts +11 -5
- package/src/detectors/agreement-slip.ts +35 -10
- package/src/detectors/bold-label.ts +31 -4
- package/src/detectors/bold-quoted.ts +21 -0
- package/src/detectors/caps-caption.ts +10 -0
- package/src/detectors/clause-shape.ts +14 -12
- package/src/detectors/count-per-section.ts +9 -4
- package/src/detectors/defined-term-form.ts +2 -1
- package/src/detectors/document-shape.ts +17 -6
- package/src/detectors/doubled-word.ts +9 -1
- package/src/detectors/emoticon.ts +21 -0
- package/src/detectors/en-shape.ts +25 -2
- package/src/detectors/ending-refrain.ts +66 -0
- package/src/detectors/fact-consistency.ts +4 -1
- package/src/detectors/gram-predicate.ts +14 -3
- package/src/detectors/katakana-density.ts +17 -2
- package/src/detectors/lexicon.ts +3 -1
- package/src/detectors/lookalike-character.ts +40 -10
- package/src/detectors/mark-shape.ts +59 -19
- package/src/detectors/mentioned-phrase.ts +13 -1
- package/src/detectors/number-style.ts +43 -3
- package/src/detectors/number-unit.ts +29 -8
- package/src/detectors/obligation-without-deadline.ts +69 -5
- package/src/detectors/open-end-names.ts +21 -2
- package/src/detectors/orthographic-variant.ts +20 -15
- package/src/detectors/paragraph-pointer.ts +28 -0
- package/src/detectors/particle-run-long-forms.ts +34 -0
- package/src/detectors/particle-run-quoted-names.ts +27 -0
- package/src/detectors/phrase-match.ts +13 -5
- package/src/detectors/redundant-pair.ts +25 -0
- package/src/detectors/register-separate-part.ts +32 -1
- package/src/detectors/register-voice.ts +17 -4
- package/src/detectors/register.ts +9 -6
- package/src/detectors/registry/redundant-pair.ts +4 -0
- package/src/detectors/request-owner.ts +6 -3
- package/src/detectors/sentence-ending.ts +10 -4
- package/src/detectors/signals.ts +5 -2
- package/src/detectors/stacked-hedge.ts +24 -7
- package/src/detectors/structure-tree.ts +1 -0
- package/src/detectors/structure.ts +3 -3
- package/src/detectors/superlative-context.ts +12 -0
- package/src/detectors/token-shape.ts +24 -8
- package/src/detectors/unbalanced-bracket.ts +2 -1
- package/src/detectors/unknown-word-context.ts +9 -0
- package/src/detectors/unknown-word.ts +4 -2
- package/src/detectors/weasel-word.ts +31 -5
- package/src/facts/era-year.ts +7 -0
- package/src/facts/fact-scope.ts +20 -6
- package/src/facts/table-facts.ts +31 -3
- package/src/own-title-quote.ts +28 -0
- package/src/paragraph-length.ts +10 -0
- package/src/plugin.ts +2 -0
- package/src/rule-of-three.ts +27 -1
- package/src/structure/build.ts +2 -1
- package/src/structure/definition-use.ts +4 -1
- package/src/structure/negated-act.ts +1 -1
- package/src/structure/own-name.ts +28 -0
- package/src/structure/percent-sum-prose.ts +12 -1
- package/src/structure/percent-sum.ts +2 -0
- package/src/structure/reference-text.ts +5 -1
- package/src/structure-shape/features.ts +18 -2
- package/src/te-form-helper.ts +52 -0
- package/src/word-use.ts +23 -1
- package/src/honorific-group.ts +0 -22
|
@@ -14,6 +14,7 @@ extra_word_lists:
|
|
|
14
14
|
set-polite-phrase,
|
|
15
15
|
contact-line-opener,
|
|
16
16
|
declaration-particle,
|
|
17
|
+
declaration-ending,
|
|
17
18
|
takeup-opener,
|
|
18
19
|
quote-label,
|
|
19
20
|
]
|
|
@@ -64,8 +65,8 @@ example:
|
|
|
64
65
|
新しい料金は来月から始まります。請求書の形式も変わります。支払いの期限は月末です。古い料金は三月で終わります。
|
|
65
66
|
|
|
66
67
|
not_flagged:
|
|
67
|
-
ja:
|
|
68
|
-
en: Neither register is called right; only the sentences in the minority are pointed at. The body and each list are counted apart, and a sentence in a list's minority is left alone when its register is the document's majority. A bold label that opens an item or a paragraph and is followed by more text on its line is a heading, not a sentence. A paragraph of disclaimer or notice wording (…ご了承ください。) whose two or more sentences all share the register the rest of the document does not use is boilerplate in its own voice and is not counted. Nor are the sentences of a section whose heading names what a reader asked (【相談事例等】, ご質問内容), since they quote the asker in their own words. Nor is a licence notice the publisher appends at the end (a short closing paragraph that names a licence and links to its terms). Nor are words quoted under a label (a sentence opening with 例: or Q:, the paragraph under a lone 用例), the value under a marked field label (■ 調査目的), a contact block (a paragraph with a 〒 or 電話: line), questions run together inside one sentence (…一覧か?順序付きか?などです。), or, in a document with two top-level (#) headings or more, a part under one of them whose two or more sentences all share the register the rest of the document does not use (a page's note about the directive it carries). Counted but never pointed at are a greeting or a closing request said only politely (お疲れ様でした。承認をお願いします。), a wish to others (信じてほしい。), a question that gives only a condition (…だったら?), a speaker declaring a resolve without a subject in a speech (戦争の惨禍を、二度と繰り返さない。), a scene-setting opener the next sentence takes up with そんな, こんな or これだけで, a cry that ends in an exclamation mark (わかるかっ!), a note on a line opening with ※, and a table cell set out between runs of lines that do not end as sentences (制限なし。).
|
|
68
|
+
ja: どちらの調子が正しいかは決めません。多いほうに揃っていない、少ないほうの文だけを指します。文書の中で二つの調子が同じ数なら、揃える先の多いほうが無いので、どちらも指しません。本文と箇条書きは別々に数えます。箇条書きの中の少ないほうが文書全体では多いほうなら、その文は指しません。項目や段落の頭の太字の札(「- **速く書ける。** 説明です。」の「速く書ける。」)は見出しと同じく文に数えません。免責や変更の予告を書いた段落(「…ご了承ください。」)が、2 文以上すべて文書の多いほうと違う同じ調子でそろっているときも、本文とは別の決まり文句として数えません。読み手の相談や質問を載せる節(見出しが「【相談事例等】」「ご質問内容」)の文も、尋ねた人の言葉のままなので数えません。文書の最後に掲載先が付けた利用条件の断り書き(ライセンスの名前と条件の URL を書いた短い段落)も数えません。札を付けて引いた言葉(「例:」「Q:」で始まる文、「用例」だけの段落の下の段落)、「■ 調査目的」のような印付きの札の行の下の記入欄の値、〒や「電話:」の行がある問い合わせ先の段落、一つの文の中に「?」で並べて引いた問い(…一覧か?順序付きか?などです。)、一番上の見出し(#)が二つ以上ある文書で、その見出しの下の 2 文以上がみな文書の多いほうと違う同じ調子でそろった部分(通達の後ろに付いた、ページの説明)も数えません。見出しが無くても、文書の多いほうの最後の文より後ろの 2 文以上がみな違う同じ調子でそろい(その調子の文がそれより前に無く)、その間に調子を持たない行(「第1」のようなリンクの並び)を挟むときは、ページの後ろの注記として数えません。数えたうえで指さないのは、丁寧な形でしか言わない挨拶(お疲れ様でした。)と結びの頼み(承認をお願いします。)、相手への願い(信じてほしい。)、条件だけで問う文(…だったら?)、演説で主語を言わずに決意を言い切る文(戦争の惨禍を、二度と繰り返さない。)、演説でこれから成し遂げることを「〜を…ていく。」と言い切る文(現場の気づきを、幹部の皆さんが形にしていく。)、次の文が「そんな」「こんな」「これだけで」で受ける場面や行いの書き出し(PDFが送れない。そんなときは…)、「!」で終わる叫び(わかるかっ!)、※で始まる行の注記、文で終わらない行の塊に前後を挟まれた表のセル(制限なし。)です。
|
|
69
|
+
en: Neither register is called right; only the sentences in the minority are pointed at. When the document holds as many sentences in one register as in the other, there is no majority to match and neither side is pointed at. The body and each list are counted apart, and a sentence in a list's minority is left alone when its register is the document's majority. A bold label that opens an item or a paragraph and is followed by more text on its line is a heading, not a sentence. A paragraph of disclaimer or notice wording (…ご了承ください。) whose two or more sentences all share the register the rest of the document does not use is boilerplate in its own voice and is not counted. Nor are the sentences of a section whose heading names what a reader asked (【相談事例等】, ご質問内容), since they quote the asker in their own words. Nor is a licence notice the publisher appends at the end (a short closing paragraph that names a licence and links to its terms). Nor are words quoted under a label (a sentence opening with 例: or Q:, the paragraph under a lone 用例), the value under a marked field label (■ 調査目的), a contact block (a paragraph with a 〒 or 電話: line), questions run together inside one sentence (…一覧か?順序付きか?などです。), or, in a document with two top-level (#) headings or more, a part under one of them whose two or more sentences all share the register the rest of the document does not use (a page's note about the directive it carries). Nor, without such a heading, are the two or more sentences after the last one in the document's register when they all share the other register, used nowhere before them, and a line without a register (links such as 第1) sits among them (a page's note under the text it carries). Counted but never pointed at are a greeting or a closing request said only politely (お疲れ様でした。承認をお願いします。), a wish to others (信じてほしい。), a question that gives only a condition (…だったら?), a speaker declaring a resolve without a subject in a speech (戦争の惨禍を、二度と繰り返さない。), a speaker stating in a speech what is to be carried out, ending in 〜ていく with an object (現場の気づきを、幹部の皆さんが形にしていく。), a scene-setting opener the next sentence takes up with そんな, こんな or これだけで, a cry that ends in an exclamation mark (わかるかっ!), a note on a line opening with ※, and a table cell set out between runs of lines that do not end as sentences (制限なし。).
|
|
69
70
|
level_meaning:
|
|
70
71
|
ja: 少ないほうの調子の文が {limit} 文以下のとき、それを指摘
|
|
71
72
|
en: reported when the minority register has {limit} sentences or fewer
|
|
@@ -67,8 +67,8 @@ example:
|
|
|
67
67
|
We fixed three bugs, closed four issues and merged two pull requests. The release also adds five tests.
|
|
68
68
|
|
|
69
69
|
not_flagged:
|
|
70
|
-
ja: 鉤括弧や引用符の中の数、注や URL
|
|
71
|
-
en: 'Numbers inside quotation marks, sentences with a note mark or a URL, and text in another language are not counted. A number word that opens a sentence (spelt out by every style), "one", a number before a unit of measure (6 months, 3 miles) and a number that names a group (Grade 5 students, Room 12) are not counts. Grouping is checked only for large numbers with a currency sign or a word after them; a four-digit number that looks like a year, a label number (H.R. 5376, Form 1040), versions, phone numbers and hexadecimal codes such as a commit hash (2704b2d) are left out. Legal, literary and speech genres do not run this rule.'
|
|
70
|
+
ja: 鉤括弧や引用符の中の数、注や URL を含む文、日本語の中の英文は数えません。「一つ」「一人」のような一だけの漢数字と、「万人」「千人」のような位の字だけの漢数字、「第三回」「統一」のように漢字の後ろの数、「二枚貝」「三人称」のように一つの語の頭にある数、日付の日・月・年、英語で名前の一部になった数(Grade 5 students、Room 12、§4)は数えません。位取りは、通貨の記号か数え方の語・単位が付いた大きな数だけを見て、年に見える 4 桁の数(2019 年)、番号(H.R. 5376)、版や電話番号、コミットのハッシュのような 16 進の符号(2704b2d)は見ません。数の多くが条の外にある文書の中で条として引いた法令(手引きが根拠に引いた手数料令の「二千四百円」)も、法令の書き方なので数えません。全角と半角の違いは fullwidth-alnum-consistency が見ます。法務・文学・話し言葉のジャンルでは見ません。
|
|
71
|
+
en: 'Numbers inside quotation marks, sentences with a note mark or a URL, and text in another language are not counted. A number word that opens a sentence (spelt out by every style), "one", a number before a unit of measure (6 months, 3 miles, 2 nights) and a number that names a group or a section (Grade 5 students, Room 12, §4) are not counts, nor is a kanji numeral that opens a word of its own (二枚貝, a bivalve; 三人称, the third person). Grouping is checked only for large numbers with a currency sign or a word after them; a four-digit number that looks like a year, a label number (H.R. 5376, Form 1040), versions, phone numbers and hexadecimal codes such as a commit hash (2704b2d) are left out. Articles of a law set out in a document whose numbers are mostly outside them (a manual quoting the order its fees rest on) keep the law''s numerals and are not counted. Legal, literary and speech genres do not run this rule.'
|
|
72
72
|
level_meaning:
|
|
73
73
|
ja: 少ないほうの書き方が、その種類の数の {limit}% 以下のとき指摘
|
|
74
74
|
en: reported when the less common style is {limit}% of its kind or less
|
|
@@ -70,8 +70,8 @@ example:
|
|
|
70
70
|
| Taxi | $100 |
|
|
71
71
|
|
|
72
72
|
not_flagged:
|
|
73
|
-
ja: ほかの値に二つ以上、同じ一つの単位が付いているときだけ指します。単位の無い値のほうが多い列、単位が混ざる列(分と時間)、数でない値(未定)は見ません。表の見出しの単位(「金額(円)」)は読みません。数量の列で、ほかの値が借りる期間(4日、2泊)のとき、単位の無い整数(チャイルドシート 1
|
|
74
|
-
en: Reported only when at least two other values carry one and the same unit. A column where bare numbers are the majority, one that mixes units (minutes and hours), and values that are not numbers (TBD) are not checked. A unit written in the header ("Amount ($)") is not read. In a Quantity column whose other values are a hired period (4 days, 2 nights), a bare whole number (Child seat | 1) is a count of pieces and is not reported. In prose, a word of scale is checked only when the document gives it one and the same unit at least five times and has no other bare number with it. A document that states "(in millions of dollars)" and writes "million" alone throughout, one with two units for the word ("$5 million" and "5 million shares"), and one unit serving two numbers ("from $1.1 million to 1.3 million") are not reported.
|
|
73
|
+
ja: ほかの値に二つ以上、同じ一つの単位が付いているときだけ指します。単位の無い値のほうが多い列、単位が混ざる列(分と時間)、数でない値(未定)は見ません。表の見出しの単位(「金額(円)」)は読みません。数量の列で、ほかの値が借りる期間(4日、2泊)のとき、単位の無い整数(チャイルドシート 1)は個数なので指しません。行ごとに違う量を並べた表(来場者の数の行と、満足度の%の行)で、同じ行のほかの列(前期と当期)も単位の無い数なら、その行の数は単位の要らない数として指しません。本文の桁の語は、同じ桁の語に同じ一つの単位を5回以上付けていて、単位の無い数がほかに一つも無いときだけ指します。「(単位:百万円)」と書いて本文でも「百万」だけで書く文書、百万円と百万株のように単位が二つある文書、「100百万〜200百万円」のように後ろの数の単位を前の数にも使う書き方は言いません。万は単位を付けずに書くことが多いので見ません。
|
|
74
|
+
en: Reported only when at least two other values carry one and the same unit. A column where bare numbers are the majority, one that mixes units (minutes and hours), and values that are not numbers (TBD) are not checked. A unit written in the header ("Amount ($)") is not read. In a Quantity column whose other values are a hired period (4 days, 2 nights), a bare whole number (Child seat | 1) is a count of pieces and is not reported. In a table whose rows are different measures (a row of visits, a row of rates in %), a bare number whose row is bare in another column too (Q2 and Q3) is a count that needs no unit, and is not reported. In prose, a word of scale is checked only when the document gives it one and the same unit at least five times and has no other bare number with it. A document that states "(in millions of dollars)" and writes "million" alone throughout, one with two units for the word ("$5 million" and "5 million shares"), and one unit serving two numbers ("from $1.1 million to 1.3 million") are not reported.
|
|
75
75
|
rewrite:
|
|
76
76
|
depth: light
|
|
77
77
|
ja:
|
|
@@ -67,8 +67,8 @@ example:
|
|
|
67
67
|
3. On termination, the Supplier shall return all Confidential Information to the Customer within ten days.
|
|
68
68
|
|
|
69
69
|
not_flagged:
|
|
70
|
-
ja: 期限を書いた文が、期限の無い義務の文より多くない文書では、書き手がそう書くと決めたとみなして指しません。同じ文に期限(7日以内、毎月末日までに、直ちに、事前に)があれば指しません。「速やかに」「遅滞なく」だけの期限は vague-deadline が見ます。権利を定める文(「返還を請求することができる」)と、金額を書いた文(「月額150,000
|
|
71
|
-
en: 'A document where sentences stating a limit are not more than those holding a duty with none is taken to write its duties that way on purpose, and is not reported. A sentence that states a limit (within seven days, by the fifth business day, immediately) is not reported; one with "promptly" alone is vague-deadline''s. A sentence that grants a right (may) or states an amount (shall pay a monthly fee of $9,000, which sets the price; another clause says when) is not read. "by email" says how, not when, and is not a limit. Statutes, court decisions and patents are not read; the contract genre runs this rule. A duty whose article (else its list or paragraph) names the dated deadline of its act (the Due Date for a duty to pay, the Delivery Date for one to deliver) is timed by it, and is not reported.'
|
|
70
|
+
ja: 期限を書いた文が、期限の無い義務の文より多くない文書では、書き手がそう書くと決めたとみなして指しません。同じ文に期限(7日以内、毎月末日までに、直ちに、事前に)があれば指しません。「速やかに」「遅滞なく」だけの期限は vague-deadline が見ます。権利を定める文(「返還を請求することができる」)と、金額を書いた文(「月額150,000円を支払う」は値段を決める文で、いつ払うかは別の条が決めます)は見ません。義務は文の終わりの述語で読み、条件の中の語(「通知したときは」)は見ません。法令・判決・特許は見ません。契約書・規約のジャンルで見ます。義務と同じ条(条が無ければ同じ箇条書きか段落)が、その行いの日付を名指す期限(支払う義務なら支払期日、納入なら納期)を書いていれば、その日が義務の時なので指しません。同じ条のほかの項が同じ行いに期限を書き、どちらかがもう一方を指していれば(第1項で何を払うかを書き、第3項が「本条1項に定める対価」をいつまでに払うかを書く条。「前項の対価を振込みで支払う」も同じ)、その期限が義務の時なので指しません。「2か月を目途に」も期限です。
|
|
71
|
+
en: 'A document where sentences stating a limit are not more than those holding a duty with none is taken to write its duties that way on purpose, and is not reported. A sentence that states a limit (within seven days, by the fifth business day, immediately) is not reported; one with "promptly" alone is vague-deadline''s. A sentence that grants a right (may) or states an amount (shall pay a monthly fee of $9,000, which sets the price; another clause says when) is not read. "by email" says how, not when, and is not a limit. Statutes, court decisions and patents are not read; the contract genre runs this rule. A duty whose article (else its list or paragraph) names the dated deadline of its act (the Due Date for a duty to pay, the Delivery Date for one to deliver) is timed by it, and is not reported. Nor is a duty whose article states a limit for the same act in another paragraph, when one of the two points at the other (the first paragraph says what is paid; the third pays "the fee in paragraph 1 of this Article" within ten days).'
|
|
72
72
|
rewrite:
|
|
73
73
|
depth: light
|
|
74
74
|
ja:
|
|
@@ -56,8 +56,8 @@ example:
|
|
|
56
56
|
Send the form by email. We answer every email within a day. Attach the receipt to the email.
|
|
57
57
|
|
|
58
58
|
not_flagged:
|
|
59
|
-
ja: 読みが同じでも漢字の違う語(書く・描く)、補助動詞・形式名詞と本来の使い方の書き分け(見て下さい・資料を下さい)、書き分けが意味の違いになる語(成る・なる、言う・いう。法務のジャンルでは、法令の書き方で書き分ける 時・とき、物・もの、在る・ある も)、名詞と動詞(払込み・払い込む、申出・申し出る。辞書が名詞を動詞と読んでも)、二つの語に読める漢字の書き方(行っ は 行く とも 行う とも読み、「様を」の様は さま)、語末の「ー」だけの違い(katakana-long-vowel が見ます)、鉤括弧や引用符の中(判決が法令を文をまたいで引く一重の引用符も)と、引用した句を地の文でそのまま繰り返した所、行の頭のリンクで引いた外のページの題名、語の直後のふりがなの括弧の中(HTTP(えいちてぃーてぃーぴー))、会社の名前(青葉硝子㈱、株式会社の前後の名前)、施設や組織の名前(こども動物園、〜センター)、番号を付けて引いた法令の題名(愛がん動物用飼料の安全性の確保に関する法律(平成20年法律第83号))、引用のすぐ後ろの括弧の書き下し(「天子有道」(天子に道有らば))、文献一覧と文の形で書いた文献の引用、略語の元の語(Communication Access Realtime Translation (CART))、#を付けたハッシュタグ、chaff.yaml の names に書いた名前は見ません。「でもって」(以て)、「と」の後の「いたす」(議題といたします)、複合動詞の後ろの動詞(貼り付ける の 付ける)は、それだけの動詞(持つ、思いを致す、つける)と別に比べます。一語の副詞や語(ただいま、昨日来)、熟語の頭の一字の漢字(曇雨天の曇)、切られたカタカナの名前(ラオカイ
|
|
60
|
-
en: The case of a word's first letter (Email, email; Long-Term, long-term) is not a spelling, nor is a word in capitals only (emphasis or an acronym), nor a name in capitals with an ending (SENDs, OPENed), nor the letters of an acronym picked out beside it (CLImatology next to CLIPER), nor a word inside a passage written in capitals (eGAIN in a disclaimer), nor a name coined from capitalised pieces that are not words (Medi-Cal beside medical). A name spelled with capitals (HBase) is still compared. In Japanese, words whose kanji and kana forms mean different things (成る and なる) are not compared, 方 and ほう are compared only before が or で (早いほうが), since elsewhere 方 is mostly the person (担当の方に), nor a label opening a sentence (the (答) of a Q&A), a bracketed spelling in a sentence that names other spellings ((くもり)、(曇)とも書く), kana たつ beside 立つ, since たつ is also time passing (経つ), a numeral (the 三 of 三十), kana written onto a pronoun (私みたような) or okurigana cut off a word (誂らえる); the head of a compound verb (出来上る), an adverb opening a sentence as a conjunction (――もっとも) and a katakana spelling that names a sense (モノ for goods) are compared apart from the word on its own (できる, 最も, もの), while the conjunction さらに、 and the adverb 更に are one word and are compared; in the legal genres each justice's separate opinion (裁判官甲の反対意見は次のとおりである。) is compared only within itself; the judging みる (〜とみられる) and いえる (〜とはいえない) are compared apart from looking and saying (資料を見る, 一概には言えない), and in the legal genres neither are 時 and とき, 物 and もの or 在る and ある, which legal drafting writes apart. A noun and a verb (払込み and 払い込む) are different words, even where the analyser reads the noun as the verb. Hyphenated words that are another word (re-sign, resign), part of an address (github.com), anything in quotation marks (single ones too, as an opinion quotes a statute over several sentences) and a phrase the writer repeats word for word from a quotation in the document, the title of an outside page quoted by a link at a line's head, an entry of a reference list and a citation written as a sentence (See Kay and King (2020), Radical Uncertainty …), the words an acronym stands for (Communication Access Realtime Translation (CART), VADER (Valence Aware Dictionary and sEntiment Reasoner)), a hashtag (#vimconf), a surname a roster sets in capitals (MICHAEL T. McCAUL), the hyphens of a capitalised name where the word is otherwise written with or without them (the Interagency Group beside inter-agency), a Japanese reading in brackets right after a word (HTTP(えいちてぃーてぃーぴー)), a Japanese company name written with its form (青葉硝子㈱) and the team's names are not compared. Nothing is reported when the minority is more than a third. The literature preset turns it off, since old spelling belongs to its time. Nor is a kanji spelling that reads as two words (行っ, read as 行く or 行う; 様 before を, read さま) compared with the kana of the reading the tokenizer picked.
|
|
59
|
+
ja: 読みが同じでも漢字の違う語(書く・描く)、補助動詞・形式名詞と本来の使い方の書き分け(見て下さい・資料を下さい)、書き分けが意味の違いになる語(成る・なる、言う・いう。法務のジャンルでは、法令の書き方で書き分ける 時・とき、物・もの、在る・ある も)、名詞と動詞(払込み・払い込む、申出・申し出る。辞書が名詞を動詞と読んでも)、二つの語に読める漢字の書き方(行っ は 行く とも 行う とも読み、「様を」の様は さま)、語末の「ー」だけの違い(katakana-long-vowel が見ます)、鉤括弧や引用符の中(判決が法令を文をまたいで引く一重の引用符も)と、引用した句を地の文でそのまま繰り返した所、行の頭のリンクで引いた外のページの題名、語の直後のふりがなの括弧の中(HTTP(えいちてぃーてぃーぴー))、会社の名前(青葉硝子㈱、株式会社の前後の名前)、施設や組織の名前(こども動物園、〜センター)、番号を付けて引いた法令の題名(愛がん動物用飼料の安全性の確保に関する法律(平成20年法律第83号))、引用のすぐ後ろの括弧の書き下し(「天子有道」(天子に道有らば))、文献一覧と文の形で書いた文献の引用、略語の元の語(Communication Access Realtime Translation (CART))、#を付けたハッシュタグ、chaff.yaml の names に書いた名前は見ません。「でもって」(以て)、「と」の後の「いたす」(議題といたします)、複合動詞の後ろの動詞(貼り付ける の 付ける)は、それだけの動詞(持つ、思いを致す、つける)と別に比べます。一語の副詞や語(ただいま、昨日来)、熟語の頭の一字の漢字(曇雨天の曇)、切られたカタカナの名前(ラオカイ のカイ)も比べません。「方」と「ほう」は「が」「で」の前(早いほうが)だけで比べ、人の「方」の多い所(担当の方に)は比べません。文の頭の丸括弧の印(問答の(答))、別の書き方を言う文の丸括弧の中((くもり)、(曇)とも書く。)、漢数字(三十の三)、代名詞に続けたかな(私みたような)、切られた送りがな(誂らえる)も比べません。かなの「たつ」は、時がたつにも立つにも読めるので「立つ」と比べません。複合動詞の頭(出来上る)、文の頭の接続詞(――もっとも)、意味を変えるカタカナ(品物のモノ)は、それだけの語(できる、最も、もの)と別に比べます。名詞と「や」「と」で並べた語(物やサービス)は、形式名詞(延長するもの)と別に比べます。接続詞の「さらに、」と副詞の「更に」は同じ語として比べます。法務のジャンルでは、判決の裁判官ごとの意見(裁判官甲の反対意見は次のとおりである。)を、その意見の中だけで比べます。名詞に続けて書いたかなの名詞(全員ぶん)と慣用句の動詞(気をつける)、見立ての「みる」(〜とみられる、増加がみられる)と評価を言う「いえる」(〜とはいえない)は、同じ読みの語(文、名札を付ける、資料を見る)と別に比べます。英字は、頭の字の大文字小文字(Email と email)と、大文字だけの語(強調や略語)、大文字の名前に語尾が付いた語(関数名の SENDs)、名簿の大文字の名字(MICHAEL T. McCAUL)、同じ文の略語の字を示した語(CLIPER と並ぶ CLImatology)、大文字で書いた一節の中の語(免責の段落の eGAIN)、大文字で始まる語でないかけらをハイフンでつないだ名前(medical と並ぶ Medi-Cal)、大文字で始まる語を並べた名前の中のハイフン(inter-agency と並ぶ the Interagency Group)を書き方の違いにしません(HBase のような名前の大文字は比べます)。少ないほうが三分の一を超えるときも言いません。文学のジャンルでは既定で止めています(その時代の書き方のため)。
|
|
60
|
+
en: The case of a word's first letter (Email, email; Long-Term, long-term) is not a spelling, nor is a word in capitals only (emphasis or an acronym), nor a name in capitals with an ending (SENDs, OPENed), nor the letters of an acronym picked out beside it (CLImatology next to CLIPER), nor a word inside a passage written in capitals (eGAIN in a disclaimer), nor a name coined from capitalised pieces that are not words (Medi-Cal beside medical). A name spelled with capitals (HBase) is still compared. In Japanese, words whose kanji and kana forms mean different things (成る and なる) are not compared, 方 and ほう are compared only before が or で (早いほうが), since elsewhere 方 is mostly the person (担当の方に), nor a label opening a sentence (the (答) of a Q&A), a bracketed spelling in a sentence that names other spellings ((くもり)、(曇)とも書く), kana たつ beside 立つ, since たつ is also time passing (経つ), a numeral (the 三 of 三十), kana written onto a pronoun (私みたような) or okurigana cut off a word (誂らえる); the head of a compound verb (出来上る), an adverb opening a sentence as a conjunction (――もっとも) and a katakana spelling that names a sense (モノ for goods) are compared apart from the word on its own (できる, 最も, もの), and a noun joined to another by や or と (物やサービス) apart from the dependent noun (延長するもの), while the conjunction さらに、 and the adverb 更に are one word and are compared; in the legal genres each justice's separate opinion (裁判官甲の反対意見は次のとおりである。) is compared only within itself; the judging みる (〜とみられる) and いえる (〜とはいえない) are compared apart from looking and saying (資料を見る, 一概には言えない), and in the legal genres neither are 時 and とき, 物 and もの or 在る and ある, which legal drafting writes apart. A noun and a verb (払込み and 払い込む) are different words, even where the analyser reads the noun as the verb. Hyphenated words that are another word (re-sign, resign), part of an address (github.com), anything in quotation marks (single ones too, as an opinion quotes a statute over several sentences) and a phrase the writer repeats word for word from a quotation in the document, the title of an outside page quoted by a link at a line's head, an entry of a reference list and a citation written as a sentence (See Kay and King (2020), Radical Uncertainty …), the words an acronym stands for (Communication Access Realtime Translation (CART), VADER (Valence Aware Dictionary and sEntiment Reasoner)), a hashtag (#vimconf), a surname a roster sets in capitals (MICHAEL T. McCAUL), the hyphens of a capitalised name where the word is otherwise written with or without them (the Interagency Group beside inter-agency), a Japanese reading in brackets right after a word (HTTP(えいちてぃーてぃーぴー)), a Japanese company name written with its form (青葉硝子㈱) and the team's names are not compared. Nothing is reported when the minority is more than a third. The literature preset turns it off, since old spelling belongs to its time. Nor is a kanji spelling that reads as two words (行っ, read as 行く or 行う; 様 before を, read さま) compared with the kana of the reading the tokenizer picked.
|
|
61
61
|
level_meaning:
|
|
62
62
|
ja: 少ないほうが語の {limit}% 以下のとき指摘
|
|
63
63
|
en: reported when the minority spelling is {limit}% of the word's uses or less
|
package/rules/padded-intro.yaml
CHANGED
|
@@ -50,7 +50,7 @@ example:
|
|
|
50
50
|
after: We tried generative AI on our internal help desk, and replies now take half as long.
|
|
51
51
|
|
|
52
52
|
not_flagged:
|
|
53
|
-
ja: 文書の冒頭(最初の 4
|
|
53
|
+
ja: 文書の冒頭(最初の 4 文)だけを見ます。本文の途中の「近年」も、冒頭の文の途中の「近年の〜」(その後、近年の災害を踏まえて)も指しません。
|
|
54
54
|
en: Only the opening (the first four sentences) is checked; "in recent years" later in the text is not reported.
|
|
55
55
|
level_meaning:
|
|
56
56
|
ja: 当てはまる書き出しが {limit} 箇所あれば指摘
|
|
@@ -43,8 +43,8 @@ example:
|
|
|
43
43
|
この機能は必要で、設定も簡単です。費用はかかりません。
|
|
44
44
|
|
|
45
45
|
not_flagged:
|
|
46
|
-
ja:
|
|
47
|
-
en: Sentences in different paragraphs are not a run. A sentence that does not end with an auxiliary (a noun, a bare verb) is not compared and breaks the run. Different verbs (読みました, 書きました) are different endings. Sentences that each define a different term in the same frame (台風は〜を指します。ハリケーンは〜を指します。) share their ending on purpose and are not reported.
|
|
46
|
+
ja: 段落をまたいだ文は続きと見ません。助動詞で終わらない文(体言止め、言い切りの動詞)は比べず、そこで続きが切れます。動詞が違えば(読みました、書きました)同じ文末とは見ません。述語の前の語まで同じ締めの句を三文以上重ねた繰り返し(いい船でした。…いい船でした。…いい船でした。)は、一つと数えます。一つの文の中に「?」で並べた問い(これはリストか?順序付きか?…などです。)も比べません。違う語を同じ型で定義する文の並び(台風は〜を指します。ハリケーンは〜を指します。)は、型をそろえたものなので指しません。
|
|
47
|
+
en: Sentences in different paragraphs are not a run. A sentence that does not end with an auxiliary (a noun, a bare verb) is not compared and breaks the run. Different verbs (読みました, 書きました) are different endings. Three sentences or more in a row that close on the very same phrase, the word before the predicate included (いい船でした。…いい船でした。…いい船でした。), are a refrain and count once. Questions run together inside one sentence (これはリストか?順序付きか?…などです。) are not compared either. Sentences that each define a different term in the same frame (台風は〜を指します。ハリケーンは〜を指します。) share their ending on purpose and are not reported.
|
|
48
48
|
level_meaning:
|
|
49
49
|
ja: 同じ文末の文が {limit} 文続くまで
|
|
50
50
|
en: up to {limit} sentences in a row with the same ending
|
|
@@ -60,8 +60,8 @@ example:
|
|
|
60
60
|
I have no other questions.
|
|
61
61
|
|
|
62
62
|
not_flagged:
|
|
63
|
-
ja: 確認・返信・提出のように、済んだかどうかが後で分かる動作を頼む文だけを見ます。「ご了承ください」のような心構えの依頼、「ご不明な点があれば、ご連絡ください」のような条件付きの申し出、「ご質問はメールでお送りください」のような質問を受け付ける申し出、「ご相談ください」「お越しください」のような誘い、連絡先の行(「電話:」)と同じ文の依頼は見ません。期限か担当が、その文か次の文にあれば指しません。「ご提出いただく前に」「送信後、」のように、いつするかを依頼の文が言っていれば期限と読みます。見出しが期限を言っていれば(「見積提出期限:…」「【随時受付】」)、その下の依頼はその期限を受け継ぎます。締め切りだけを書く節(見出しが「提出期限」「判断の期限」「DATES
|
|
64
|
-
en: Only requests for an action whose completion can be checked (review, reply, send) are read. Courtesy requests, conditional offers ("If you have questions, let me know"), open offers ("Please send any questions to me"), invitations ("Please come and register") and a request on a contact line (a "Fax" or "Phone" label and its number) are not. A deadline or owner in the same or the next sentence is enough; so is a timing in the request itself ("after you pay"), or a heading above it that names the deadline. A section of its own for the deadline (headed only "DATES:" or "Deadline", with a deadline word and a date in it) gives that deadline to every request after it, and to the requests in the sections before it at its own level under the same heading (a proposal's "Summary"). In Japanese, 「ぜひ参加をご検討ください」 ("do consider joining") is an invitation, and a document titled 「(諮問)」, which asks a council to deliberate, carries no deadline by its kind. A request not to do something ("Please do not submit comments by email") forbids and is not read. Business documents only.
|
|
63
|
+
ja: 確認・返信・提出のように、済んだかどうかが後で分かる動作を頼む文だけを見ます。「ご了承ください」のような心構えの依頼、「ご不明な点があれば、ご連絡ください」のような条件付きの申し出、「ご質問はメールでお送りください」のような質問を受け付ける申し出、「ご相談ください」「お越しください」のような誘い、連絡先の行(「電話:」)と同じ文の依頼は見ません。期限か担当が、その文か次の文にあれば指しません。「ご提出いただく前に」「送信後、」のように、いつするかを依頼の文が言っていれば期限と読みます。見出しが期限を言っていれば(「見積提出期限:…」「【随時受付】」)、その下の依頼はその期限を受け継ぎます。締め切りだけを書く節(見出しが「提出期限」「判断の期限」「DATES:」だけで、締め切りの語と日付がある)や、決める日を書いた予定の節(見出しが「今後のスケジュール」で、「2026年12月:経営会議にて承認」のように日付と決める段取りの語がある)があれば、その後ろの依頼と、同じ見出しの下で前に並ぶ節(提案の「結論」)の依頼は、どれもその締め切りを持ちます。「ぜひ参加をご検討ください」は誘いなので見ません。題が「(諮問)」の文書は、審議会に期限を付けずに審議を頼む文書なので見ません。しないように頼む文(「送らないでください」「ご遠慮ください」)は禁止なので見ません。ビジネスの文書でだけ動きます。
|
|
64
|
+
en: Only requests for an action whose completion can be checked (review, reply, send) are read. Courtesy requests, conditional offers ("If you have questions, let me know"), open offers ("Please send any questions to me"), invitations ("Please come and register") and a request on a contact line (a "Fax" or "Phone" label and its number) are not. A deadline or owner in the same or the next sentence is enough; so is a timing in the request itself ("after you pay"), or a heading above it that names the deadline. A section of its own for the deadline (headed only "DATES:" or "Deadline", with a deadline word and a date in it), or a schedule that says when the decision is made (headed "Timeline", with a date and a decision word, as in "December 2026, board approval"), gives that deadline to every request after it, and to the requests in the sections before it at its own level under the same heading (a proposal's "Summary"). In Japanese, 「ぜひ参加をご検討ください」 ("do consider joining") is an invitation, and a document titled 「(諮問)」, which asks a council to deliberate, carries no deadline by its kind. A request not to do something ("Please do not submit comments by email") forbids and is not read. Business documents only.
|
|
65
65
|
rewrite:
|
|
66
66
|
depth: light
|
|
67
67
|
ja:
|
|
@@ -74,5 +74,5 @@ example:
|
|
|
74
74
|
config: { genre: technical/spec }
|
|
75
75
|
|
|
76
76
|
not_flagged:
|
|
77
|
-
ja: 要求の文でない文(説明や背景)、法令、ブログやビジネス文書は見ません。語彙表にない言い方は指しません。文書が定めた名前の「等」(以下「委託先等」という、銀行等(…をいう。)、定義の号の頭の語、次の段落で定義する項目だけを書いた語(9
|
|
78
|
-
en: Sentences that state no requirement (background, explanation), statutes, and blogs and business documents are not checked. Phrases not on chaff's lists are not reported. In Japanese, an open word in the clause that describes what the requirement is about (SNSなどを通じて…行う取引は、…必要があります) is not reported, since it is not in what the reader is asked to do. An open-ended word inside a name the document defines (a quoted term, one defined in the brackets after it, or one an item of a definition list holds alone and the next paragraph defines) is not reported. "As soon as possible" followed in the same sentence by a limit in numbers ("but in any event no later than two days after") is bounded, and not reported. In a contract, "including, but not limited to" is a term of art that keeps the listed examples from narrowing the class, and is not reported. In Japanese, 等 right before the words that name the kind it gives examples of (印刷等、二次的に利用, "secondary use, such as printing") is not reported either. Nor is a Japanese 等 in a condition (訂正等を行った際に), a right the writer grants (できるものとする) or a prohibition or disclaimer (てはならない, ないものとする), because such a list is kept wide on purpose; the same holds for a sentence closed by a negation (しないこと, ではないこと), one that says who holds a right (帰属するものとする, 留保されるものとします), and the items of a list under a lead that forbids them (次の行為をしてはならない). A Japanese list opened by a pointing word (当該改良、改善等, "the said improvements, etc.") names one given before and is not reported again; or an open list in brackets right after a condition word (場合(…等), "in cases (…, etc.)"), which gives examples of when the requirement applies.
|
|
77
|
+
ja: 要求の文でない文(説明や背景)、法令、ブログやビジネス文書は見ません。語彙表にない言い方は指しません。文書が定めた名前の「等」(以下「委託先等」という、銀行等(…をいう。)、定義の号の頭の語、次の段落で定義する項目だけを書いた語(9 書面等)と、監査等委員会のように後ろへ語が続く「等」は、列挙を閉じているので指しません。文書が定義した語のすぐ後ろの「等」(「秘密情報」と定義した文書の秘密情報等)も、定義したものを広げた名前で、開いた一覧ではないので指しません。すぐ後ろで種類を名指す「等」(印刷等、二次的に利用される場合/印刷等の二次的利用)も、一覧がその種類の例なので指しません。条件(訂正等を行った際に)、与える権利(消去等できるものとします)、禁止や免責(転載等をしてはならない、責任を負わないものとします)の中の「等」も、わざと広く取った一覧なので指しません。「しないこと。」「ではないこと。」で閉じる文(禁止や否定)、権利が誰のものかを定める文(帰属するものとする、留保されるものとします)、「次の行為をしてはならない。」の下に並ぶ項目の中の「等」も同じです。「当該」「前記」で始まる一覧(当該改良、改善等)は前に挙げた一覧を指し直すだけなので、そこでは指しません。要求が何についてかを説明する節の中の「など」(SNSなどを通じて知り合った人と行う取引は、…必要があります)も、果たす義務の中にないので指しません。条件の語のすぐ後ろの括弧の中の「等」(不要な場合(一つの表だけを読むとき等)も付けること)は、いつ当てはまるかの例なので指しません。英語の as soon as possible は、同じ文に日数の期限(no later than two days after)があれば、期限が決まっているので指しません。英語の but not limited to(including, but not limited to)は、契約書では例の一覧で範囲を狭めないための決まった言い方なので、契約書では指しません。
|
|
78
|
+
en: Sentences that state no requirement (background, explanation), statutes, and blogs and business documents are not checked. Phrases not on chaff's lists are not reported. In Japanese, an open word in the clause that describes what the requirement is about (SNSなどを通じて…行う取引は、…必要があります) is not reported, since it is not in what the reader is asked to do. An open-ended word inside a name the document defines (a quoted term, one defined in the brackets after it, or one an item of a definition list holds alone and the next paragraph defines) is not reported, nor is one written right after a term the document defines (秘密情報等 where 「秘密情報」 is defined), which widens a named thing rather than leaving a list open. "As soon as possible" followed in the same sentence by a limit in numbers ("but in any event no later than two days after") is bounded, and not reported. In a contract, "including, but not limited to" is a term of art that keeps the listed examples from narrowing the class, and is not reported. In Japanese, 等 right before the words that name the kind it gives examples of (印刷等、二次的に利用, "secondary use, such as printing") is not reported either. Nor is a Japanese 等 in a condition (訂正等を行った際に), a right the writer grants (できるものとする) or a prohibition or disclaimer (てはならない, ないものとする), because such a list is kept wide on purpose; the same holds for a sentence closed by a negation (しないこと, ではないこと), one that says who holds a right (帰属するものとする, 留保されるものとします), and the items of a list under a lead that forbids them (次の行為をしてはならない). A Japanese list opened by a pointing word (当該改良、改善等, "the said improvements, etc.") names one given before and is not reported again; or an open list in brackets right after a condition word (場合(…等), "in cases (…, etc.)"), which gives examples of when the requirement applies.
|
package/rules/rule-of-three.yaml
CHANGED
|
@@ -122,8 +122,8 @@ example:
|
|
|
122
122
|
- No review
|
|
123
123
|
|
|
124
124
|
not_flagged:
|
|
125
|
-
ja: 箇条書きが 1 つしかない文書は見ません。5 つより少なければ、1 つで割合が大きく動くので、全部が 3 項目のときだけ指摘します。本文の最初の文より前の箇条書き(題と日付のすぐ下の要点の箱)は、項目の数をサイトの型が決めているので数えません。すぐ下の行が「など」で始まる箇条書きは、書いた 3 つのほかにもあると言っているので、3 項目とは数えません。仕様書(technical/spec)のジャンルでは見ません。文の中に並べた 3 つの語(「速く、安く、確実に」)は数えません。人の文書のほうが多く書くからです。
|
|
126
|
-
en: "Documents with a single list are not checked. With fewer than five, one list moves the share a long way, so only a document whose every list has three items is reported. A list above the first sentence of the body (a box of key points under the title and date) is not counted, since the site's template sets its length. A list followed by a line opening with etc. or and so on says there are more than the three written, and is not counted as three. Specification (technical/spec) genres do not run this rule. Three words listed inside a sentence (fast, cheap and reliable) are not counted, since human documents write them more often."
|
|
125
|
+
ja: 箇条書きが 1 つしかない文書は見ません。5 つより少なければ、1 つで割合が大きく動くので、全部が 3 項目のときだけ指摘します。本文の最初の文より前の箇条書き(題と日付のすぐ下の要点の箱)は、項目の数をサイトの型が決めているので数えません。すぐ下の行が「など」で始まる箇条書きは、書いた 3 つのほかにもあると言っているので、3 項目とは数えません。どの項目も「受付:2鉢」「家賃:8万円」のように札の後ろに数を書いた箇条書きは、数の内訳で項目の数は中身が決めているので、3 項目とは数えません。仕様書(technical/spec)のジャンルでは見ません。文の中に並べた 3 つの語(「速く、安く、確実に」)は数えません。人の文書のほうが多く書くからです。
|
|
126
|
+
en: "Documents with a single list are not checked. With fewer than five, one list moves the share a long way, so only a document whose every list has three items is reported. A list above the first sentence of the body (a box of key points under the title and date) is not counted, since the site's template sets its length. A list followed by a line opening with etc. or and so on says there are more than the three written, and is not counted as three. A list whose every item gives a figure after a label (Rent: $1,200) is a breakdown whose length the facts set, and is not counted as three either. Specification (technical/spec) genres do not run this rule. Three words listed inside a sentence (fast, cheap and reliable) are not counted, since human documents write them more often."
|
|
127
127
|
level_meaning:
|
|
128
128
|
ja: 3 項目の箇条書きの割合 {limit}% まで
|
|
129
129
|
en: up to {limit}% of lists with exactly three items
|
package/rules/title-length.yaml
CHANGED
|
@@ -3,6 +3,7 @@ layer: L1
|
|
|
3
3
|
status: stable
|
|
4
4
|
how_to_find: title-length
|
|
5
5
|
requires: [markdown]
|
|
6
|
+
uses: [pos]
|
|
6
7
|
severity: info
|
|
7
8
|
|
|
8
9
|
name:
|
|
@@ -68,6 +69,8 @@ example:
|
|
|
68
69
|
config: { genre: blog/tech }
|
|
69
70
|
before: |
|
|
70
71
|
## 2025年度から始まる新しい在庫管理システムへの移行に伴う各店舗での作業手順と注意点について
|
|
72
|
+
|
|
73
|
+
2025年度の移行で各店舗が行う作業と、注意する点をまとめます。
|
|
71
74
|
after: |
|
|
72
75
|
## 在庫システムの移行手順
|
|
73
76
|
|
|
@@ -76,14 +79,16 @@ example:
|
|
|
76
79
|
config: { genre: blog/tech }
|
|
77
80
|
before: |
|
|
78
81
|
## What every store needs to do during the move to the new inventory system in the 2025 financial year
|
|
82
|
+
|
|
83
|
+
What every store does during the move in the 2025 financial year.
|
|
79
84
|
after: |
|
|
80
85
|
## Moving to the new inventory system
|
|
81
86
|
|
|
82
87
|
What every store does during the move in the 2025 financial year.
|
|
83
88
|
|
|
84
89
|
not_flagged:
|
|
85
|
-
ja: "見出しの頭の番号(「第2章」「1.」)は数えません。末尾の括弧の中の番号付きの通し名(「(490: Employee travel)」)も数えず、ほかの文書の題をかぎ括弧で引いた所(「「…の取扱いについて」等の一部改正」)は一つの名前と数えます。英字の語は一語を二文字と数えます。報告書・プレスリリース・議事録・仕様書・論文は上限が高く、法務・文学・話し言葉のジャンルと、見出しが質問の文になる FAQ
|
|
86
|
-
en: "A number label at the head of a heading (Chapter 2, 1.) is not counted. Nor is a numbered series label in brackets at its end (“(490: Employee travel)”), and another document's title quoted in 「」 counts as one name. Reports, press releases, minutes, specifications and papers have a higher limit; legal, literary and speech genres, and FAQs (whose headings are questions), do not run this rule. In any genre, a heading that ends with a question mark is not counted, since its length is the reader's question."
|
|
90
|
+
ja: "見出しの頭の番号(「第2章」「1.」)は数えません。末尾の括弧の中の番号付きの通し名(「(490: Employee travel)」)も数えず、ほかの文書の題をかぎ括弧で引いた所(「「…の取扱いについて」等の一部改正」)は一つの名前と数えます。英字の語は一語を二文字と数えます。報告書・プレスリリース・議事録・仕様書・論文は上限が高く、法務・文学・話し言葉のジャンルと、見出しが質問の文になる FAQ では見ません。ほかのジャンルでも、?や「か」で終わる質問の見出し(…できますか。)は、長さが読み手の問いそのものなので見ません。"
|
|
91
|
+
en: "A number label at the head of a heading (Chapter 2, 1.) is not counted. Nor is a numbered series label in brackets at its end (“(490: Employee travel)”), and another document's title quoted in 「」 counts as one name. Reports, press releases, minutes, specifications and papers have a higher limit; legal, literary and speech genres, and FAQs (whose headings are questions), do not run this rule. In any genre, a heading that ends with a question mark, or with a Japanese question particle (…できますか。), is not counted, since its length is the reader's question."
|
|
87
92
|
level_meaning:
|
|
88
93
|
ja: 題や見出しが {limit} 文字を超えたら指摘
|
|
89
94
|
en: reported when a title or heading runs past {limit} words
|
|
@@ -91,8 +91,8 @@ example:
|
|
|
91
91
|
after: Our key goal indicator (KGI) this term is to reach product-market fit (PMF).
|
|
92
92
|
|
|
93
93
|
not_flagged:
|
|
94
|
-
ja: 誰でも知っている略語(URL、PDF など)と、前後の括弧で説明した略語、会社の名前の中の英字(㈱ADEKA、CO.,LTD.)は指しません。ひな形の名前の置き場所(OOOO、XX 月)と、外のページへのリンクを並べた一覧の題名の中の略語も指しません(題名の略語は数には入れます)。大文字の違うだけの書き方で説明した略語(TCoP と TCOP)、略語を話題にする文で語に書き出した略語(略語の DOB … date of birth)、一覧で語のすぐ下にその語を名指すリンクを入れ子にした語(- GPL の下の GNU General Public License)も指しません。判例の引用の中の当事者と裁判所の名前(Ashwander v. TVA, 297 U.S. 288、MCI Telecomms. Corp. v. AT&T、(SDNY 1952))、引用の中の行政機関の事件番号(NOV/CFA 01-01)も指しません(引用の略語は数には入れます)。判決の頭の MR. JUSTICE も指しません。括弧の中で略語に「or」で別の呼び名を添えたもの(Department of Health and Human Services (HHS or the Department))、ハイフンで繋いだ字まで名前と揃うもの(Agency for Health (ARPA-H))は説明したと読み、メールアドレスの中の英字(OASH-RFI@hhs.gov)は略語と読みません。文書の中に書いた ABNF の文法の規則の名前と値(CRLF、%x0D)、等級の並び(A と AA)、番号で引く官報や判例集(80 FR 66128、2022 WL 4447293)、日付の付いた識別子の前の種類(WD WD-ABC1-20200101)、PO Box の PO も指しません。文献を引いて始まる注(1. See L. Summers (2015), "…," IMF Economic Review)の中の略語は、引いた文献の題名や誌名の書き方なので指しません(数には入れます)。角括弧の見出しで始まる文献の項目([FETCH] WHATWG, …)の中の略語も同じです。2 つ以上の番号で引く続き物の名前(BCP 78 と BCP 14、DR 4339 と DR 4340)、同じ文の前のほうで名前を書き出した略語(U.S. Small Business Administration … SBA)、肩書きの後ろの判事の姓(Lord HOLT、Mr. Justice BULLER)、商標の印の付いた名前(Acrobat DC®)、条で引く法令集(44 USC. 3502、15 USCA § 709)と、編と区分で引く法令集(21 CFR subpart J)も指しません。ショートメッセージで送るキーワード(texting GNPCGS to 333111)、名前のまま書いた製品の版(Adobe Acrobat Reader DC)、頭だけ大文字の語に繋いだ名前の中の大文字(NITE SAFE-Lite)も指しません。同じ文の前のほうで、同じ名詞の前に小文字で書き出した略語(incident response plan … IR plans)と、括弧の中で小文字の語を添えた略語の名前の頭の頭文字が揃うもの(… Partnerships to Stimulate Cybersecurity Education (RAMPS program))は説明したと読みます。貼り付けたチャットの発言(<jinxer-wm> FIRING …)の中の略語は、発言した人やボットの言葉なので指しません(数には入れます)。番地から州と郵便番号まで揃った所在地の中の大文字(1600 Elm Rd. NE, MS K12-3, Springfield, GA 30329 の NE と MS)、SQL のキーワード(VIEW、WHERE)、文の中で頭だけ大文字の語にも書いた名前を大文字で書いたもの(a hotel / Airbnb と書いた文書の AIRBNB)も指しません。行の頭に大文字で書いた接続詞(OR, Skip to …、二つの選択肢の間に一行で置いた OR)も指しません。ファイルの種類の名前としてだけ書いた大文字(the MAP files、MAPファイル、拡張子の “.MAP”)も指しません。辞書が間投詞としてしか知らない 3 文字以上の語を大文字で書いたもの(製品の名前の HEY
|
|
95
|
-
en: Common acronyms (URL, PDF), acronyms spelled out in brackets next to them, and the letters of a company name (㈱ADEKA, CO.,LTD.) are not reported. Neither are a template's placeholders (OOOO, XX 月) or an acronym in the title of a page in a list of links (it still counts towards the limit). Nor are an acronym explained under another capitalisation (TCoP, then TCOP), one a sentence about the abbreviation writes out (the abbreviation DOB … date of birth), or a term in a list whose nested link names it (- GPL above GNU General Public License). Nor are the parties and courts of a case citation (Ashwander v. TVA, 297 U.S. 288; MCI Telecomms. Corp. v. AT&T; (SDNY 1952)), an agency's docket number in a citation (NOV/CFA 01-01); a citation's acronyms still count towards the limit. Nor is the MR. JUSTICE that opens a line of an opinion. An acronym given another name after "or" in its parenthesis (Department of Health and Human Services (HHS or the Department)) or spelled out with its hyphened letter (Agency for Health (ARPA-H)) counts as expanded, and the letters of an email address (OASH-RFI@hhs.gov) are not an acronym. Nor are the rule names and values of an ABNF grammar in the text (CRLF, %x0D), the rungs of a grade ladder (A and AA), a register or reporter cited by number (80 FR 66128, 2022 WL 4447293), the kind written before a dated identifier (WD WD-ABC1-20200101), or the PO of a PO Box. A note that opens with a citation (1. See L. Summers (2015), "…," IMF Economic Review) is written in the cited work's words, and its acronyms are not reported (they still count towards the limit); so is an entry of a reference list keyed by a bracketed label ([FETCH] WHATWG, …). Nor are capitals the document cites by two or more numbers (BCP 78 and BCP 14, DR 4339 and DR 4340), an acronym whose name the same sentence writes out before it (U.S. Small Business Administration … SBA), a judge's surname after his title (Lord HOLT, Mr. Justice BULLER), a name marked as a trademark (Acrobat DC®), a code cited by section (44 USC. 3502, 15 USCA § 709), or a code cited by title and division (21 CFR subpart J). Nor are a keyword to send by text message (texting GNPCGS to 333111), a product's edition written with the product's name (Adobe Acrobat Reader DC), or capitals joined to a capitalised word in a name (NITE SAFE-Lite). An acronym the same sentence writes out in lower case before the same noun (incident response plan … IR plans), and one bracketed with a word in lower case after a name whose head gives its letters (… Partnerships to Stimulate Cybersecurity Education (RAMPS program)), count as expanded. An acronym in a pasted chat line (<jinxer-wm> FIRING …) is the speaker's or the bot's words, and is not reported (it still counts towards the limit). Nor are the capitals inside a postal address that runs from a street number to a state and ZIP code (the NE and MS of 1600 Elm Rd. NE, MS K12-3, Springfield, GA 30329), a keyword of SQL (VIEW, WHERE), or a name in capitals that the document also writes inside a sentence with only its first letter a capital (AIRBNB in a text that writes a hotel / Airbnb). Nor is a conjunction written in capitals at the head of a line (OR, Skip to …; an OR alone between two options). Nor are capitals a document writes only as the name of a kind of file (the MAP files, MAPファイル, the extension “.MAP”). Nor is a word of three letters or more that the dictionary knows only as an interjection, written in capitals (HEY, a product's name).
|
|
94
|
+
ja: 誰でも知っている略語(URL、PDF など)と、前後の括弧で説明した略語、会社の名前の中の英字(㈱ADEKA、CO.,LTD.)は指しません。ひな形の名前の置き場所(OOOO、XX 月)と、外のページへのリンクを並べた一覧の題名の中の略語も指しません(題名の略語は数には入れます)。大文字の違うだけの書き方で説明した略語(TCoP と TCOP)、略語を話題にする文で語に書き出した略語(略語の DOB … date of birth)、一覧で語のすぐ下にその語を名指すリンクを入れ子にした語(- GPL の下の GNU General Public License)も指しません。判例の引用の中の当事者と裁判所の名前(Ashwander v. TVA, 297 U.S. 288、MCI Telecomms. Corp. v. AT&T、(SDNY 1952))、引用の中の行政機関の事件番号(NOV/CFA 01-01)も指しません(引用の略語は数には入れます)。判決の頭の MR. JUSTICE も指しません。括弧の中で略語に「or」で別の呼び名を添えたもの(Department of Health and Human Services (HHS or the Department))、ハイフンで繋いだ字まで名前と揃うもの(Agency for Health (ARPA-H))は説明したと読み、メールアドレスの中の英字(OASH-RFI@hhs.gov)は略語と読みません。文書の中に書いた ABNF の文法の規則の名前と値(CRLF、%x0D)、等級の並び(A と AA)、番号で引く官報や判例集(80 FR 66128、2022 WL 4447293)、日付の付いた識別子の前の種類(WD WD-ABC1-20200101)、PO Box の PO も指しません。文献を引いて始まる注(1. See L. Summers (2015), "…," IMF Economic Review)の中の略語は、引いた文献の題名や誌名の書き方なので指しません(数には入れます)。角括弧の見出しで始まる文献の項目([FETCH] WHATWG, …)の中の略語も同じです。2 つ以上の番号で引く続き物の名前(BCP 78 と BCP 14、DR 4339 と DR 4340)、同じ文の前のほうで名前を書き出した略語(U.S. Small Business Administration … SBA)、肩書きの後ろの判事の姓(Lord HOLT、Mr. Justice BULLER)、商標の印の付いた名前(Acrobat DC®)、条で引く法令集(44 USC. 3502、15 USCA § 709)と、編と区分で引く法令集(21 CFR subpart J)も指しません。ショートメッセージで送るキーワード(texting GNPCGS to 333111)、名前のまま書いた製品の版(Adobe Acrobat Reader DC)、頭だけ大文字の語に繋いだ名前の中の大文字(NITE SAFE-Lite)も指しません。同じ文の前のほうで、同じ名詞の前に小文字で書き出した略語(incident response plan … IR plans)と、括弧の中で小文字の語を添えた略語の名前の頭の頭文字が揃うもの(… Partnerships to Stimulate Cybersecurity Education (RAMPS program))は説明したと読みます。貼り付けたチャットの発言(<jinxer-wm> FIRING …)の中の略語は、発言した人やボットの言葉なので指しません(数には入れます)。番地から州と郵便番号まで揃った所在地の中の大文字(1600 Elm Rd. NE, MS K12-3, Springfield, GA 30329 の NE と MS)、SQL のキーワード(VIEW、WHERE)、文の中で頭だけ大文字の語にも書いた名前を大文字で書いたもの(a hotel / Airbnb と書いた文書の AIRBNB)も指しません。行の頭に大文字で書いた接続詞(OR, Skip to …、二つの選択肢の間に一行で置いた OR)も指しません。ファイルの種類の名前としてだけ書いた大文字(the MAP files、MAPファイル、拡張子の “.MAP”)も指しません。辞書が間投詞としてしか知らない 3 文字以上の語を大文字で書いたもの(製品の名前の HEY)も指しません。どちらも 5 文字以上の大文字の語が 2 つ並んだもの(計画の名前の MIRAI SCHOOL、UNITED STATES)は、大文字で書いた名前や語なので指しません。
|
|
95
|
+
en: Common acronyms (URL, PDF), acronyms spelled out in brackets next to them, and the letters of a company name (㈱ADEKA, CO.,LTD.) are not reported. Neither are a template's placeholders (OOOO, XX 月) or an acronym in the title of a page in a list of links (it still counts towards the limit). Nor are an acronym explained under another capitalisation (TCoP, then TCOP), one a sentence about the abbreviation writes out (the abbreviation DOB … date of birth), or a term in a list whose nested link names it (- GPL above GNU General Public License). Nor are the parties and courts of a case citation (Ashwander v. TVA, 297 U.S. 288; MCI Telecomms. Corp. v. AT&T; (SDNY 1952)), an agency's docket number in a citation (NOV/CFA 01-01); a citation's acronyms still count towards the limit. Nor is the MR. JUSTICE that opens a line of an opinion. An acronym given another name after "or" in its parenthesis (Department of Health and Human Services (HHS or the Department)) or spelled out with its hyphened letter (Agency for Health (ARPA-H)) counts as expanded, and the letters of an email address (OASH-RFI@hhs.gov) are not an acronym. Nor are the rule names and values of an ABNF grammar in the text (CRLF, %x0D), the rungs of a grade ladder (A and AA), a register or reporter cited by number (80 FR 66128, 2022 WL 4447293), the kind written before a dated identifier (WD WD-ABC1-20200101), or the PO of a PO Box. A note that opens with a citation (1. See L. Summers (2015), "…," IMF Economic Review) is written in the cited work's words, and its acronyms are not reported (they still count towards the limit); so is an entry of a reference list keyed by a bracketed label ([FETCH] WHATWG, …). Nor are capitals the document cites by two or more numbers (BCP 78 and BCP 14, DR 4339 and DR 4340), an acronym whose name the same sentence writes out before it (U.S. Small Business Administration … SBA), a judge's surname after his title (Lord HOLT, Mr. Justice BULLER), a name marked as a trademark (Acrobat DC®), a code cited by section (44 USC. 3502, 15 USCA § 709), or a code cited by title and division (21 CFR subpart J). Nor are a keyword to send by text message (texting GNPCGS to 333111), a product's edition written with the product's name (Adobe Acrobat Reader DC), or capitals joined to a capitalised word in a name (NITE SAFE-Lite). An acronym the same sentence writes out in lower case before the same noun (incident response plan … IR plans), and one bracketed with a word in lower case after a name whose head gives its letters (… Partnerships to Stimulate Cybersecurity Education (RAMPS program)), count as expanded. An acronym in a pasted chat line (<jinxer-wm> FIRING …) is the speaker's or the bot's words, and is not reported (it still counts towards the limit). Nor are the capitals inside a postal address that runs from a street number to a state and ZIP code (the NE and MS of 1600 Elm Rd. NE, MS K12-3, Springfield, GA 30329), a keyword of SQL (VIEW, WHERE), or a name in capitals that the document also writes inside a sentence with only its first letter a capital (AIRBNB in a text that writes a hotel / Airbnb). Nor is a conjunction written in capitals at the head of a line (OR, Skip to …; an OR alone between two options). Nor are capitals a document writes only as the name of a kind of file (the MAP files, MAPファイル, the extension “.MAP”). Nor is a word of three letters or more that the dictionary knows only as an interjection, written in capitals (HEY, a product's name). Nor are two words in capitals side by side, each of five letters or more (MIRAI SCHOOL, the name of a plan; UNITED STATES), which are a name or words written in capitals.
|
|
96
96
|
level_meaning:
|
|
97
97
|
ja: 説明のない略語が {limit} 種類あれば指摘。文書が自分で略語を {limit} 個展開していれば、1 つの抜けから指摘
|
|
98
98
|
en: reported once {limit} different acronyms go unexplained, or from the first one when the document itself spells out {limit} others
|
package/rules/unknown-word.yaml
CHANGED
|
@@ -47,8 +47,8 @@ example:
|
|
|
47
47
|
The report is attached to this email.
|
|
48
48
|
|
|
49
49
|
not_flagged:
|
|
50
|
-
ja: 大文字を含む語、四字より短い語、コード・URL・メールアドレスの中の語、強調や角括弧で頭の字を分けた語の残り(**G**lobally の lobally、[e]xpressions の xpressions)、文書で二度以上使う語、一字違いの辞書の語が無い語、chaff.yaml の names に並べた語、語彙表 known-misspelling が別に言う語は指しません。同じ文書がコード(`tidyq check` やコードの区画)にも書いた語も、その文書の名前なので指しません。検索の語の後に * を付けた形(vaccin*)と、それと同じ行に並べた検索の語も、語ではないので指しません。文書がほかの語尾で使う語(rightsize と rightsized)、引用符や括弧の中に一語だけ書いた語("mailto"、(jchaplin))、文書が URL にも書いた語、他の言語の語の隣の語(bête noire)、角括弧や括弧の字を続けた語(handl[e]、neuro(a)typicality)、= の前の変数の名(nboot=2,000)、四字以上の辞書の語二つを続けた語(crowdwork)、薬の国際一般名の語幹で終わる語(paroxetine の -oxetine)、版の番号の前の語(golang 1.21.5)、誌の巻と号の前の語(Biochemia medica 22 (3) の medica)、辞書に無い別の語と一字だけ違う語(pthread と bthread
|
|
51
|
-
en: Words with a capital letter, words shorter than four letters, words in code, URLs and email addresses, the rest of a word whose first letter is set apart by emphasis or brackets (lobally in **G**lobally, xpressions in [e]xpressions), words used twice or more in the document, words with no dictionary word one letter away, words listed under names in chaff.yaml, and the misspellings known-misspelling reports are not reported. Nor is a word the document also writes in code (`tidyq check`, a code block), since it is a name the document uses. Nor is a search stem ending in a wildcard (vaccin*), or any search term on the same line. Nor is a word the document uses with another ending (rightsize and rightsized), a word alone in quotes or brackets ("mailto", (jchaplin)), a word the document also writes in a URL, a word beside a word of another language (bête noire), a word joined to a bracketed letter (handl[e], neuro(a)typicality), a variable name before = (nboot=2,000), two dictionary words of four letters or more written as one (crowdwork), a word ending in the stem of a drug's international name (-oxetine in paroxetine), a word before a release number (golang 1.21.5), a word before a journal's volume and issue (medica in Biochemia medica 22 (3)),
|
|
50
|
+
ja: 大文字を含む語、四字より短い語、コード・URL・メールアドレスの中の語、強調や角括弧で頭の字を分けた語の残り(**G**lobally の lobally、[e]xpressions の xpressions)、文書で二度以上使う語、一字違いの辞書の語が無い語、chaff.yaml の names に並べた語、語彙表 known-misspelling が別に言う語は指しません。同じ文書がコード(`tidyq check` やコードの区画)にも書いた語も、その文書の名前なので指しません。検索の語の後に * を付けた形(vaccin*)と、それと同じ行に並べた検索の語も、語ではないので指しません。文書がほかの語尾で使う語(rightsize と rightsized)、引用符や括弧の中に一語だけ書いた語("mailto"、(jchaplin))、文書が URL にも書いた語、他の言語の語の隣の語(bête noire)、角括弧や括弧の字を続けた語(handl[e]、neuro(a)typicality)、= の前の変数の名(nboot=2,000)、四字以上の辞書の語二つを続けた語(crowdwork)、薬の国際一般名の語幹で終わる語(paroxetine の -oxetine)、版の番号の前の語(golang 1.21.5)、誌の巻と号の前の語(Biochemia medica 22 (3) の medica)、辞書に無い別の語と一字だけ違う語(pthread と bthread、同じ作りの名前)、辞書が -nse と書く語を -nce と書いた古い綴りやイギリスの綴り(recompence、expence)も指しません。
|
|
51
|
+
en: Words with a capital letter, words shorter than four letters, words in code, URLs and email addresses, the rest of a word whose first letter is set apart by emphasis or brackets (lobally in **G**lobally, xpressions in [e]xpressions), words used twice or more in the document, words with no dictionary word one letter away, words listed under names in chaff.yaml, and the misspellings known-misspelling reports are not reported. Nor is a word the document also writes in code (`tidyq check`, a code block), since it is a name the document uses. Nor is a search stem ending in a wildcard (vaccin*), or any search term on the same line. Nor is a word the document uses with another ending (rightsize and rightsized), a word alone in quotes or brackets ("mailto", (jchaplin)), a word the document also writes in a URL, a word beside a word of another language (bête noire), a word joined to a bracketed letter (handl[e], neuro(a)typicality), a variable name before = (nboot=2,000), two dictionary words of four letters or more written as one (crowdwork), a word ending in the stem of a drug's international name (-oxetine in paroxetine), a word before a release number (golang 1.21.5), a word before a journal's volume and issue (medica in Biochemia medica 22 (3)), a word one letter from another word of the document the dictionary does not know either (pthread and bthread, names on one scheme), or an older or British -nce spelling of a word the dictionary spells -nse (recompence, expence).
|
|
52
52
|
rewrite:
|
|
53
53
|
depth: light
|
|
54
54
|
en:
|
|
@@ -30,6 +30,8 @@ placeholders:
|
|
|
30
30
|
levels: { strict: warning, normal: info, relaxed: info }
|
|
31
31
|
|
|
32
32
|
use_for: [business, technical, blog, legal, docs, academic, literature, speech]
|
|
33
|
+
off_for:
|
|
34
|
+
docs/glossary: "A glossary defines its terms for other documents to use: a term it never uses again is its purpose, not a leftover."
|
|
33
35
|
|
|
34
36
|
group: structure
|
|
35
37
|
summary:
|
|
@@ -48,8 +50,8 @@ example:
|
|
|
48
50
|
"Service" means the booking website we run. Users may use the Service free of charge.
|
|
49
51
|
|
|
50
52
|
not_flagged:
|
|
51
|
-
ja: 定義の書き方(「X」とは、以下「X」という、規約やポリシーの以下「X」といいます)で書いた語だけを見ます。複数形と所有の形(Services、Seller's
|
|
52
|
-
en: Only terms defined in a recognised form ("X" means, (the "X")) are checked. Plurals and possessives (Services, Seller's) count as uses, and so does the term in a heading. A phrase of a gerund and its object (Exercising your options) is also used where its verb is written in another form (exercise your options). A second definition of the same term is duplicate-definition's to report. A term defined for a unit of a code the document sits in ("For the purpose of this subchapter—") is not checked when the document has no heading for that unit, because the unit's other sections use it.
|
|
53
|
+
ja: 定義の書き方(「X」とは、以下「X」という、規約やポリシーの以下「X」といいます)で書いた語だけを見ます。複数形と所有の形(Services、Seller's)と、見出しの中の語も使用に数えます。語の間が続いた空白や改行で割れた所(Normal Business Hours)も使用です。英語の動名詞と目的語の句(Exercising your options)は、動詞のほかの形で書いた所(exercise your options)も使用に数えます。同じ語の二つ目の定義は duplicate-definition が言います。用語集は、ほかの文書が使う語を定義するので見ません。引用した意味を means の後ろに書いた所("necessary" means "needful")は、語の意味を論じた言い換えで、定義と読みません。法典の一つの条だけの文書で、自分の入っている編・章(「For the purpose of this subchapter」)のために定義した語は、文書にその編・章の見出しが無ければ見ません。その編・章のほかの条が使います。
|
|
54
|
+
en: Only terms defined in a recognised form ("X" means, (the "X")) are checked. Plurals and possessives (Services, Seller's) count as uses, and so does the term in a heading or with its words split by a run of spaces or a line break. A phrase of a gerund and its object (Exercising your options) is also used where its verb is written in another form (exercise your options). A second definition of the same term is duplicate-definition's to report. A glossary is not checked, since it defines terms for other documents. A quoted meaning after means ("necessary" means "needful") glosses a word in an argument about it and is not read as a definition. A term defined for a unit of a code the document sits in ("For the purpose of this subchapter—") is not checked when the document has no heading for that unit, because the unit's other sections use it.
|
|
53
55
|
rewrite:
|
|
54
56
|
depth: light
|
|
55
57
|
ja:
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Token } from "./plugin.ts";
|
|
2
|
+
|
|
3
|
+
const touches = (left: Token | undefined, right: Token | undefined): boolean => left !== undefined && right !== undefined && left.span.end === right.span.start;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 前の語と組んで一つの名前になる語(敬って呼ぶ語の皆様、置き場所を言う語の下)の直前の助詞で、組んだ名前がさらに同じ助詞で次の語に
|
|
7
|
+
* 係るもの。「国民の皆様の期待」の「国民の皆様」、「ラックの下の段」の「ラックの下」は一つの名前として次の語に係り、その中の「の」は
|
|
8
|
+
* 入れ子を深くしない。組んだ語で連なりが終わるとき(それ以外の全てのVim使いの皆様が)は、連なりの頭の語なので数える。
|
|
9
|
+
* particles は数える助詞(の)、words は組む語(皆様、下)。
|
|
10
|
+
*/
|
|
11
|
+
export const boundWordParticles = (tokens: readonly Token[], particles: readonly string[], words: readonly string[]): ReadonlySet<Token> =>
|
|
12
|
+
new Set(
|
|
13
|
+
tokens.filter((token, at) => {
|
|
14
|
+
const [word, after] = [tokens[at + 1], tokens[at + 2]];
|
|
15
|
+
return (
|
|
16
|
+
particles.includes(token.surface) &&
|
|
17
|
+
words.includes(word?.surface ?? "") &&
|
|
18
|
+
touches(token, word) &&
|
|
19
|
+
touches(word, after) &&
|
|
20
|
+
particles.includes(after?.surface ?? "")
|
|
21
|
+
);
|
|
22
|
+
}),
|
|
23
|
+
);
|
package/src/derived/stays.ts
CHANGED
|
@@ -94,8 +94,11 @@ export const nightsDaysPairs = (
|
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
/** 日数が泊数より一つ多くない組。 */
|
|
97
|
+
/** 「43 days and 43 nights」: 日数を先に書いて泊数と同じ数なら、昼も夜もずっとの意味で、泊まりの数ではない。 */
|
|
98
|
+
const isDayAndNight = (pair: { nights: Count; days: Count }): boolean => pair.days.start < pair.nights.start && pair.days.amount === pair.nights.amount;
|
|
99
|
+
|
|
97
100
|
export const nightsDaysMismatches = (pairs: readonly { nights: Count; days: Count }[]): NightsDaysMismatch[] =>
|
|
98
|
-
pairs.flatMap((pair) => (pair.days.amount === pair.nights.amount + 1 ? [] : [{ ...pair, expected: pair.nights.amount + 1 }]));
|
|
101
|
+
pairs.flatMap((pair) => (pair.days.amount === pair.nights.amount + 1 || isDayAndNight(pair) ? [] : [{ ...pair, expected: pair.nights.amount + 1 }]));
|
|
99
102
|
|
|
100
103
|
const keyOf = (text: string): string => withoutEdgeMarks(text).normalize("NFKC").toLowerCase().replace(/\s+/gu, " ");
|
|
101
104
|
|
|
@@ -7,20 +7,25 @@ import { isWithinAny, QUOTATION_MARKS, quotedIn } from "../quoted-span.ts";
|
|
|
7
7
|
import { entryRanges } from "./lexicon-match.ts";
|
|
8
8
|
import { obligationsOf } from "./modal-conflict.ts";
|
|
9
9
|
import { quoteAt } from "./structure-tree.ts";
|
|
10
|
+
import { isNegation, negationWords } from "../structure/negated-act.ts";
|
|
10
11
|
|
|
11
12
|
const REQUIRING: ReadonlySet<string> = new Set(["must", "must-not"]);
|
|
12
13
|
|
|
13
14
|
type Hit = { readonly word: string; readonly span: Span };
|
|
14
15
|
|
|
15
|
-
/**
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Where the lexicon's words stand in the sentence, outside quotations, in reading order. Needs the sentence's tokens. A word
|
|
18
|
+
* right after a negation ("not always") admits exceptions instead of ruling them out, and is left out.
|
|
19
|
+
*/
|
|
20
|
+
const hitsIn = (sentence: Sentence, lexicon: Lexicon, quoted: readonly Span[], negations: ReadonlySet<string> = new Set()): Hit[] => {
|
|
17
21
|
const tokens = sentence.tokens ?? [];
|
|
18
22
|
return lexicon
|
|
19
23
|
.flatMap((entry) =>
|
|
20
24
|
entryRanges(sentence, entry).flatMap((range) => {
|
|
21
25
|
const first = tokens[range.start];
|
|
22
26
|
const last = tokens[range.end - 1];
|
|
23
|
-
|
|
27
|
+
const previous = tokens[range.start - 1];
|
|
28
|
+
if (first === undefined || last === undefined || (previous !== undefined && isNegation(previous, negations))) return [];
|
|
24
29
|
const span = { start: first.span.start, end: last.span.end };
|
|
25
30
|
return isWithinAny(quoted, span) ? [] : [{ word: entry.pattern, span }];
|
|
26
31
|
}),
|
|
@@ -48,12 +53,12 @@ const innermost = (spans: readonly Span[], offset: number): Span | undefined =>
|
|
|
48
53
|
const unitAt = (units: Units, offset: number): number =>
|
|
49
54
|
[units.articles, units.lists, units.paragraphs].map((spans) => innermost(spans, offset)).find((span) => span !== undefined)?.start ?? offset;
|
|
50
55
|
|
|
51
|
-
type Words = { readonly absolute: Lexicon; readonly exception: Lexicon; readonly lightVerbs: ReadonlySet<string> };
|
|
56
|
+
type Words = { readonly absolute: Lexicon; readonly exception: Lexicon; readonly lightVerbs: ReadonlySet<string>; readonly negations: ReadonlySet<string> };
|
|
52
57
|
|
|
53
58
|
/** The sentence read for the rule, or nothing when it holds neither word. Only such sentences pay for the unit and the markers. */
|
|
54
59
|
const statementOf = (sentence: Sentence, obligations: readonly Obligation[], words: Words, units: Units): Statement | undefined => {
|
|
55
60
|
const quoted = quotedIn(sentence, QUOTATION_MARKS);
|
|
56
|
-
const absolute = hitsIn(sentence, words.absolute, quoted);
|
|
61
|
+
const absolute = hitsIn(sentence, words.absolute, quoted, words.negations);
|
|
57
62
|
const exception = hitsIn(sentence, words.exception, quoted);
|
|
58
63
|
const tokens = sentence.tokens;
|
|
59
64
|
if ((absolute.length === 0 && exception.length === 0) || tokens === undefined) return undefined;
|
|
@@ -79,6 +84,7 @@ export const absoluteException: Detector = (doc, options): Finding[] => {
|
|
|
79
84
|
absolute: options.lexicon ?? [],
|
|
80
85
|
exception: doc.lexicons["exception-marker"] ?? [],
|
|
81
86
|
lightVerbs: new Set((doc.lexicons["light-verb"] ?? []).map((entry) => entry.pattern.toLowerCase())),
|
|
87
|
+
negations: negationWords(doc.lexicons["negation-word"]),
|
|
82
88
|
};
|
|
83
89
|
const obligations = obligationsOf(doc.structure);
|
|
84
90
|
const units = unitsOf(doc, doc.structure);
|
|
@@ -24,6 +24,8 @@ export type AgreementLists = {
|
|
|
24
24
|
readonly misnumbered: Lexicon;
|
|
25
25
|
/** 冠詞の後ろに立たない限定詞(some / the)。 */
|
|
26
26
|
readonly afterArticle: ReadonlySet<string>;
|
|
27
|
+
/** 名詞句を目的語に取る前置詞(on / of)。この後ろの this / these は主語にならない。 */
|
|
28
|
+
readonly prepositions?: ReadonlySet<string>;
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
export type Slip = { readonly variant: "number" | "possessive" | "determiner"; readonly first: Token; readonly last: Token; readonly word: string };
|
|
@@ -75,9 +77,15 @@ const isNamePart = (tokens: readonly Token[], at: number): boolean => UPPER_STAR
|
|
|
75
77
|
|
|
76
78
|
const isModifier = (token: Token): boolean => token.pos === "ADJ" || token.pos === "ADV" || (token.pos === "VERB" && isParticiple(token));
|
|
77
79
|
|
|
78
|
-
/**
|
|
79
|
-
const
|
|
80
|
-
|
|
80
|
+
/** 活用した動詞の形(flagged)。限定詞が主語になれない所では、名詞の前の分詞としか読めない。 */
|
|
81
|
+
const isInflectedVerb = (token: Token): boolean => token.pos === "VERB" && token.lemma !== undefined && token.lemma.toLowerCase() !== lower(token);
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* 限定詞の後ろの修飾語。数の形容詞(a few days)が挟まれば、単数の限定詞でも複数を数えるので undefined。
|
|
85
|
+
* bound は限定詞が前置詞の目的語の頭にあること。そこでは活用した動詞の形も修飾語(on these flagged post)。
|
|
86
|
+
*/
|
|
87
|
+
const modifiersAfter = (tokens: readonly Token[], from: number, count: ReadonlySet<string>, bound: boolean): readonly Token[] | undefined => {
|
|
88
|
+
const end = tokens.findIndex((token, index) => index >= from && !isModifier(token) && !(bound && isInflectedVerb(token)));
|
|
81
89
|
const modifiers = tokens.slice(from, end === -1 ? tokens.length : end);
|
|
82
90
|
return modifiers.some((token) => count.has(lower(token))) ? undefined : modifiers;
|
|
83
91
|
};
|
|
@@ -106,8 +114,14 @@ const determinerAt = (tokens: readonly Token[], at: number, lists: AgreementList
|
|
|
106
114
|
*/
|
|
107
115
|
const standsAlone = (determiner: Determiner): boolean => determiner.length === 1 && !isArticle(determiner.head);
|
|
108
116
|
|
|
109
|
-
const readsAsDeterminer = (determiner: Determiner, modifiers: readonly Token[]): boolean =>
|
|
110
|
-
!standsAlone(determiner) || modifiers.some((token) => token.pos === "ADJ");
|
|
117
|
+
const readsAsDeterminer = (determiner: Determiner, modifiers: readonly Token[], bound: boolean): boolean =>
|
|
118
|
+
!standsAlone(determiner) || (bound && modifiers.length > 0) || modifiers.some((token) => token.pos === "ADJ");
|
|
119
|
+
|
|
120
|
+
/** 限定詞が前置詞のすぐ後ろにあるか(on these)。前置詞の目的語の頭は主語にならないので、後ろの語は動詞ではない。 */
|
|
121
|
+
const followsPreposition = (tokens: readonly Token[], at: number, prepositions: ReadonlySet<string> | undefined): boolean => {
|
|
122
|
+
const before = tokens[at - 1];
|
|
123
|
+
return before !== undefined && (prepositions?.has(lower(before)) ?? false);
|
|
124
|
+
};
|
|
111
125
|
|
|
112
126
|
const mayBeNoun = (token: Token): boolean => token.features?.["AlsoNoun"] === "Yes" || isGuessed(token);
|
|
113
127
|
|
|
@@ -116,8 +130,17 @@ const mayBeNoun = (token: Token): boolean => token.features?.["AlsoNoun"] === "Y
|
|
|
116
130
|
* an individual works(individual は名詞にもなる)/ Those responsible report to the board(those は代名詞にもなる)。
|
|
117
131
|
* 後ろが is / has なら、名詞は動詞ではない(these key result is)。
|
|
118
132
|
*/
|
|
119
|
-
const mayBeVerb = (
|
|
120
|
-
|
|
133
|
+
const mayBeVerb = (
|
|
134
|
+
determiner: Determiner,
|
|
135
|
+
modifiers: readonly Token[],
|
|
136
|
+
noun: Token,
|
|
137
|
+
next: Token | undefined,
|
|
138
|
+
finite: ReadonlySet<string>,
|
|
139
|
+
bound: boolean,
|
|
140
|
+
): boolean =>
|
|
141
|
+
noun.features?.["AlsoVerb"] === "Yes" &&
|
|
142
|
+
!(next !== undefined && finite.has(lower(next))) &&
|
|
143
|
+
((standsAlone(determiner) && !bound) || modifiers.some(mayBeNoun));
|
|
121
144
|
|
|
122
145
|
/** 冠詞は名詞句の頭に立つ。形容詞や数の後ろの a は、記号の名前(the eight 3-hourly a indices)。 */
|
|
123
146
|
const AFTER_MODIFIER = new Set(["ADJ", "NUM"]);
|
|
@@ -128,14 +151,15 @@ const isLetterName = (tokens: readonly Token[], at: number, determiner: Determin
|
|
|
128
151
|
const numberSlipAt = (source: string, tokens: readonly Token[], at: number, lists: AgreementLists): Slip | undefined => {
|
|
129
152
|
const determiner = determinerAt(tokens, at, lists);
|
|
130
153
|
if (determiner === undefined || isNamePart(tokens, at) || isLetterName(tokens, at, determiner)) return undefined;
|
|
131
|
-
const
|
|
132
|
-
|
|
154
|
+
const bound = standsAlone(determiner) && followsPreposition(tokens, at, lists.prepositions);
|
|
155
|
+
const modifiers = modifiersAfter(tokens, at + determiner.length, lists.count, bound);
|
|
156
|
+
if (modifiers === undefined || !readsAsDeterminer(determiner, modifiers, bound)) return undefined;
|
|
133
157
|
const nounAt = at + determiner.length + modifiers.length;
|
|
134
158
|
const noun = tokens[nounAt];
|
|
135
159
|
if (!isCommonNoun(noun) || !hasOneNumber(noun, lists.invariant) || isPlural(noun) === determiner.plural) return undefined;
|
|
136
160
|
// A file name or a path (a quotes.json, a docs/ folder) is spelled as it must be, not counted.
|
|
137
161
|
if (isPartOfAddress(source, noun.span.start, noun.span.end)) return undefined;
|
|
138
|
-
if (mayBeVerb(determiner, modifiers, noun, tokens[nounAt + 1], lists.finite)) return undefined;
|
|
162
|
+
if (mayBeVerb(determiner, modifiers, noun, tokens[nounAt + 1], lists.finite, bound)) return undefined;
|
|
139
163
|
const span = tokens.slice(at, nounAt + 1);
|
|
140
164
|
if (!endsNounPhrase(tokens[nounAt + 1], lists.finite) || !joinedBySpace(source, span) || isPartOfLongerWord(source, determiner.head, noun)) return undefined;
|
|
141
165
|
return slipOf("number", source, determiner.head, noun);
|
|
@@ -211,6 +235,7 @@ const listsOf = (lexicons: Readonly<Record<string, Lexicon>>): AgreementLists =>
|
|
|
211
235
|
finite: setOf(lexicons["finite-auxiliary"]),
|
|
212
236
|
misnumbered: lexicons["misnumbered-phrase"] ?? [],
|
|
213
237
|
afterArticle: setOf(lexicons["determiner-after-article"]),
|
|
238
|
+
prepositions: setOf(lexicons["object-preposition"]),
|
|
214
239
|
});
|
|
215
240
|
|
|
216
241
|
export const agreementSlip: Detector = (doc): Finding[] => {
|