chaffjs 0.47.0 → 0.49.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 +1 -0
- package/README.md +1 -0
- package/dist/bound-word-particles.d.ts +1 -0
- package/dist/bound-word-particles.d.ts.map +1 -1
- package/dist/bound-word-particles.js +1 -1
- package/dist/bound-word-particles.js.map +1 -1
- package/dist/clause-particles.d.ts +11 -0
- package/dist/clause-particles.d.ts.map +1 -0
- package/dist/clause-particles.js +20 -0
- package/dist/clause-particles.js.map +1 -0
- package/dist/detectors/acronym-definition.d.ts.map +1 -1
- package/dist/detectors/acronym-definition.js +14 -6
- package/dist/detectors/acronym-definition.js.map +1 -1
- package/dist/detectors/acronym-expansion.d.ts +2 -0
- package/dist/detectors/acronym-expansion.d.ts.map +1 -1
- package/dist/detectors/acronym-expansion.js +18 -7
- package/dist/detectors/acronym-expansion.js.map +1 -1
- package/dist/detectors/acronym-mention.d.ts.map +1 -1
- package/dist/detectors/acronym-mention.js +3 -1
- package/dist/detectors/acronym-mention.js.map +1 -1
- package/dist/detectors/acronym-name.d.ts +2 -2
- package/dist/detectors/acronym-name.d.ts.map +1 -1
- package/dist/detectors/acronym-name.js +3 -3
- package/dist/detectors/acronym-name.js.map +1 -1
- package/dist/detectors/acronym-parent-item.d.ts +6 -0
- package/dist/detectors/acronym-parent-item.d.ts.map +1 -0
- package/dist/detectors/acronym-parent-item.js +50 -0
- package/dist/detectors/acronym-parent-item.js.map +1 -0
- package/dist/detectors/broken-link.d.ts.map +1 -1
- package/dist/detectors/broken-link.js +14 -0
- package/dist/detectors/broken-link.js.map +1 -1
- package/dist/detectors/char-shape.d.ts.map +1 -1
- package/dist/detectors/char-shape.js +11 -4
- package/dist/detectors/char-shape.js.map +1 -1
- package/dist/detectors/citation-sentence.d.ts +8 -0
- package/dist/detectors/citation-sentence.d.ts.map +1 -1
- package/dist/detectors/citation-sentence.js +24 -0
- package/dist/detectors/citation-sentence.js.map +1 -1
- package/dist/detectors/concrete-evidence-density.d.ts.map +1 -1
- package/dist/detectors/concrete-evidence-density.js +13 -6
- package/dist/detectors/concrete-evidence-density.js.map +1 -1
- package/dist/detectors/concrete-evidence.d.ts +14 -1
- package/dist/detectors/concrete-evidence.d.ts.map +1 -1
- package/dist/detectors/concrete-evidence.js +65 -0
- package/dist/detectors/concrete-evidence.js.map +1 -1
- package/dist/detectors/doubled-punctuation.d.ts.map +1 -1
- package/dist/detectors/doubled-punctuation.js +14 -4
- package/dist/detectors/doubled-punctuation.js.map +1 -1
- package/dist/detectors/en-shape.d.ts +1 -0
- package/dist/detectors/en-shape.d.ts.map +1 -1
- package/dist/detectors/en-shape.js +15 -6
- package/dist/detectors/en-shape.js.map +1 -1
- package/dist/detectors/kanji-name-edge.d.ts +10 -0
- package/dist/detectors/kanji-name-edge.d.ts.map +1 -1
- package/dist/detectors/kanji-name-edge.js +23 -0
- package/dist/detectors/kanji-name-edge.js.map +1 -1
- package/dist/detectors/law-governed.d.ts +10 -0
- package/dist/detectors/law-governed.d.ts.map +1 -0
- package/dist/detectors/law-governed.js +41 -0
- package/dist/detectors/law-governed.js.map +1 -0
- package/dist/detectors/name-variant-two-things.d.ts +2 -1
- package/dist/detectors/name-variant-two-things.d.ts.map +1 -1
- package/dist/detectors/name-variant-two-things.js +21 -3
- package/dist/detectors/name-variant-two-things.js.map +1 -1
- package/dist/detectors/open-end-names.d.ts +7 -2
- package/dist/detectors/open-end-names.d.ts.map +1 -1
- package/dist/detectors/open-end-names.js +14 -4
- package/dist/detectors/open-end-names.js.map +1 -1
- package/dist/detectors/reference-entry.d.ts.map +1 -1
- package/dist/detectors/reference-entry.js +35 -5
- package/dist/detectors/reference-entry.js.map +1 -1
- package/dist/detectors/register-set-apart.d.ts +1 -1
- package/dist/detectors/register-set-apart.js +4 -4
- package/dist/detectors/register-set-apart.js.map +1 -1
- package/dist/detectors/register-voice.d.ts +5 -0
- package/dist/detectors/register-voice.d.ts.map +1 -1
- package/dist/detectors/register-voice.js +17 -0
- package/dist/detectors/register-voice.js.map +1 -1
- package/dist/detectors/requirement-smell.d.ts.map +1 -1
- package/dist/detectors/requirement-smell.js +6 -2
- package/dist/detectors/requirement-smell.js.map +1 -1
- package/dist/detectors/sentence-counts.d.ts.map +1 -1
- package/dist/detectors/sentence-counts.js +2 -1
- package/dist/detectors/sentence-counts.js.map +1 -1
- package/dist/detectors/sentence-ending.d.ts +2 -2
- package/dist/detectors/sentence-ending.d.ts.map +1 -1
- package/dist/detectors/sentence-ending.js +3 -1
- 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 +7 -6
- package/dist/detectors/sentence-length.js.map +1 -1
- package/dist/detectors/sentence-parts.d.ts +8 -3
- package/dist/detectors/sentence-parts.d.ts.map +1 -1
- package/dist/detectors/sentence-parts.js +25 -7
- package/dist/detectors/sentence-parts.js.map +1 -1
- package/dist/detectors/signals.d.ts.map +1 -1
- package/dist/detectors/signals.js +3 -0
- package/dist/detectors/signals.js.map +1 -1
- package/dist/detectors/space-before-punctuation.js +3 -3
- package/dist/detectors/space-before-punctuation.js.map +1 -1
- package/dist/detectors/speaker-turns.d.ts +4 -0
- package/dist/detectors/speaker-turns.d.ts.map +1 -0
- package/dist/detectors/speaker-turns.js +28 -0
- package/dist/detectors/speaker-turns.js.map +1 -0
- package/dist/detectors/token-shape.d.ts.map +1 -1
- package/dist/detectors/token-shape.js +21 -5
- package/dist/detectors/token-shape.js.map +1 -1
- package/dist/detectors/topic-predicate-distance.d.ts.map +1 -1
- package/dist/detectors/topic-predicate-distance.js +3 -1
- package/dist/detectors/topic-predicate-distance.js.map +1 -1
- package/dist/detectors/unbalanced-bracket.d.ts.map +1 -1
- package/dist/detectors/unbalanced-bracket.js +31 -6
- package/dist/detectors/unbalanced-bracket.js.map +1 -1
- package/dist/detectors/vague-density.d.ts +4 -2
- package/dist/detectors/vague-density.d.ts.map +1 -1
- package/dist/detectors/vague-density.js +17 -9
- package/dist/detectors/vague-density.js.map +1 -1
- package/dist/document.js +2 -2
- package/dist/document.js.map +1 -1
- package/dist/name-variant-shapes.d.ts +32 -0
- package/dist/name-variant-shapes.d.ts.map +1 -1
- package/dist/name-variant-shapes.js +87 -0
- package/dist/name-variant-shapes.js.map +1 -1
- package/dist/paragraph-length.d.ts.map +1 -1
- package/dist/paragraph-length.js +5 -6
- package/dist/paragraph-length.js.map +1 -1
- package/dist/sentence-load.d.ts.map +1 -1
- package/dist/sentence-load.js +20 -6
- package/dist/sentence-load.js.map +1 -1
- package/dist/set-phrase-particles.js +2 -2
- package/dist/set-phrase-particles.js.map +1 -1
- package/dist/structure/definition-use.d.ts.map +1 -1
- package/dist/structure/definition-use.js +13 -0
- package/dist/structure/definition-use.js.map +1 -1
- package/dist/structure/universal.d.ts.map +1 -1
- package/dist/structure/universal.js +9 -1
- package/dist/structure/universal.js.map +1 -1
- package/dist/structure/unread-label.d.ts.map +1 -1
- package/dist/structure/unread-label.js +3 -1
- package/dist/structure/unread-label.js.map +1 -1
- package/dist/topic-clause.d.ts +2 -0
- package/dist/topic-clause.d.ts.map +1 -1
- package/dist/topic-clause.js +12 -5
- package/dist/topic-clause.js.map +1 -1
- package/package.json +3 -3
- package/rules/adverb-overuse.yaml +2 -2
- package/rules/bracket-nesting.yaml +2 -2
- package/rules/broken-link.yaml +2 -2
- package/rules/concrete-evidence-density.yaml +2 -2
- package/rules/doubled-punctuation.yaml +2 -2
- package/rules/expletive-construction.yaml +2 -2
- package/rules/max-kanji-continuous.yaml +5 -3
- package/rules/max-sentence-length.yaml +2 -2
- package/rules/name-variant.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/orthographic-variant.yaml +2 -2
- package/rules/requirement-smell.yaml +2 -2
- package/rules/space-before-punctuation.yaml +4 -4
- package/rules/taigen-dome-in-prose.yaml +2 -2
- package/rules/topic-predicate-distance.yaml +3 -3
- package/rules/unbalanced-bracket.yaml +4 -4
- package/rules/undefined-acronym.yaml +4 -2
- package/rules/vague-word-density.yaml +2 -2
- package/skills/chaff/SKILL.md +3 -1
- package/src/bound-word-particles.ts +2 -1
- package/src/clause-particles.ts +35 -0
- package/src/detectors/acronym-definition.ts +14 -6
- package/src/detectors/acronym-expansion.ts +26 -7
- package/src/detectors/acronym-mention.ts +6 -1
- package/src/detectors/acronym-name.ts +6 -3
- package/src/detectors/acronym-parent-item.ts +60 -0
- package/src/detectors/broken-link.ts +16 -0
- package/src/detectors/char-shape.ts +18 -3
- package/src/detectors/citation-sentence.ts +30 -0
- package/src/detectors/concrete-evidence-density.ts +18 -7
- package/src/detectors/concrete-evidence.ts +83 -1
- package/src/detectors/doubled-punctuation.ts +20 -4
- package/src/detectors/en-shape.ts +18 -9
- package/src/detectors/kanji-name-edge.ts +27 -0
- package/src/detectors/law-governed.ts +50 -0
- package/src/detectors/name-variant-two-things.ts +43 -3
- package/src/detectors/open-end-names.ts +21 -4
- package/src/detectors/reference-entry.ts +36 -6
- package/src/detectors/register-set-apart.ts +4 -4
- package/src/detectors/register-voice.ts +19 -0
- package/src/detectors/requirement-smell.ts +6 -2
- package/src/detectors/sentence-counts.ts +2 -1
- package/src/detectors/sentence-ending.ts +8 -4
- package/src/detectors/sentence-length.ts +10 -8
- package/src/detectors/sentence-parts.ts +33 -9
- package/src/detectors/signals.ts +3 -0
- package/src/detectors/space-before-punctuation.ts +3 -3
- package/src/detectors/speaker-turns.ts +37 -0
- package/src/detectors/token-shape.ts +27 -7
- package/src/detectors/topic-predicate-distance.ts +3 -1
- package/src/detectors/unbalanced-bracket.ts +39 -7
- package/src/detectors/vague-density.ts +25 -10
- package/src/document.ts +2 -2
- package/src/name-variant-shapes.ts +103 -0
- package/src/paragraph-length.ts +8 -9
- package/src/sentence-load.ts +29 -6
- package/src/set-phrase-particles.ts +2 -2
- package/src/structure/definition-use.ts +15 -0
- package/src/structure/universal.ts +10 -1
- package/src/structure/unread-label.ts +3 -1
- package/src/topic-clause.ts +19 -5
|
@@ -16,6 +16,7 @@ extra_word_lists:
|
|
|
16
16
|
declaration-particle,
|
|
17
17
|
declaration-ending,
|
|
18
18
|
takeup-opener,
|
|
19
|
+
address-particle,
|
|
19
20
|
quote-label,
|
|
20
21
|
interviewer-mark,
|
|
21
22
|
]
|
|
@@ -66,8 +67,8 @@ example:
|
|
|
66
67
|
新しい料金は来月から始まります。請求書の形式も変わります。支払いの期限は月末です。古い料金は三月で終わります。
|
|
67
68
|
|
|
68
69
|
not_flagged:
|
|
69
|
-
ja: どちらの調子が正しいかは決めません。多いほうに揃っていない、少ないほうの文だけを指します。文書の中で二つの調子が同じ数なら、揃える先の多いほうが無いので、どちらも指しません。本文と箇条書きは別々に数えます。箇条書きの中の少ないほうが文書全体では多いほうなら、その文は指しません。項目や段落の頭の太字の札(「- **速く書ける。** 説明です。」の「速く書ける。」)は見出しと同じく文に数えません。免責や変更の予告を書いた段落(「…ご了承ください。」)が、2 文以上すべて文書の多いほうと違う同じ調子でそろっているときも、本文とは別の決まり文句として数えません。読み手の相談や質問を載せる節(見出しが「【相談事例等】」「ご質問内容」)の文も、尋ねた人の言葉のままなので数えません。文書の最後に掲載先が付けた利用条件の断り書き(ライセンスの名前と条件の URL を書いた短い段落)も数えません。札を付けて引いた言葉(「例:」「Q:」で始まる文、「用例」だけの段落の下の段落)、「■ 調査目的」のような印付きの札の行の下の記入欄の値、〒や「電話:」の行がある問い合わせ先の段落、一つの文の中に「?」で並べて引いた問い(…一覧か?順序付きか?などです。)、一番上の見出し(#)が二つ以上ある文書で、その見出しの下の 2 文以上がみな文書の多いほうと違う同じ調子でそろった部分(通達の後ろに付いた、ページの説明)も数えません。見出しが無くても、文書の多いほうの最後の文より後ろの 2 文以上がみな違う同じ調子でそろい(その調子の文がそれより前に無く)、その間に調子を持たない行(「第1」のようなリンクの並び)を挟むときは、ページの後ろの注記として数えません。数えたうえで指さないのは、丁寧な形でしか言わない挨拶(お疲れ様でした。)と結びの頼み(承認をお願いします。)、相手への願い(信じてほしい。)、条件だけで問う文(…だったら?)、演説で主語を言わずに決意を言い切る文(戦争の惨禍を、二度と繰り返さない。)、演説でこれから成し遂げることを「〜を…ていく。」と言い切る文(現場の気づきを、幹部の皆さんが形にしていく。)、次の文が「そんな」「こんな」「これだけで」で受ける場面や行いの書き出し(PDF
|
|
70
|
-
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
|
|
70
|
+
ja: どちらの調子が正しいかは決めません。多いほうに揃っていない、少ないほうの文だけを指します。文書の中で二つの調子が同じ数なら、揃える先の多いほうが無いので、どちらも指しません。本文と箇条書きは別々に数えます。箇条書きの中の少ないほうが文書全体では多いほうなら、その文は指しません。項目や段落の頭の太字の札(「- **速く書ける。** 説明です。」の「速く書ける。」)は見出しと同じく文に数えません。免責や変更の予告を書いた段落(「…ご了承ください。」)が、2 文以上すべて文書の多いほうと違う同じ調子でそろっているときも、本文とは別の決まり文句として数えません。読み手の相談や質問を載せる節(見出しが「【相談事例等】」「ご質問内容」)の文も、尋ねた人の言葉のままなので数えません。文書の最後に掲載先が付けた利用条件の断り書き(ライセンスの名前と条件の URL を書いた短い段落)も数えません。札を付けて引いた言葉(「例:」「Q:」で始まる文、「用例」だけの段落の下の段落)、「■ 調査目的」のような印付きの札の行の下の記入欄の値、〒や「電話:」の行がある問い合わせ先の段落、一つの文の中に「?」で並べて引いた問い(…一覧か?順序付きか?などです。)、一番上の見出し(#)が二つ以上ある文書で、その見出しの下の 2 文以上がみな文書の多いほうと違う同じ調子でそろった部分(通達の後ろに付いた、ページの説明)も数えません。見出しが無くても、文書の多いほうの最後の文より後ろの 2 文以上がみな違う同じ調子でそろい(その調子の文がそれより前に無く)、その間に調子を持たない行(「第1」のようなリンクの並び)を挟むときは、ページの後ろの注記として数えません。数えたうえで指さないのは、丁寧な形でしか言わない挨拶(お疲れ様でした。)と結びの頼み(承認をお願いします。)、相手への願い(信じてほしい。)、条件だけで問う文(…だったら?)、演説で主語を言わずに決意を言い切る文(戦争の惨禍を、二度と繰り返さない。)、演説でこれから成し遂げることを「〜を…ていく。」と言い切る文(現場の気づきを、幹部の皆さんが形にしていく。)、次の文が「そんな」「こんな」「これだけで」で受ける場面や行いの書き出し(PDFが送れない。そんなときは…)、「!」で終わる叫び(わかるかっ!)、読み手に呼びかける終助詞「よ」「ね」「かな」で終わる文(…含まれているよ。…のかな?)、※や*で始まる行の注記、文で終わらない行の塊に前後を挟まれた表のセル(制限なし。)、インタビュー(見出しの節の半分以上が聞き手の「――」の問いで始まる文書)の答えの段落の文です。答えは話した言葉を書き起こしたもので、話し手は丁寧な文と常体の文を混ぜて話します。動画の題(末尾に再生時間を括弧で書いた見出し)の下の説明も、動画の言葉のままなので数えません。
|
|
71
|
+
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 sentence that closes with a particle addressing the reader, よ, ね or かな (…含まれているよ。…のかな?), a note on a line opening with ※ or *, a table cell set out between runs of lines that do not end as sentences (制限なし。), and the sentences of an interview's answers (in a document where at least half of the headed sections open with the interviewer's ―― question), since an answer is speech set down and a speaker mixes polite and plain sentences. Nor is the caption under a video's title (a heading ending with its running time in brackets), which is in the video's own words.
|
|
71
72
|
level_meaning:
|
|
72
73
|
ja: 少ないほうの調子の文が {limit} 文以下のとき、それを指摘
|
|
73
74
|
en: reported when the minority register has {limit} sentences or fewer
|
|
@@ -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: 読みが同じでも漢字の違う語(書く・描く)、補助動詞・形式名詞と本来の使い方の書き分け(見て下さい・資料を下さい)、書き分けが意味の違いになる語(成る・なる、言う・いう。法務のジャンルでは、法令の書き方で書き分ける 時・とき、物・もの、在る・ある も)、名詞と動詞(払込み・払い込む、申出・申し出る。辞書が名詞を動詞と読んでも)、二つの語に読める漢字の書き方(行っ は 行く とも 行う とも読み、「様を」の様は
|
|
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, イヤ as the word a child says to refuse) 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 title in brackets, Module Three (Processor to Sub-Processor)), 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: 読みが同じでも漢字の違う語(書く・描く)、補助動詞・形式名詞と本来の使い方の書き分け(見て下さい・資料を下さい)、書き分けが意味の違いになる語(成る・なる、言う・いう。法務のジャンルでは、法令の書き方で書き分ける 時・とき、物・もの、在る・ある も)、名詞と動詞(払込み・払い込む、申出・申し出る。辞書が名詞を動詞と読んでも)、二つの語に読める漢字の書き方(行っ は 行く とも 行う とも読み、「様を」の様は さま)、同じ読みのかなが別の語になる漢字の接尾語(日照山の山と お遍路さん、Ruby用の用と 言いよう)、語末の「ー」だけの違い(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、括弧に入れた題 Module Three (Processor to Sub-Processor))を書き方の違いにしません(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, イヤ as the word a child says to refuse) 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; the set phrases 〜ばよかった (if only I had) and よかったら (if you like) are compared apart from the adjective 良い; 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 title in brackets, Module Three (Processor to Sub-Processor)), 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. Nor is a kanji suffix whose kana reading is another word (the 山 of a temple name, 日照山, beside the honorific さん; the 用 of Ruby用 beside the よう of 言いよう).
|
|
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
|
|
@@ -74,5 +74,5 @@ example:
|
|
|
74
74
|
config: { genre: technical/spec }
|
|
75
75
|
|
|
76
76
|
not_flagged:
|
|
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. Nor is a Japanese 等 in a noun a heading of the document names (出願書類等 under 出願書類等の送付先), which is the page's subject rather than an open list.
|
|
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. Nor is a Japanese 等 in a noun a heading of the document names (出願書類等 under 出願書類等の送付先), which is the page's subject rather than an open list. Nor is a Japanese 等 in a term that law or usage fixes with it (消費税等, 免許等, from the lexicon), which is no open list.
|
|
@@ -10,8 +10,8 @@ name:
|
|
|
10
10
|
en: Space before punctuation
|
|
11
11
|
|
|
12
12
|
why:
|
|
13
|
-
ja: '英文では句読点を前の語に付けて書きます。「word .」「(word) ,」のように前に空白があると、行の折り返しで句読点だけが次の行の頭に落ちることがあり、書き換えの途中で残った空白に見えます。ピリオド・カンマ・セミコロン・疑問符・感嘆符を見ます。コロン("Note : ")、空白で区切った省略の点や目次の点線(". . ."
|
|
14
|
-
en: 'English attaches punctuation to the word before it. A space before it ("word .", "(word) ,") can leave the mark alone at the start of the next line, and reads as a space left over from an edit. Periods, commas, semicolons, question marks and exclamation marks are checked. A colon ("Note : "), dots spaced out as an ellipsis or a leader in a table of contents (". . ."), a dot that starts the next word (".NET", ".5"), a mark after a number ("[ 1 , N ]" in a formula), code and URLs are not counted, nor are two or more spaces before the mark (a line laid out like a table).'
|
|
13
|
+
ja: '英文では句読点を前の語に付けて書きます。「word .」「(word) ,」のように前に空白があると、行の折り返しで句読点だけが次の行の頭に落ちることがあり、書き換えの途中で残った空白に見えます。ピリオド・カンマ・セミコロン・疑問符・感嘆符を見ます。コロン("Note : ")、空白で区切った省略の点や目次の点線(". . ."、行の折り返しが点の間に入ったものも)、".NET" や ".5" のように次の語の頭の点、数の後ろ(式の "[ 1 , N ]")、コードと URL は数えません。前の空白が二つ以上の所(表のように並べた行)も数えません。'
|
|
14
|
+
en: 'English attaches punctuation to the word before it. A space before it ("word .", "(word) ,") can leave the mark alone at the start of the next line, and reads as a space left over from an edit. Periods, commas, semicolons, question marks and exclamation marks are checked. A colon ("Note : "), dots spaced out as an ellipsis or a leader in a table of contents (". . .", also when a line break falls between the dots), a dot that starts the next word (".NET", ".5"), a mark after a number ("[ 1 , N ]" in a formula), code and URLs are not counted, nor are two or more spaces before the mark (a line laid out like a table).'
|
|
15
15
|
|
|
16
16
|
message:
|
|
17
17
|
ja: 「{mark}」の前に空白があります
|
|
@@ -37,5 +37,5 @@ example:
|
|
|
37
37
|
The form is ready, and the office has a copy.
|
|
38
38
|
|
|
39
39
|
not_flagged:
|
|
40
|
-
ja: コロン、空白で区切った省略の点や目次の点線(「. .
|
|
41
|
-
en: Colons, dots spaced out as an ellipsis or a leader (". . ."), a dot that starts a word (".NET", ".5"), a mark after a number or after two or more spaces, code and URLs, and a comma after a capitalised field left empty in a reference list ("ISBN ,") are not reported.
|
|
40
|
+
ja: コロン、空白で区切った省略の点や目次の点線(「. . .」、点の間で行を折り返したものも)、「.NET」「.5」のような語の頭の点、数の後ろの句読点、二つ以上の空白の後ろの句読点、コードと URL、文献一覧で値の落ちた大文字の欄の後ろの読点(「ISBN ,」)は指しません。
|
|
41
|
+
en: Colons, dots spaced out as an ellipsis or a leader (". . .", even across a line break), a dot that starts a word (".NET", ".5"), a mark after a number or after two or more spaces, code and URLs, and a comma after a capitalised field left empty in a reference list ("ISBN ,") are not reported.
|
|
@@ -44,8 +44,8 @@ example:
|
|
|
44
44
|
今年の目標は売上の回復です。そのための施策は三つあります。最初に、店頭の品ぞろえを見直します。
|
|
45
45
|
|
|
46
46
|
not_flagged:
|
|
47
|
-
ja: 箇条書きの中の体言止めは、その書き方が普通なので数えません。段落の頭に (1)(2)(3) と順に番号を付け、URL や西暦の年で出典を書いた注や文献の一覧も、名前や題を並べた項目なので数えません。(注1
|
|
48
|
-
en: Noun endings in bullet lists, where the form is normal, are not counted. Nor are the entries of a list of notes or references written as paragraphs numbered (1), (2), (3) in order that cite sources (a URL or a year), which list names and titles. Nor are the paragraphs of a note to a table or a figure opened by its label ((注1), 注:), or the sentence right before a bullet list that hands the reader to it (以下のとおり説明。), which are written ending in a noun.
|
|
47
|
+
ja: 箇条書きの中の体言止めは、その書き方が普通なので数えません。段落の頭に (1)(2)(3) と順に番号を付け、URL や西暦の年で出典を書いた注や文献の一覧も、名前や題を並べた項目なので数えません。(注1)や「注:」で始まる表や図の注の段落と、箇条書きのすぐ前でそこへ渡す文(以下のとおり説明。)も、名詞で止めるのが書き方なので数えません。「どのような見直しが必要か。」のように問いの「か」で閉じた文は問いなので数えません。
|
|
48
|
+
en: Noun endings in bullet lists, where the form is normal, are not counted. Nor are the entries of a list of notes or references written as paragraphs numbered (1), (2), (3) in order that cite sources (a URL or a year), which list names and titles. Nor are the paragraphs of a note to a table or a figure opened by its label ((注1), 注:), or the sentence right before a bullet list that hands the reader to it (以下のとおり説明。), which are written ending in a noun. Nor is a question closed by the particle か (どのような見直しが必要か。).
|
|
49
49
|
level_meaning:
|
|
50
50
|
ja: 本文の体言止め {limit} 文まで
|
|
51
51
|
en: up to {limit} noun-ending sentences in the body
|
|
@@ -3,7 +3,7 @@ layer: L3
|
|
|
3
3
|
status: stable
|
|
4
4
|
how_to_find: topic-predicate-distance
|
|
5
5
|
requires: [pos]
|
|
6
|
-
extra_word_lists: [topic-clause-close, statute-article-opener]
|
|
6
|
+
extra_word_lists: [topic-clause-close, statute-article-opener, topic-adverb]
|
|
7
7
|
languages: [ja]
|
|
8
8
|
severity: info
|
|
9
9
|
|
|
@@ -45,8 +45,8 @@ example:
|
|
|
45
45
|
来週は、新しい担当者の紹介、先月から続く予算の見直し、春の本社移転の準備、秋の採用計画の確認、年末の懇親会の段取りを話し合います。そのため定例会議は二時間に延長します。
|
|
46
46
|
|
|
47
47
|
not_flagged:
|
|
48
|
-
ja:
|
|
49
|
-
en: Sentences with no topic (noun + は), quotations in 「」, and distances up to the limit are not counted. When the topic gets its own predicate in an earlier clause (〜ではありませんが, 〜であって; 〜ではなく, 〜であるため, 〜は〜で with no comma between, 〜であるならば, 〜にあるところ or 〜ており followed by a clause with its own subject; a passive report 〜だと言われているが; 〜ますが or 〜ましたが with no other subject between the topic and it, followed by a clause with a subject of its own (〜が) and then a new topic, or straight away by a name as a new topic that runs to the end (〜ましたが、赤澤大臣は…); 〜ことから, 〜つつ, 〜としても or 〜こととし with no other subject between the topic and it, from the topic-clause-close word list; a circled number (③) after a predicate, where a list run into one line starts its next item; a 〜のは topic that gets its copula inside a clause という makes a noun's content, when that noun phrase ends at a comma, as in 〜来てほしいのは日本であったという調査の結果、…), the count stops at that clause's end. A later clause's subject may be a part, as in 〜のほとんどは. When a は that sets the time or the case (今夜は, 当日は, 〜ときは) is followed by another topic, the count starts from that topic. An article of a statute that a document of another kind quotes as it stands (第7条 …, the forms in the statute-article-opener word list) is not the writer's sentence and is not counted. Not used on English documents.
|
|
48
|
+
ja: 主題(名詞+は)の無い文、鉤括弧で引いたものの中、上限までの距離は見ません。主題の述語が先の節で閉じる文(「この計画は簡単ではありませんが、…」「〜であって、…」、後ろの節に別の主語がある「〜ではなく、」「〜であるため、」、読点を挟まない「〜は〜で、」「〜であるならば、」「〜にあるところ、」「〜ており、」、受け身で伝える引用「〜だと言われているが」、主題と「〜ますが、」「〜ましたが、」(打ち消しの「〜ませんが、」「〜ませんでしたが、」も)の間に別の主語が無く、その後ろが別の主語(〜が)の節を経て新しい主題に移る文か、直後に名前の新しい主題(〜ましたが、赤澤大臣は…)が立って文末まで続く文、主題が行いを名詞にしたもの(〜することは差し控えますが、…)、主題からそこまでに別の主語が無い「〜ことから、」「〜つつ、」「〜としても、」「〜こととし、」(語は語彙表 topic-clause-close)、述語の後ろに丸数字の番号(③)が来て一行に詰まった箇条の次の項目が始まるところ、「〜のは」の主題が「という」で名詞に掛かる節の中で繋辞の述語を得て、その名詞句が読点で終わるところ(〜来てほしいのは日本であったという調査の結果、…))は、その節の終わりまでを数えます。後ろの節の主語には「〜のほとんどは」も数えます。副詞になる「は」(最後は=結局のところ。語は語彙表 topic-adverb)は主題と読みません。前に名詞や「の」が付けば(交渉の最後は)主題です。時や場面を言う「は」(今夜は、当日は、〜ときは)の後ろに別の主題があれば、その主題から数えます。法令でも契約でもない文書が条文をそのまま載せた文(「第7条 …」、形は語彙表 statute-article-opener)は、書き手が直せる文ではないので数えません。英語の文書には使いません。
|
|
49
|
+
en: Sentences with no topic (noun + は), quotations in 「」, and distances up to the limit are not counted. When the topic gets its own predicate in an earlier clause (〜ではありませんが, 〜であって; 〜ではなく, 〜であるため, 〜は〜で with no comma between, 〜であるならば, 〜にあるところ or 〜ており followed by a clause with its own subject; a passive report 〜だと言われているが; 〜ますが or 〜ましたが (or the negative 〜ませんが, 〜ませんでしたが) with no other subject between the topic and it, followed by a clause with a subject of its own (〜が) and then a new topic, or straight away by a name as a new topic that runs to the end (〜ましたが、赤澤大臣は…), or always when the topic is an act made a noun (〜することは差し控えますが、…); 〜ことから, 〜つつ, 〜としても or 〜こととし with no other subject between the topic and it, from the topic-clause-close word list; a circled number (③) after a predicate, where a list run into one line starts its next item; a 〜のは topic that gets its copula inside a clause という makes a noun's content, when that noun phrase ends at a comma, as in 〜来てほしいのは日本であったという調査の結果、…), the count stops at that clause's end. A later clause's subject may be a part, as in 〜のほとんどは. A は that makes an adverb of the noun before it (最後は, in the end; the words are in the topic-adverb word list) is not a topic; with a noun or の before it (交渉の最後は) it is. When a は that sets the time or the case (今夜は, 当日は, 〜ときは) is followed by another topic, the count starts from that topic. An article of a statute that a document of another kind quotes as it stands (第7条 …, the forms in the statute-article-opener word list) is not the writer's sentence and is not counted. Not used on English documents.
|
|
50
50
|
level_meaning:
|
|
51
51
|
ja: 主題から述語まで {limit} 字まで
|
|
52
52
|
en: up to {limit} characters between the topic and the predicate
|
|
@@ -9,8 +9,8 @@ name:
|
|
|
9
9
|
en: Unbalanced bracket
|
|
10
10
|
|
|
11
11
|
why:
|
|
12
|
-
ja: 閉じ忘れた「(」や、開きの無い「」」があると、読み手はどこまでが括弧の中なのか分からなくなります。全角の「(」を半角の「)」で閉じるのも、書き換えの途中で残った印です。見出しで区切った節ごとに、「」『』()()[][]【】〔〕〈〉《》“” と半角の 「」 の組を数えます。詩の連や長い引用は段落をまたぐので、段落を越えて組にします。行の頭や空白の後ろの「1)」「a)」「事例)」のような三文字までの番号の印と数の後ろの「)」、括弧の中の番号の印(「(…以下、事例5)まで同じ。)」の「事例5)」。同じ字の印を行の頭でも使っていて、同じ行の後ろの閉じで括弧が閉じるときに限る)、コードと URL
|
|
13
|
-
en: A "(" never closed, or a ")" never opened, leaves the reader unsure where the aside ends. A full-width "(" closed by a half-width ")" is left over from an edit too. Brackets are paired within each section under a heading ((), [], “”, and the Japanese 「」『』()[]【】〔〕〈〉《》), across paragraphs, since a stanza or a long quotation may span several. A short label of up to three characters such as "1)", "a)" or "iv)" at the start of a line or after a space, a ")" right after a number, a numbered label inside an aside ("A3)" in "(see the notes; A3) and more)", when the same label is used at the start of a line and later closes on the same line still close the aside), code, URLs, and an opening bracket quoted as the last character of a quotation (「取締役(」, as statutes quote the text they amend) are not counted. An opening quotation mark carried into a paragraph that opens with the same mark, as in fiction, is not counted.
|
|
12
|
+
ja: 閉じ忘れた「(」や、開きの無い「」」があると、読み手はどこまでが括弧の中なのか分からなくなります。全角の「(」を半角の「)」で閉じるのも、書き換えの途中で残った印です。見出しで区切った節ごとに、「」『』()()[][]【】〔〕〈〉《》“” と半角の 「」 の組を数えます。詩の連や長い引用は段落をまたぐので、段落を越えて組にします。行の頭や空白の後ろの「1)」「a)」「事例)」のような三文字までの番号の印と数の後ろの「)」、括弧の中の番号の印(「(…以下、事例5)まで同じ。)」の「事例5)」。同じ字の印を行の頭でも使っていて、同じ行の後ろの閉じで括弧が閉じるときに限る)、コードと URL、引用の閉じのすぐ前の開き(法令の読替えの「取締役(」とあるのは)は数えません。英語の小説のように、次の段落も同じ開きで始まるなら、閉じない開きは続きとして数えません。詩の引用のように二行以上を続けて行の頭の同じ引用符で開き直し、終わりで一度だけ閉じるものも、続きとして数えません。
|
|
13
|
+
en: A "(" never closed, or a ")" never opened, leaves the reader unsure where the aside ends. A full-width "(" closed by a half-width ")" is left over from an edit too. Brackets are paired within each section under a heading ((), [], “”, and the Japanese 「」『』()[]【】〔〕〈〉《》), across paragraphs, since a stanza or a long quotation may span several. A short label of up to three characters such as "1)", "a)" or "iv)" at the start of a line or after a space, a ")" right after a number, a numbered label inside an aside ("A3)" in "(see the notes; A3) and more)", when the same label is used at the start of a line and later closes on the same line still close the aside), code, URLs, and an opening bracket quoted as the last character of a quotation (「取締役(」, as statutes quote the text they amend) are not counted. An opening quotation mark carried into a paragraph that opens with the same mark, as in fiction, is not counted, nor is a quotation of verse that reopens with the same mark at the start of two or more lines in a row and closes once at the end.
|
|
14
14
|
|
|
15
15
|
message:
|
|
16
16
|
ja: 「{mark}」が組になっていません
|
|
@@ -52,5 +52,5 @@ example:
|
|
|
52
52
|
The plan (see below) is ready.
|
|
53
53
|
|
|
54
54
|
not_flagged:
|
|
55
|
-
ja: 行の頭や空白の後ろの「1)」「a)」「事例)」のような三文字までの番号の印、数の後ろの「)」、行の頭でも使う番号の印を括弧の中に書いたもの(「以下、事例5)まで同じ。」)、コードと URL
|
|
56
|
-
en: Labels of up to three characters such as "1)" or "a)" at the start of a line or after a space, a ")" right after a number, a numbered label also used at the start of a line, written inside an aside ("(see the notes; A3) and more)"), code and URLs are not counted. A bracket closed in a later paragraph,
|
|
55
|
+
ja: 行の頭や空白の後ろの「1)」「a)」「事例)」のような三文字までの番号の印、数の後ろの「)」、行の頭でも使う番号の印を括弧の中に書いたもの(「以下、事例5)まで同じ。」)、コードと URL は数えません。段落をまたいで閉じる括弧と、次の段落を同じ引用符で始める台詞、行ごとに同じ引用符で開き直して終わりで一度だけ閉じる詩の引用も指しません。小数と単位の間の引用符はインチの印(.015 “Hg)として数えません。半角の「「」」も鉤括弧として組にし、全角との幅の違い(「…」)は hankaku-kana に任せます。
|
|
56
|
+
en: Labels of up to three characters such as "1)" or "a)" at the start of a line or after a space, a ")" right after a number, a numbered label also used at the start of a line, written inside an aside ("(see the notes; A3) and more)"), code and URLs are not counted. A bracket closed in a later paragraph, a quotation carried into a paragraph that opens with the same mark, and verse quoted with the same mark reopening each line and one close at the end, are not reported. A curly quote between a decimal number and a unit is an inch mark (".015 “Hg") and is not counted. Half-width 「」 pair as Japanese brackets too; a width difference against 「」 (「…」) is left to hankaku-kana.
|
|
@@ -68,6 +68,8 @@ by_genre:
|
|
|
68
68
|
business: { strict: 1, normal: 2, relaxed: 5 }
|
|
69
69
|
speech: { strict: 1, normal: 2, relaxed: 5 }
|
|
70
70
|
docs/faq: { strict: 1, normal: 1, relaxed: 3 }
|
|
71
|
+
# 手引きも、日常の略語(HR)を数えなくなってから judged corpus で測り直して下げた。
|
|
72
|
+
docs/manual: { strict: 1, normal: 2, relaxed: 5 }
|
|
71
73
|
|
|
72
74
|
use_for: [business, technical, legal, docs, academic, literature, speech]
|
|
73
75
|
off_for:
|
|
@@ -91,8 +93,8 @@ example:
|
|
|
91
93
|
after: Our key goal indicator (KGI) this term is to reach product-market fit (PMF).
|
|
92
94
|
|
|
93
95
|
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,
|
|
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,
|
|
96
|
+
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, …。長い見出しの後ろの空白が 1 つでも、見出しだけの行の下に字下げして続けても)の中の略語も同じです。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、FAR 12.212)と、編と区分で引く法令集(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)は、大文字で書いた名前や語なので指しません。
|
|
97
|
+
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, …; also when a long label leaves one space, or stands alone above the indented entry). 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, FAR 12.212), 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
98
|
level_meaning:
|
|
97
99
|
ja: 説明のない略語が {limit} 種類あれば指摘。文書が自分で略語を {limit} 個展開していれば、1 つの抜けから指摘
|
|
98
100
|
en: reported once {limit} different acronyms go unexplained, or from the first one when the document itself spells out {limit} others
|
|
@@ -53,8 +53,8 @@ example:
|
|
|
53
53
|
Report an incident within 30 minutes and notify the affected teams. Record it in the incident log and fix the cause by the next working day.
|
|
54
54
|
|
|
55
55
|
not_flagged:
|
|
56
|
-
ja: 文書の長さに対して少ないものは指しません。短すぎる文書も測りません。指すのは語のある文ごとに一度で、長い言い方の中の語(in a timely manner の timely)は一つと数えます。英語の法務の文書では、法律や慣行が意味を決めている言い方(reasonable、best efforts、from time to time
|
|
57
|
-
en: 'A few vague words for the document''s length are not reported, and very short documents are not measured. Each sentence is reported once, and a word inside a longer phrase ("timely" in "in a timely manner") counts once. In legal documents, a word inside a term that law and practice define ("reasonable", "best efforts", "from time to time") is not counted. Inside a requirement, requirement-smell also reads "where possible" and "as needed". A word that the bracket right after it pins down ("a reasonable fee (USD 50)") is not counted either; a bracket that only names it ("(hereinafter the ""Fee"")") pins nothing down. Lines under a table of contents heading (the sections'' names) are not counted, and "reasonable accommodation" is the name of a legal duty in any genre.'
|
|
56
|
+
ja: 文書の長さに対して少ないものは指しません。短すぎる文書も測りません。指すのは語のある文ごとに一度で、長い言い方の中の語(in a timely manner の timely)は一つと数えます。英語の法務の文書では、法律や慣行が意味を決めている言い方(reasonable、best efforts、from time to time)の中の語は数えません。データ保護の法律が義務として書く安全管理の言い方(appropriate technical and organisational measures、appropriate administrative, physical, and technical safeguards)も同じです。何も名指さない appropriate measures は数えます。要求の文の中の「可能な限り」「必要に応じて」は、要求の書き方として requirement-smell も見ます。すぐ後ろの括弧で中身を書いた語(一定の事項(請求書に書く事項))も数えません。括弧が名前を付けるだけ(以下「本措置」という。)なら数えます。目次の見出しの下の行(節の名前)は数えません。英語の reasonable accommodation は、どのジャンルでも法律が決めた義務の名前なので数えません。英語で、すぐ後ろに法律や条を名指す語が続くもの(as required by applicable law、as required under 45 CFR §164.528、as required under HIPAA)は、何が要るのかをその法律が決めているので数えません。当事者が決めるもの(as required by Licensor)は数えます。
|
|
57
|
+
en: 'A few vague words for the document''s length are not reported, and very short documents are not measured. Each sentence is reported once, and a word inside a longer phrase ("timely" in "in a timely manner") counts once. In legal documents, a word inside a term that law and practice define ("reasonable", "best efforts", "from time to time") is not counted; nor are the security duties data-protection law writes ("appropriate technical and organisational measures", "appropriate administrative, physical, and technical safeguards"), while a bare "appropriate measures" is counted. Inside a requirement, requirement-smell also reads "where possible" and "as needed". A word that the bracket right after it pins down ("a reasonable fee (USD 50)") is not counted either; a bracket that only names it ("(hereinafter the ""Fee"")") pins nothing down. Lines under a table of contents heading (the sections'' names) are not counted, and "reasonable accommodation" is the name of a legal duty in any genre. A word that a law or a section governs right after it ("as required by applicable law", "as required under 45 CFR §164.528", "as required under HIPAA") is not counted, since that law says what is required; one a party decides ("as required by Licensor") is.'
|
|
58
58
|
level_meaning:
|
|
59
59
|
ja: 1000 字あたりあいまいな語 {limit} 個まで
|
|
60
60
|
en: up to {limit} vague words per 1000 words
|
package/skills/chaff/SKILL.md
CHANGED
|
@@ -76,7 +76,9 @@ calls nothing. Ask the person before a real run; the passages leave the machine.
|
|
|
76
76
|
| Change the rule | Wrong for this team or genre | `npx chaffjs relax <rule-id> --why "reason"` (or `strict` / `off`). The reason and date are written into `chaff.yaml`. |
|
|
77
77
|
|
|
78
78
|
`npx chaffjs explain <rule-id>` shows why a rule exists, its levels and the current one. Read it before
|
|
79
|
-
relaxing a rule.
|
|
79
|
+
relaxing a rule. A worked before and after for a rule, with chaff's real output and the settings, is at
|
|
80
|
+
`https://github.com/isamu/lab/blob/main/text/docs/samples/<ja|en>/<rule-id>.md` when that rule has one (the index:
|
|
81
|
+
`docs/samples/<ja|en>/README.md`).
|
|
80
82
|
|
|
81
83
|
When a finding is wrong for a reason that is not about this team (chaff misread the text), tell the person and offer
|
|
82
84
|
`npx chaffjs feedback <file> --rule <rule-id> --line <n>`: it drafts a report and sends nothing. A document the
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Token } from "./plugin.ts";
|
|
2
2
|
|
|
3
|
-
const touches = (left: Token | undefined, right: Token | undefined): boolean =>
|
|
3
|
+
export const touches = (left: Token | undefined, right: Token | undefined): boolean =>
|
|
4
|
+
left !== undefined && right !== undefined && left.span.end === right.span.start;
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* 前の語と組んで一つの名前になる語(敬って呼ぶ語の皆様、置き場所を言う語の下)の直前の助詞で、組んだ名前がさらに同じ助詞で次の語に
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Token } from "./plugin.ts";
|
|
2
|
+
import { touches } from "./bound-word-particles.ts";
|
|
3
|
+
|
|
4
|
+
// Particles that look like a link of a nesting chain (の) but do not nest a noun in a noun, and the predicates that
|
|
5
|
+
// close a chain. Pure.
|
|
6
|
+
|
|
7
|
+
/** The counted particles (particles) written straight after a word that only picks out which ones (他の: words). */
|
|
8
|
+
export const determinerParticles = (tokens: readonly Token[], particles: readonly string[], words: readonly string[]): ReadonlySet<Token> =>
|
|
9
|
+
new Set(tokens.filter((token, at) => particles.includes(token.surface) && touches(tokens[at - 1], token) && words.includes(tokens[at - 1]?.surface ?? "")));
|
|
10
|
+
|
|
11
|
+
/** A verb that ends a clause: in its dictionary form (定める) or followed by an auxiliary (つい of ついた), not a stem that starts a compound noun (繰下げ of 繰下げ受給). */
|
|
12
|
+
const endsClause = (verb: Token, after: Token | undefined): boolean => verb.pos === "VERB" && (verb.surface === verb.lemma || after?.pos === "AUX");
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The verbs written straight after a counted particle (番号のついた版): that の marks the subject of a clause as が would,
|
|
16
|
+
* and the clause ends at its verb, so the noun after it starts a new phrase. The の itself still counts, in the phrase before.
|
|
17
|
+
*/
|
|
18
|
+
export const clauseEnds = (tokens: readonly Token[], particles: readonly string[]): ReadonlySet<Token> =>
|
|
19
|
+
new Set(
|
|
20
|
+
tokens.filter((token, at) => endsClause(token, tokens[at + 1]) && particles.includes(tokens[at - 1]?.surface ?? "") && touches(tokens[at - 1], token)),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
const endsBetween = (left: Token, right: Token, ends: ReadonlySet<Token>): boolean =>
|
|
24
|
+
[...ends].some((verb) => verb.span.start >= left.span.end && verb.span.end <= right.span.start);
|
|
25
|
+
|
|
26
|
+
/** The most particles of a run (in order) that no clause end (ends) falls between: 2 for 特定の番号の|ついた版の. 0 for none. */
|
|
27
|
+
export const longestClausePart = (run: readonly Token[], ends: ReadonlySet<Token>): number =>
|
|
28
|
+
run.reduce<{ readonly current: number; readonly longest: number }>(
|
|
29
|
+
(acc, token, at) => {
|
|
30
|
+
const previous = run[at - 1];
|
|
31
|
+
const current = previous !== undefined && endsBetween(previous, token, ends) ? 1 : acc.current + 1;
|
|
32
|
+
return { current, longest: Math.max(acc.longest, current) };
|
|
33
|
+
},
|
|
34
|
+
{ current: 0, longest: 0 },
|
|
35
|
+
).longest;
|
|
@@ -113,11 +113,19 @@ const nameLineDefinitions = (source: string): string[] => {
|
|
|
113
113
|
.filter((initials) => initials !== "");
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
+
/**
|
|
117
|
+
* 文中の書式のタグ(<span id="13.18">**"GDPR"**</span> means)。読み手には見えず、語と定義の語の間を空けない。表の欄や段落のタグは
|
|
118
|
+
* 区切りなので外さない。
|
|
119
|
+
*/
|
|
120
|
+
const INLINE_TAG = /<\/?(?:span|a|b|strong|em|i|u|mark|small|abbr|dfn)(?:\s[^<>\n]{0,200})?>/giu;
|
|
121
|
+
|
|
116
122
|
/** 文書が括弧の展開の形をとらずに定義した略語。 */
|
|
117
|
-
export const statedAcronyms = (source: string, words: DefinitionStatementWords): ReadonlySet<string> =>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
...
|
|
121
|
-
...
|
|
122
|
-
...
|
|
123
|
+
export const statedAcronyms = (source: string, words: DefinitionStatementWords): ReadonlySet<string> => {
|
|
124
|
+
const text = source.replaceAll(INLINE_TAG, "");
|
|
125
|
+
return new Set([
|
|
126
|
+
...statementDefinitions(text, words.statements),
|
|
127
|
+
...labelDefinitions(text),
|
|
128
|
+
...markedDefinitions(text, words.markers),
|
|
129
|
+
...nameLineDefinitions(text),
|
|
123
130
|
]);
|
|
131
|
+
};
|
|
@@ -120,7 +120,13 @@ const isNamedBeforeAt = (body: string, acronym: string, at: number): boolean =>
|
|
|
120
120
|
*/
|
|
121
121
|
export type DefinitionWords = { readonly markers: readonly string[]; readonly verbs: readonly string[]; readonly alternatives?: readonly string[] };
|
|
122
122
|
|
|
123
|
-
type DefinitionPatterns = {
|
|
123
|
+
type DefinitionPatterns = {
|
|
124
|
+
readonly opened: RegExp;
|
|
125
|
+
readonly closes: RegExp;
|
|
126
|
+
readonly alternative: RegExp;
|
|
127
|
+
readonly quotedAlternative: RegExp;
|
|
128
|
+
readonly otherName: RegExp;
|
|
129
|
+
};
|
|
124
130
|
|
|
125
131
|
const oneOf = (words: readonly string[]): string => (words.length === 0 ? "(?!)" : words.map(escapeRegExp).join("|"));
|
|
126
132
|
|
|
@@ -128,6 +134,7 @@ const definitionPatterns = (words: DefinitionWords): DefinitionPatterns => ({
|
|
|
128
134
|
opened: new RegExp(String.raw`[((]\s*(?<markers>(?:(?:${oneOf(words.markers)})${MARKER_GAP})*)${WRAP}(?<![A-Za-z])$`, "iu"),
|
|
129
135
|
closes: new RegExp(String.raw`^${WRAP}(?<verb>(?:${oneOf(words.verbs)})[。.]?)?${WRAP}[))]`, "iu"),
|
|
130
136
|
alternative: new RegExp(String.raw`[,,、]\s*(?:${oneOf(words.alternatives ?? [])})\s*["“'‘]?$`, "iu"),
|
|
137
|
+
quotedAlternative: new RegExp(String.raw`(?<=["”'’])\s(?:${oneOf(words.alternatives ?? [])})\s*["“'‘]?$`, "iu"),
|
|
131
138
|
otherName: new RegExp(String.raw`^${WRAP}[,,、]?\s*(?:${oneOf(words.alternatives ?? [])})\s[^()()\n]{1,${String(DEFINITION_REACH)}}[))]`, "iu"),
|
|
132
139
|
});
|
|
133
140
|
|
|
@@ -244,13 +251,25 @@ const isPrefixedAt = (body: string, acronym: string, at: number): boolean => {
|
|
|
244
251
|
/** 引用符で囲んで書き終えた名前(‘abstract syntax tree’)。小文字の語でも、囲みが名前の始まりと終わりを決める。 */
|
|
245
252
|
const QUOTED_NAME_END = /(?:“(?<curly>[^“”\n]{1,60})”|‘(?<single>[^‘’\n]{1,60})’|"(?<straight>[^"\n]{1,60})")$/u;
|
|
246
253
|
|
|
247
|
-
|
|
254
|
+
const quotedNameBefore = (name: string): string | undefined => {
|
|
255
|
+
const groups = QUOTED_NAME_END.exec(name)?.groups;
|
|
256
|
+
return groups?.["curly"] ?? groups?.["single"] ?? groups?.["straight"];
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* 名前の後ろの読点と言い換えの語に続く略語(Special Interest Groups, or SIGs、‘abstract syntax tree’, or ‘AST’)。名前の頭文字が略語と揃うときだけ。
|
|
261
|
+
* 引用符で囲んだ名前なら読点が無くてもよい(“subject matter experts” or SME)。囲みが名前の終わりを決める。
|
|
262
|
+
*/
|
|
248
263
|
const isAlternativeAt = (patterns: DefinitionPatterns, body: string, acronym: string, at: number): boolean => {
|
|
249
|
-
const
|
|
250
|
-
|
|
264
|
+
const before = body.slice(Math.max(0, at - DEFINITION_REACH), at);
|
|
265
|
+
const joined = patterns.alternative.exec(before);
|
|
266
|
+
if (joined === null) {
|
|
267
|
+
const quotedJoin = patterns.quotedAlternative.exec(before);
|
|
268
|
+
const quoted = quotedJoin === null ? undefined : quotedNameBefore(body.slice(0, at - quotedJoin[0].length));
|
|
269
|
+
return quoted !== undefined && namesAcronym(quoted, acronym);
|
|
270
|
+
}
|
|
251
271
|
const name = body.slice(0, at - joined[0].length);
|
|
252
|
-
const
|
|
253
|
-
const quoted = groups?.["curly"] ?? groups?.["single"] ?? groups?.["straight"];
|
|
272
|
+
const quoted = quotedNameBefore(name);
|
|
254
273
|
return spellsOut(name, acronym) || (quoted !== undefined && namesAcronym(quoted, acronym));
|
|
255
274
|
};
|
|
256
275
|
|
|
@@ -363,7 +382,7 @@ const CLOSING_FENCE = /^ {0,3}(?<fence>`{3,}|~{3,})\s*$/u;
|
|
|
363
382
|
const closes = (line: string, open: string): boolean => CLOSING_FENCE.exec(line)?.groups?.["fence"]?.startsWith(open) === true;
|
|
364
383
|
|
|
365
384
|
/** コードの囲みの中の行(開き・閉じの行も)を空にする。閉じるのは同じ記号で、開きと同じか長い並び。 */
|
|
366
|
-
const withoutFences = (lines: readonly string[]): string[] =>
|
|
385
|
+
export const withoutFences = (lines: readonly string[]): string[] =>
|
|
367
386
|
lines.reduce<FenceScan>(
|
|
368
387
|
(scan, line) => {
|
|
369
388
|
const fence = FENCE.exec(line)?.groups?.["fence"];
|
|
@@ -36,11 +36,16 @@ export const spelledOutAcronyms = (sentences: readonly string[], mentions: reado
|
|
|
36
36
|
.flatMap((sentence) => (sentence.match(ACRONYM) ?? []).filter((acronym) => spellsOutInWords(sentence, acronym))),
|
|
37
37
|
);
|
|
38
38
|
|
|
39
|
+
/** Capitals and a plural s (CRs): the plural of a shorter acronym (CR), not the longer one (CRS) set in other capitals. */
|
|
40
|
+
const PLURAL_OF_CAPITALS = /^\p{Lu}+s$/u;
|
|
41
|
+
|
|
39
42
|
/** The other ways the text capitalises an acronym (TCoP for TCOP, TCOP for TCoP), each with two capitals or more. */
|
|
40
43
|
export const caseVariantsIn = (text: string, acronym: string): string[] => {
|
|
41
44
|
const written = new RegExp(String.raw`(?<![\p{L}\p{N}])${escapeRegExp(acronym)}(?![\p{L}\p{N}])`, "giu");
|
|
42
45
|
const variants = [...text.matchAll(written)].map((match) => match[0]);
|
|
43
|
-
return [...new Set(variants)].filter(
|
|
46
|
+
return [...new Set(variants)].filter(
|
|
47
|
+
(variant) => variant !== acronym && (variant.match(CAPITAL) ?? []).length >= MIN_CAPITALS && !PLURAL_OF_CAPITALS.test(variant),
|
|
48
|
+
);
|
|
44
49
|
};
|
|
45
50
|
|
|
46
51
|
/** A name in capitals that the text also writes as a word is that word set in capitals; short capitals (IT, It) are left alone. */
|
|
@@ -101,8 +101,8 @@ const TRADEMARKED = new RegExp(String.raw`${EDGE_BEFORE}\p{Lu}{2,}(?=[®™])`,
|
|
|
101
101
|
export const trademarkSpans = (text: string): Span[] => spansOf(text, TRADEMARKED);
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
* 引用の形の中の、法令の名前(45 CFR Parts 160、CFR §164.524、21 USC §301、44 USC. 3502、22 CCR §§ 12701、94/820/EC
|
|
105
|
-
*
|
|
104
|
+
* 引用の形の中の、法令の名前(45 CFR Parts 160、CFR §164.524、21 USC §301、44 USC. 3502、22 CCR §§ 12701、94/820/EC、FAR section 12.212)。
|
|
105
|
+
* 後ろに条(§、Part、section、番号)があるか、/ で繋いだ番号の後ろのときだけ。名前の後ろの点(USC.)は略しの印で、条の前に書いてもよい。§ の前には大文字で始まる
|
|
106
106
|
* 1 語を挟んでもよい(15 USCA Appendix § 12)。巻の番号の後ろで点で終わる名前(See 44 USC. 3502)も引用で、文を分ける読み手は
|
|
107
107
|
* 点の後ろの条を次の文に送る。法令集そのものを言う所(the CFR title、the 2 CFR export)は略語のまま数える。
|
|
108
108
|
*/
|
|
@@ -112,7 +112,10 @@ export const citationSpans = (text: string, series: readonly string[]): Span[] =
|
|
|
112
112
|
const section = String.raw`(?:\p{Lu}\p{L}*\.?[ \t]+)?§`;
|
|
113
113
|
return spansOf(
|
|
114
114
|
text,
|
|
115
|
-
new RegExp(
|
|
115
|
+
new RegExp(
|
|
116
|
+
String.raw`(?<=\d/)${name}${EDGE_AFTER}|${EDGE_BEFORE}${name}(?=\.?[ \t]*(?:${section}|(?:[Pp]arts?|[Ss]ections?)[ \t]+\d|\d))|(?<=\d[ \t]+)${name}(?=\.)`,
|
|
117
|
+
"gu",
|
|
118
|
+
),
|
|
116
119
|
);
|
|
117
120
|
};
|
|
118
121
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { withoutFences } from "./acronym-expansion.ts";
|
|
2
|
+
|
|
3
|
+
/** 箇条書きの項目の行。字下げの幅と、印の後ろの文。 */
|
|
4
|
+
const LIST_ITEM = /^(?<indent>[ \t]*)(?:[-*+]|\d+[.)])\s+(?<text>(?:\S.*)?)$/u;
|
|
5
|
+
const ITEM_ACRONYM = /(?<![\p{L}\p{N}_&])(?<acronym>[A-Z]{2,10})s?(?![\p{L}\p{N}_&])/gu;
|
|
6
|
+
/** 親の項目の名前の語の短さの下限。of や to の頭文字は、2 字の略語にたまたま揃いやすい。 */
|
|
7
|
+
const MIN_PARENT_WORD = 3;
|
|
8
|
+
|
|
9
|
+
type ListItem = { readonly text: string; readonly children: string };
|
|
10
|
+
|
|
11
|
+
const indentOf = (line: string): number => (/^[ \t]*/u.exec(line)?.[0] ?? "").length;
|
|
12
|
+
|
|
13
|
+
/** at から始まる項目の、自分の文(続きの行も)と、それより深く字下げした子の項目の文。 */
|
|
14
|
+
const itemAt = (lines: readonly string[], at: number): ListItem | undefined => {
|
|
15
|
+
const item = LIST_ITEM.exec(lines[at] ?? "")?.groups;
|
|
16
|
+
if (item === undefined) return undefined;
|
|
17
|
+
const indent = (item["indent"] ?? "").length;
|
|
18
|
+
const endIndex = lines.findIndex((line, index) => index > at && line.trim() !== "" && indentOf(line) <= indent);
|
|
19
|
+
const block = lines.slice(at + 1, endIndex === -1 ? lines.length : endIndex);
|
|
20
|
+
const firstChild = block.findIndex((line) => LIST_ITEM.test(line));
|
|
21
|
+
const own = firstChild === -1 ? block : block.slice(0, firstChild);
|
|
22
|
+
const children = firstChild === -1 ? [] : block.slice(firstChild);
|
|
23
|
+
return { text: [item["text"] ?? "", ...own].join(" "), children: children.join("\n") };
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** リンクの行き先と URL。アドレスの語(…/cross-project-council/…)は、書き手が書いた名前ではない。 */
|
|
27
|
+
const LINK_TARGET = /\]\([^()\s]*\)/gu;
|
|
28
|
+
const BARE_URL = /\bhttps?:\/\/\S+/gu;
|
|
29
|
+
|
|
30
|
+
const withoutAddresses = (text: string): string => text.replace(LINK_TARGET, "]").replace(BARE_URL, " ");
|
|
31
|
+
|
|
32
|
+
/** 文の中に、略語の文字を頭文字に持つ語が続けて並ぶか(product owner → PO)。大文字小文字を問わず、短い語は数えない。 */
|
|
33
|
+
const spelledByRun = (text: string, acronym: string): boolean => {
|
|
34
|
+
const letters = [...acronym.toLowerCase()];
|
|
35
|
+
const words =
|
|
36
|
+
withoutAddresses(text)
|
|
37
|
+
.toLowerCase()
|
|
38
|
+
.match(/\p{L}+/gu) ?? [];
|
|
39
|
+
const runStartsAt = (start: number): boolean =>
|
|
40
|
+
letters.every((letter, offset) => {
|
|
41
|
+
const word = words[start + offset] ?? "";
|
|
42
|
+
return word.length >= MIN_PARENT_WORD && word.startsWith(letter);
|
|
43
|
+
});
|
|
44
|
+
return words.some((_, start) => runStartsAt(start));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 子の項目で使う略語のうち、親の項目がその名前を書き出しているもの(- **No product owner:** … の下の - Unavailable PO: …)。
|
|
49
|
+
* 入れ子の箇条書きでは、親の項目が子の項目の話題を名指すので、親の語の頭文字が略語と揃えば展開と読む。
|
|
50
|
+
*/
|
|
51
|
+
export const parentItemAcronyms = (source: string): ReadonlySet<string> => {
|
|
52
|
+
const lines = withoutFences(source.split(/\r?\n/u));
|
|
53
|
+
return new Set(
|
|
54
|
+
lines.flatMap((_, index) => {
|
|
55
|
+
const item = itemAt(lines, index);
|
|
56
|
+
if (item === undefined || item.children === "") return [];
|
|
57
|
+
return [...item.children.matchAll(ITEM_ACRONYM)].map((match) => match.groups?.["acronym"] ?? "").filter((acronym) => spelledByRun(item.text, acronym));
|
|
58
|
+
}),
|
|
59
|
+
);
|
|
60
|
+
};
|
|
@@ -68,6 +68,21 @@ const REFERENCE_LIKE = /(?<![\\A-Za-z0-9_\]])\[([^[\]\n]+)\]\[([^[\]\n]*)\]/gu;
|
|
|
68
68
|
/** 数だけの括弧([1][2]、[3, 4])は、参照の記法ではなく文献の番号を並べたもの。 */
|
|
69
69
|
const CITATION_NUMBERS = /^[\d\s,,、–-]+$/u;
|
|
70
70
|
|
|
71
|
+
/**
|
|
72
|
+
* ファイルの種類と大きさの札([PDF:47KB]、[PDFファイル/269KB]、[Excel 28 KB])。役所のページがリンクの後ろに書く添え書きで、
|
|
73
|
+
* 写すと字のまま残る。名前の定義で呼ぶ参照の記法ではない。
|
|
74
|
+
*/
|
|
75
|
+
const FILE_SIZE = /^\d[\d.,]*\s*(?:[KMGT]i?B|bytes?|バイト)$/iu;
|
|
76
|
+
const FILE_TYPE_PREFIX = /^\p{L}[\p{L}\p{N}]*(?:\s*[:://、,,]\s*|\s+)/u;
|
|
77
|
+
|
|
78
|
+
const isFileSizeLabel = (text: string): boolean => {
|
|
79
|
+
if (FILE_SIZE.test(text)) return true;
|
|
80
|
+
const prefix = FILE_TYPE_PREFIX.exec(text)?.[0];
|
|
81
|
+
return prefix !== undefined && FILE_SIZE.test(text.slice(prefix.length));
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const fileSizeLabel = (match: RegExpMatchArray): boolean => isFileSizeLabel(match[1] ?? "") || isFileSizeLabel(match[2] ?? "");
|
|
85
|
+
|
|
71
86
|
/** 画像の参照(`![alt][label]`)の頭の印。指摘の範囲に含める。 */
|
|
72
87
|
const IMAGE_MARK = "!";
|
|
73
88
|
|
|
@@ -118,6 +133,7 @@ export const unresolvedReferences = (source: string, markup: Markup): Span[] =>
|
|
|
118
133
|
return markup.texts.flatMap((text) =>
|
|
119
134
|
[...source.slice(text.start, text.end).matchAll(REFERENCE_LIKE)]
|
|
120
135
|
.filter((match) => !CITATION_NUMBERS.test(match[1] ?? "") && !siteDefinedImage(source, text.start + match.index, match[2] ?? ""))
|
|
136
|
+
.filter((match) => !fileSizeLabel(match))
|
|
121
137
|
.filter((match) => !CHARACTER_CLASS.test(match[1] ?? "") && !CHARACTER_CLASS.test(match[2] ?? "") && !bookDefined(match[2] ?? ""))
|
|
122
138
|
.map((match) => ({ start: text.start + match.index, end: text.start + match.index + match[0].length }))
|
|
123
139
|
.map((span) => (imageAt(source, span.start) ? { start: span.start - 1, end: span.end } : span)),
|