chaffjs 0.44.0 → 0.45.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/detectors/abstract-length.d.ts +5 -1
- package/dist/detectors/abstract-length.d.ts.map +1 -1
- package/dist/detectors/abstract-length.js +13 -5
- package/dist/detectors/abstract-length.js.map +1 -1
- package/dist/detectors/adversative-ga.d.ts +1 -1
- package/dist/detectors/adversative-ga.d.ts.map +1 -1
- package/dist/detectors/adversative-ga.js +19 -2
- package/dist/detectors/adversative-ga.js.map +1 -1
- package/dist/detectors/bold-label.d.ts.map +1 -1
- package/dist/detectors/bold-label.js +56 -15
- package/dist/detectors/bold-label.js.map +1 -1
- package/dist/detectors/char-shape.d.ts +0 -6
- package/dist/detectors/char-shape.d.ts.map +1 -1
- package/dist/detectors/char-shape.js +4 -21
- package/dist/detectors/char-shape.js.map +1 -1
- package/dist/detectors/clause-shape.d.ts +2 -0
- package/dist/detectors/clause-shape.d.ts.map +1 -1
- package/dist/detectors/clause-shape.js +11 -2
- package/dist/detectors/clause-shape.js.map +1 -1
- package/dist/detectors/cleft-focus.d.ts +4 -0
- package/dist/detectors/cleft-focus.d.ts.map +1 -0
- package/dist/detectors/cleft-focus.js +31 -0
- package/dist/detectors/cleft-focus.js.map +1 -0
- package/dist/detectors/definition-use.d.ts.map +1 -1
- package/dist/detectors/definition-use.js +13 -3
- package/dist/detectors/definition-use.js.map +1 -1
- package/dist/detectors/empty-section.d.ts +1 -1
- package/dist/detectors/empty-section.d.ts.map +1 -1
- package/dist/detectors/empty-section.js +3 -2
- package/dist/detectors/empty-section.js.map +1 -1
- package/dist/detectors/fullwidth-alnum.d.ts +2 -2
- package/dist/detectors/fullwidth-alnum.d.ts.map +1 -1
- package/dist/detectors/fullwidth-alnum.js +19 -3
- package/dist/detectors/fullwidth-alnum.js.map +1 -1
- package/dist/detectors/heading-echo.d.ts.map +1 -1
- package/dist/detectors/heading-echo.js +20 -7
- package/dist/detectors/heading-echo.js.map +1 -1
- package/dist/detectors/heading-number.d.ts +7 -0
- package/dist/detectors/heading-number.d.ts.map +1 -0
- package/dist/detectors/heading-number.js +21 -0
- package/dist/detectors/heading-number.js.map +1 -0
- package/dist/detectors/lookalike-character.d.ts +2 -1
- package/dist/detectors/lookalike-character.d.ts.map +1 -1
- package/dist/detectors/lookalike-character.js +14 -1
- package/dist/detectors/lookalike-character.js.map +1 -1
- package/dist/detectors/mark-shape.d.ts +6 -1
- package/dist/detectors/mark-shape.d.ts.map +1 -1
- package/dist/detectors/mark-shape.js +31 -11
- package/dist/detectors/mark-shape.js.map +1 -1
- package/dist/detectors/middle-dot.d.ts +7 -0
- package/dist/detectors/middle-dot.d.ts.map +1 -1
- package/dist/detectors/middle-dot.js +19 -0
- package/dist/detectors/middle-dot.js.map +1 -1
- package/dist/detectors/named-by-context.d.ts +13 -0
- package/dist/detectors/named-by-context.d.ts.map +1 -0
- package/dist/detectors/named-by-context.js +10 -0
- package/dist/detectors/named-by-context.js.map +1 -0
- package/dist/detectors/placeholder-context.d.ts +16 -0
- package/dist/detectors/placeholder-context.d.ts.map +1 -0
- package/dist/detectors/placeholder-context.js +57 -0
- package/dist/detectors/placeholder-context.js.map +1 -0
- package/dist/detectors/placeholder-text.d.ts +2 -0
- package/dist/detectors/placeholder-text.d.ts.map +1 -1
- package/dist/detectors/placeholder-text.js +1 -1
- package/dist/detectors/placeholder-text.js.map +1 -1
- package/dist/detectors/registry/middle-dot.js +1 -1
- package/dist/detectors/sentence-counts.d.ts +2 -0
- package/dist/detectors/sentence-counts.d.ts.map +1 -1
- package/dist/detectors/sentence-counts.js +13 -4
- package/dist/detectors/sentence-counts.js.map +1 -1
- package/dist/detectors/signals.d.ts.map +1 -1
- package/dist/detectors/signals.js +10 -1
- package/dist/detectors/signals.js.map +1 -1
- package/dist/detectors/structure.d.ts.map +1 -1
- package/dist/detectors/structure.js +3 -2
- package/dist/detectors/structure.js.map +1 -1
- package/dist/detectors/template-sections.d.ts +1 -0
- package/dist/detectors/template-sections.d.ts.map +1 -1
- package/dist/detectors/template-sections.js +1 -1
- package/dist/detectors/template-sections.js.map +1 -1
- package/dist/detectors/unfilled-placeholder.d.ts.map +1 -1
- package/dist/detectors/unfilled-placeholder.js +18 -1
- package/dist/detectors/unfilled-placeholder.js.map +1 -1
- package/dist/detectors/verse-block.d.ts +4 -0
- package/dist/detectors/verse-block.d.ts.map +1 -0
- package/dist/detectors/verse-block.js +40 -0
- package/dist/detectors/verse-block.js.map +1 -0
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +1 -0
- package/dist/document.js.map +1 -1
- package/dist/email-parts.d.ts +2 -0
- package/dist/email-parts.d.ts.map +1 -1
- package/dist/email-parts.js +10 -7
- package/dist/email-parts.js.map +1 -1
- package/dist/eval.d.ts.map +1 -1
- package/dist/eval.js +3 -0
- package/dist/eval.js.map +1 -1
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/reasons.d.ts +2 -0
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +2 -0
- package/dist/reasons.js.map +1 -1
- package/dist/rule-of-three.d.ts +7 -2
- package/dist/rule-of-three.d.ts.map +1 -1
- package/dist/rule-of-three.js +11 -3
- package/dist/rule-of-three.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +4 -1
- package/dist/run.js.map +1 -1
- package/dist/structure/cited-elsewhere.d.ts +5 -2
- package/dist/structure/cited-elsewhere.d.ts.map +1 -1
- package/dist/structure/cited-elsewhere.js +16 -6
- package/dist/structure/cited-elsewhere.js.map +1 -1
- package/dist/structure/definition-use.d.ts +2 -1
- package/dist/structure/definition-use.d.ts.map +1 -1
- package/dist/structure/definition-use.js +10 -2
- package/dist/structure/definition-use.js.map +1 -1
- package/dist/structure/issues.js +1 -1
- package/dist/structure/issues.js.map +1 -1
- package/package.json +3 -3
- package/rules/abstract-length.yaml +2 -2
- package/rules/adversative-ga-repeat.yaml +2 -2
- package/rules/attachment-not-attached.yaml +11 -6
- package/rules/bold-label-list.yaml +22 -6
- package/rules/bracket-width-consistency.yaml +2 -2
- package/rules/demonstrative-opener-run.yaml +2 -2
- package/rules/emoji-density.yaml +2 -2
- package/rules/empty-section.yaml +2 -2
- package/rules/fullwidth-alnum-consistency.yaml +2 -2
- package/rules/lookalike-character.yaml +8 -5
- package/rules/max-kanji-continuous.yaml +4 -0
- package/rules/paragraph-length-variance.yaml +27 -3
- package/rules/repeated-sentence-ending.yaml +2 -2
- package/rules/rule-of-three.yaml +2 -2
- package/rules/sentence-spacing-consistency.yaml +2 -2
- package/rules/teki-overuse.yaml +2 -0
- package/rules/unfilled-placeholder.yaml +2 -2
- package/rules/use-before-definition.yaml +2 -2
- package/src/detectors/abstract-length.ts +16 -6
- package/src/detectors/adversative-ga.ts +24 -2
- package/src/detectors/bold-label.ts +63 -16
- package/src/detectors/char-shape.ts +8 -22
- package/src/detectors/clause-shape.ts +14 -3
- package/src/detectors/cleft-focus.ts +40 -0
- package/src/detectors/definition-use.ts +23 -4
- package/src/detectors/empty-section.ts +3 -2
- package/src/detectors/fullwidth-alnum.ts +24 -3
- package/src/detectors/heading-echo.ts +21 -8
- package/src/detectors/heading-number.ts +20 -0
- package/src/detectors/lookalike-character.ts +19 -2
- package/src/detectors/mark-shape.ts +33 -6
- package/src/detectors/middle-dot.ts +22 -0
- package/src/detectors/named-by-context.ts +15 -0
- package/src/detectors/placeholder-context.ts +72 -0
- package/src/detectors/placeholder-text.ts +1 -1
- package/src/detectors/registry/middle-dot.ts +1 -1
- package/src/detectors/sentence-counts.ts +16 -4
- package/src/detectors/signals.ts +11 -1
- package/src/detectors/structure.ts +3 -2
- package/src/detectors/template-sections.ts +1 -1
- package/src/detectors/unfilled-placeholder.ts +22 -1
- package/src/detectors/verse-block.ts +48 -0
- package/src/document.ts +1 -0
- package/src/email-parts.ts +16 -7
- package/src/eval.ts +2 -0
- package/src/plugin.ts +2 -0
- package/src/reasons.ts +4 -0
- package/src/rule-of-three.ts +22 -5
- package/src/run.ts +3 -1
- package/src/structure/cited-elsewhere.ts +18 -6
- package/src/structure/definition-use.ts +10 -1
- package/src/structure/issues.ts +1 -1
|
@@ -2,6 +2,7 @@ id: attachment-not-attached
|
|
|
2
2
|
layer: L2
|
|
3
3
|
status: stable
|
|
4
4
|
how_to_find: attachment-missing
|
|
5
|
+
requires: [sent-message]
|
|
5
6
|
severity: warning
|
|
6
7
|
|
|
7
8
|
name:
|
|
@@ -9,8 +10,8 @@ name:
|
|
|
9
10
|
en: Attachment mentioned but not shown
|
|
10
11
|
|
|
11
12
|
why:
|
|
12
|
-
ja: 「資料を添付します」と書いて添付を忘れるのは、仕事のメールでいちばんよくある失敗の一つです。受け手は返信で頼み直すことになり、やり取りが一往復増えます。本文が「添付」「別添」「同封」に触れているのに、文書のどこにも添付の欄(添付ファイル:)、ファイル名(見積書.pdf
|
|
13
|
-
en: 'Writing "please find attached" and forgetting the attachment is one of the most common mistakes in work email. The recipient has to ask again, and the exchange takes another round. chaff points out a text that mentions an attachment ("attached", "enclosed") when the document shows none: no attachment field ("Attachment:", "Encl.:"), no file name ("quote.pdf"), and no mailing-list note about a removed attachment.
|
|
13
|
+
ja: 「資料を添付します」と書いて添付を忘れるのは、仕事のメールでいちばんよくある失敗の一つです。受け手は返信で頼み直すことになり、やり取りが一往復増えます。本文が「添付」「別添」「同封」に触れているのに、文書のどこにも添付の欄(添付ファイル:)、ファイル名(見積書.pdf)、メーリングリストの添付の注記が無いとき指します。送る前の下書きは見ません。下書きのファイルは送るときに付けるので、本文に無いのが普通です。差出人や日時のヘッダーのある、送った・届いたメールやメーリングリストの保存分でだけ見ます。
|
|
14
|
+
en: 'Writing "please find attached" and forgetting the attachment is one of the most common mistakes in work email. The recipient has to ask again, and the exchange takes another round. chaff points out a text that mentions an attachment ("attached", "enclosed") when the document shows none: no attachment field ("Attachment:", "Encl.:"), no file name ("quote.pdf"), and no mailing-list note about a removed attachment. A draft is not checked: its files are attached when sending, so the text never shows them. Only a message as sent or kept, with a From: or Date: header, or a mailing-list archive, is checked.'
|
|
14
15
|
|
|
15
16
|
message:
|
|
16
17
|
ja: 添付に触れていますが、添付の欄やファイル名がありません
|
|
@@ -32,18 +33,20 @@ off_for:
|
|
|
32
33
|
|
|
33
34
|
group: facts
|
|
34
35
|
summary:
|
|
35
|
-
ja:
|
|
36
|
-
en:
|
|
36
|
+
ja: 本文が「添付します」と書いているのに、添付の欄もファイル名も無い送ったメール
|
|
37
|
+
en: A sent email that says something is attached but shows no attachment
|
|
37
38
|
example:
|
|
38
39
|
ja:
|
|
39
40
|
config: { genre: business/email }
|
|
40
41
|
before: |
|
|
42
|
+
差出人: 佐藤 一郎 <sato@example.com>
|
|
41
43
|
件名: 見積書の送付
|
|
42
44
|
|
|
43
45
|
いつもお世話になっております。見積書を添付しましたので、ご確認ください。
|
|
44
46
|
|
|
45
47
|
よろしくお願いいたします。
|
|
46
48
|
after: |
|
|
49
|
+
差出人: 佐藤 一郎 <sato@example.com>
|
|
47
50
|
件名: 見積書の送付
|
|
48
51
|
|
|
49
52
|
いつもお世話になっております。見積書を添付しましたので、ご確認ください。
|
|
@@ -54,6 +57,7 @@ example:
|
|
|
54
57
|
en:
|
|
55
58
|
config: { genre: business/email }
|
|
56
59
|
before: |
|
|
60
|
+
From: Ichiro Sato <ichiro@example.com>
|
|
57
61
|
Subject: Quote
|
|
58
62
|
|
|
59
63
|
Dear Ms Lee,
|
|
@@ -63,6 +67,7 @@ example:
|
|
|
63
67
|
Best regards,
|
|
64
68
|
Ichiro
|
|
65
69
|
after: |
|
|
70
|
+
From: Ichiro Sato <ichiro@example.com>
|
|
66
71
|
Subject: Quote
|
|
67
72
|
|
|
68
73
|
Dear Ms Lee,
|
|
@@ -74,8 +79,8 @@ example:
|
|
|
74
79
|
Best regards,
|
|
75
80
|
Ichiro
|
|
76
81
|
not_flagged:
|
|
77
|
-
ja:
|
|
78
|
-
en: 'Phrases that say nothing is attached ("no attachment") or that use the word for something else ("attached to the wall"), and mentions inside a quoted reply, are not counted. Only the email and letter genre runs this rule.'
|
|
82
|
+
ja: 「添付なし」「添付はありません」のような、付けていないと言う書き方と、引用した返信の中の「添付」は数えません。差出人や日時のヘッダーの無い下書きは見ません(添付は送るときに付けるため)。メール・手紙のジャンルでだけ見ます。
|
|
83
|
+
en: 'Phrases that say nothing is attached ("no attachment") or that use the word for something else ("attached to the wall"), and mentions inside a quoted reply, are not counted. A draft without a From: or Date: header is not checked (its files are attached when sending). Only the email and letter genre runs this rule.'
|
|
79
84
|
rewrite:
|
|
80
85
|
depth: light
|
|
81
86
|
ja:
|
|
@@ -3,6 +3,7 @@ layer: L1
|
|
|
3
3
|
status: stable
|
|
4
4
|
how_to_find: bold-label-list
|
|
5
5
|
requires: [markdown]
|
|
6
|
+
uses: [pos]
|
|
6
7
|
severity: info
|
|
7
8
|
|
|
8
9
|
name:
|
|
@@ -10,13 +11,18 @@ name:
|
|
|
10
11
|
en: Too many list items led by a bold label
|
|
11
12
|
|
|
12
13
|
why:
|
|
13
|
-
ja: 「- **速さ**:〜」のように、項目ごとに太字の札とコロンを置いて説明を続ける形です。「- **情報が古くなる。**
|
|
14
|
-
en: 'An item that opens with a bold label and a colon ("- **Speed**: ..."), or with a bold lead sentence ("- **Information gets out of date.** ..."), item after item. The labels make every item look like a heading of equal weight, and the links between the items go unwritten. A shape common in generated text.'
|
|
14
|
+
ja: 「- **速さ**:〜」のように、項目ごとに太字の札とコロンを置いて説明を続ける形です。「- **情報が古くなる。** 〜」のように、太字の一文で始めて説明を続ける形も同じです。札が並ぶと、どの項目も同じ重さの見出しに見え、項目どうしの繋がりは書かれません。段落ごとに「**利用は毎週伸びた**:〜」と、言い切りの太字で始めて説明を続ける形も同じです。生成文によく見られる形です。
|
|
15
|
+
en: 'An item that opens with a bold label and a colon ("- **Speed**: ..."), or with a bold lead sentence ("- **Information gets out of date.** ..."), item after item. The labels make every item look like a heading of equal weight, and the links between the items go unwritten. Paragraphs that each open with a bold statement ("**Usage grew each week**: ...") are the same shape. A shape common in generated text.'
|
|
15
16
|
|
|
16
17
|
message:
|
|
17
18
|
ja: 「{label}」など、太字の札で始まる項目が {count} 個あります({limit} 個から)
|
|
18
19
|
en: '"{label}" and other bold labels open {count} list items ({limit} needed)'
|
|
19
20
|
|
|
21
|
+
messages:
|
|
22
|
+
paragraphs:
|
|
23
|
+
ja: 「{label}」など、言い切りの太字で始まる段落が {count} 個あります({limit} 個から)
|
|
24
|
+
en: '"{label}" and other bold statements open {count} paragraphs ({limit} needed)'
|
|
25
|
+
|
|
20
26
|
how_to_fix:
|
|
21
27
|
ja: 札を外して、項目を文にしてください。大事な項目が 1 つ 2 つなら、それを段落で書き、残りは消すか 1 文にまとめます。用語集のように、本当に札と説明の組を並べるものはそのままでかまいません。
|
|
22
28
|
en: Drop the labels and write the items as sentences. If only one or two items matter, give them a paragraph and cut or merge the rest. A real glossary, where each label is the term being defined, can stay.
|
|
@@ -30,6 +36,12 @@ options:
|
|
|
30
36
|
about:
|
|
31
37
|
ja: 太字の一文で始まる項目(- **範囲を固定する。** 〜)だけで指摘する数。人の文書は手順や欄の名前に太字の札を 3 つ 4 つ並べることはあっても、太字の一文で始まる項目を並べることはほとんどありません
|
|
32
38
|
en: How many items opening with a bold lead sentence (- **Lock your ranges.** ...) report on their own. Human documents may give three or four steps or fields a bold label, but rarely make a list of bold lead sentences
|
|
39
|
+
min_clause_paragraphs:
|
|
40
|
+
kind: count
|
|
41
|
+
default: 3
|
|
42
|
+
about:
|
|
43
|
+
ja: 言い切りの太字(述語のある文。**利用は毎週伸びた**:〜)で始まる段落だけで指摘する数。人の文書の段落の頭の太字は、語だけのもの(**勤務時間**:)、動詞で始まるもの(英語の命令形 **Talk to the people:**)、問い(**読み手は誰か?**)がほとんどで、これらは数えません。品詞が読めないときは段落を数えません
|
|
44
|
+
en: "How many paragraphs opening with a bold statement (a clause with its own subject and verb, **Usage grew each week**: ...) report on their own. A human run-in head is a term (**Work schedule**:), an imperative (**Talk to the people:**) or a question (**Who is my audience?**), none of which count. Without part-of-speech tags, paragraphs are not counted"
|
|
33
45
|
|
|
34
46
|
use_for: [technical/readme, blog, business, legal, docs, academic, literature, speech]
|
|
35
47
|
off_for:
|
|
@@ -51,6 +63,8 @@ example:
|
|
|
51
63
|
before: |
|
|
52
64
|
# 新しい在庫システム
|
|
53
65
|
|
|
66
|
+
**新しいシステムが動き始めました。** 変わった点は次のとおりです。
|
|
67
|
+
|
|
54
68
|
- **速さ**:一覧が 1 秒で出ます。
|
|
55
69
|
- **正確さ**:数え間違いが減ります。
|
|
56
70
|
- **安さ**:月の費用が下がります。
|
|
@@ -66,6 +80,8 @@ example:
|
|
|
66
80
|
before: |
|
|
67
81
|
# Our new stock system
|
|
68
82
|
|
|
83
|
+
**The new system is live.** Here is what changed.
|
|
84
|
+
|
|
69
85
|
- **Speed**: the list loads in a second.
|
|
70
86
|
- **Accuracy**: fewer counting mistakes.
|
|
71
87
|
- **Cost**: the monthly bill is lower.
|
|
@@ -78,11 +94,11 @@ example:
|
|
|
78
94
|
The monthly bill is lower, and permissions can be split finely.
|
|
79
95
|
|
|
80
96
|
not_flagged:
|
|
81
|
-
ja: 札がコードだけの項目(`--flag`
|
|
82
|
-
en: An item whose label is only code (a list of options or fields) is not counted, nor is one whose bold ends in neither a colon nor a full stop (a bold opening word of a sentence), or that has no text after it. Specification (technical/spec), legal, documentation, academic and literary genres do not run this rule.
|
|
97
|
+
ja: 札がコードだけの項目(`--flag` の説明のような、設定や引数の一覧)は数えません。段落は、太字が言い切りの文のときだけ数え、語だけの太字・動詞で始まる太字(英語の命令形)・問いは数えません。札の後ろにコロンも句点も無い項目(太字が文の頭の語だけのもの)と、その後ろに何も無い項目も数えません。仕様書(technical/spec)・法務・説明書・論文・文学のジャンルでは見ません。
|
|
98
|
+
en: An item whose label is only code (a list of options or fields) is not counted, nor is one whose bold ends in neither a colon nor a full stop (a bold opening word of a sentence), or that has no text after it. A paragraph counts only when its bold is a statement, not a term, an imperative or a question. Specification (technical/spec), legal, documentation, academic and literary genres do not run this rule.
|
|
83
99
|
level_meaning:
|
|
84
|
-
ja: 太字の札で始まる項目が {limit} 個あれば指摘(太字の一文で始まる項目は min_leads の数から)
|
|
85
|
-
en: reported once {limit} list items open with a bold label (items opening with a bold lead sentence from min_leads)
|
|
100
|
+
ja: 太字の札で始まる項目が {limit} 個あれば指摘(太字の一文で始まる項目は min_leads、言い切りの太字で始まる段落は min_clause_paragraphs の数から)
|
|
101
|
+
en: reported once {limit} list items open with a bold label (items opening with a bold lead sentence from min_leads, paragraphs opening with a bold statement from min_clause_paragraphs)
|
|
86
102
|
rewrite:
|
|
87
103
|
depth: structure
|
|
88
104
|
ja:
|
|
@@ -44,8 +44,8 @@ example:
|
|
|
44
44
|
会議(定例)は月曜です。報告(月次)は金曜です。資料(最新版)を配ります。
|
|
45
45
|
|
|
46
46
|
not_flagged:
|
|
47
|
-
ja: 日本語の字に接する括弧だけを数え、丸括弧と角括弧は別々に比べます。Markdown のリンクは数えず、注の番号([1]、[^1])は注の番号どうしで、行の頭の番号や英字の札((1)、[Web])と、それを指す番号(4(2)
|
|
48
|
-
en: Only brackets touching Japanese text, parentheses and square brackets compared apart; Markdown links are not counted, and note markers ([1], [^1]) are compared only with each other, and so are the labels opening a line ((1), [Web]) and an item's address in the prose (4(2)で). Brackets in English text (f(x)), brackets in a formula (賃金 × (1 - 時間 ÷ 月平均)), code, 「」 quotations, the title of an outside page quoted by a link at a line's head (- [Title (draft)](https://…)) and the document's own heading quoted in a line of other words (a self-citation) are not counted.
|
|
47
|
+
ja: 日本語の字に接する括弧だけを数え、丸括弧と角括弧は別々に比べます。Markdown のリンクは数えず、注の番号([1]、[^1])は注の番号どうしで、行の頭の番号や英字の札((1)、[Web])と、それを指す番号(4(2)で)は、それどうしで、本文が引く注の番号(注(24)で)は注の番号の引用どうしで比べます。英語の中の括弧(f(x)、API(s))、式の括弧(賃金 × (1 - 時間 ÷ 月平均))、コード、鉤括弧で引いたものの中、行の頭のリンクで引いた外のページの題名(- [題名 (版)](https://…))、文書が自分の見出しを文献として引いた所(著者. 題名(略称)の動向. 誌名.)は数えません。
|
|
48
|
+
en: Only brackets touching Japanese text, parentheses and square brackets compared apart; Markdown links are not counted, and note markers ([1], [^1]) are compared only with each other, and so are the labels opening a line ((1), [Web]) and an item's address in the prose (4(2)で), and a note's number cited in the prose (注(24)で) with the other cited note numbers. Brackets in English text (f(x)), brackets in a formula (賃金 × (1 - 時間 ÷ 月平均)), code, 「」 quotations, the title of an outside page quoted by a link at a line's head (- [Title (draft)](https://…)) and the document's own heading quoted in a line of other words (a self-citation) are not counted.
|
|
49
49
|
level_meaning:
|
|
50
50
|
ja: 少ないほうの書き方が {limit} 箇所あれば指摘
|
|
51
51
|
en: reported once the less common way appears {limit} times
|
|
@@ -46,8 +46,8 @@ example:
|
|
|
46
46
|
We introduced a new procedure. This was meant to cut the work. The procedure reduced overtime, and the reduction should continue next month.
|
|
47
47
|
|
|
48
48
|
not_flagged:
|
|
49
|
-
ja: 段落が変われば数え直します。「それぞれ」のように一語になったもの、接続詞の「そして」、話を切り替える「それはとにかく」「それはさておき」は数えません。英語では、「This Agreement」「This section」のように文書そのものを指す書き出しと、「It is worth」「It seems」のように後ろを指す It
|
|
50
|
-
en: The count restarts at each paragraph. Words such as それぞれ, the conjunction そして, and phrases that change the subject (それはとにかく, それはさておき) are not counted. In English, an opening that names the document itself ("This Agreement", "This section") and an "it" that stands for what follows ("It is worth", "It seems") are not counted.
|
|
49
|
+
ja: 段落が変われば数え直します。「それぞれ」のように一語になったもの、接続詞の「そして」、話を切り替える「それはとにかく」「それはさておき」は数えません。英語では、「This Agreement」「This section」のように文書そのものを指す書き出しと、「It is worth」「It seems」「It was not until」のように後ろを指す It は数えません。続く文がまた It で始まるときは、前の文と同じものを指し続けているので、その連なりを一文と数えます。
|
|
50
|
+
en: The count restarts at each paragraph. Words such as それぞれ, the conjunction そして, and phrases that change the subject (それはとにかく, それはさておき) are not counted. In English, an opening that names the document itself ("This Agreement", "This section") and an "it" that stands for what follows ("It is worth", "It seems", "It was not until") are not counted. Sentences that open with "It" one after another keep pointing at what the first did, so the chain counts once.
|
|
51
51
|
level_meaning:
|
|
52
52
|
ja: 指示語で始まる文 {limit} 文の連続まで
|
|
53
53
|
en: up to {limit} such sentences in a row
|
package/rules/emoji-density.yaml
CHANGED
|
@@ -47,8 +47,8 @@ example:
|
|
|
47
47
|
The new feature is live 🎉 Try it today, and tell us what you think.
|
|
48
48
|
|
|
49
49
|
not_flagged:
|
|
50
|
-
ja: 短い文書(日本語 500 字、英語 200
|
|
51
|
-
en: Documents under 200 words are not measured.
|
|
50
|
+
ja: 短い文書(日本語 500 字、英語 200 語より短いもの)は測りません。語と語の間の矢印(設定→プリンター、Settings → Printers)はメニューの道筋や流れを示す区切りなので数えません。行頭の矢印は数えます。
|
|
51
|
+
en: Documents under 200 words are not measured. An arrow between two words (Settings → Printers) marks a menu path or a flow and is not counted; an arrow opening a line is.
|
|
52
52
|
level_meaning:
|
|
53
53
|
ja: 1000 字あたり絵文字 {limit} 個まで
|
|
54
54
|
en: up to {limit} emoji per 1000 words
|
package/rules/empty-section.yaml
CHANGED
|
@@ -70,5 +70,5 @@ example:
|
|
|
70
70
|
Fit the parts.
|
|
71
71
|
|
|
72
72
|
not_flagged:
|
|
73
|
-
ja:
|
|
74
|
-
en: A heading followed by a deeper heading (a section split into subsections) is not reported. It runs on Markdown only.
|
|
73
|
+
ja: すぐ後ろに深い見出しが来る節(小さな節に分けたもの)は指しません。同じ深さの見出しでも、番号が節の下の番号(3. の後の 3.1、4. の後の (1))なら同じです。Markdown の文書でだけ動きます。
|
|
74
|
+
en: A heading followed by a deeper heading (a section split into subsections) is not reported, nor one followed by a heading of the same depth numbered under it (3. then 3.1, 4. then (1)). It runs on Markdown only.
|
|
@@ -46,8 +46,8 @@ example:
|
|
|
46
46
|
申込は2024年4月10日までです。説明会は2024年4月3日と2024年4月5日に開きます。
|
|
47
47
|
|
|
48
48
|
not_flagged:
|
|
49
|
-
ja: 鉤括弧で引いたもの、項目と注の番号(「1.」「(1)」「※1」)、箇条書きの頭の番号、版の番号の続き(TLS1.2 の 2)、注や URL を含む文、文書の頭の日付の行(更新日:令和7年9月27日)、番号の札(TEL:03…)、アポストロフィでつないだ英字の語のかけら(Van't Hoff の t)は数えません。小文字を含む半角の英語の語(AI for Science の for と Science
|
|
50
|
-
en: Quotations in brackets, item and note numbers (1., (1), ※1), a number at the head of a list item, the rest of a version number (the 2 of TLS1.2), a date line at the head of the document (更新日:令和7年9月27日), the label of a number (TEL:03…), a piece of a word joined by an apostrophe (the t of Van't Hoff), and notes or sentences with a URL are not counted. A half-width English word with lower case (the for and Science of AI for Science) counts toward the document's way of writing letters but is never reported itself, since English words stay half-width even where acronyms are full-width. Single letters, words, single digits and longer numbers are compared separately, so "one digit full-width, more digits half-width" counts as consistent. A number grouped in thousands (5,500) is one number, so its 5 is not a single digit. Nor is the item number of an annual securities report (4【経営者による…】) counted. Digits inside numbers of table cells run together (8,45795.7 for 8,457 and 95.7) count toward the document's way of writing but are never reported, since the cell boundary cannot be seen and the 8 cannot be read as a single digit. Where the usual way of writing words rests on one word alone (BAR), a different word (DELICATE) is not reported as the minority; the same word written the other way (BAR) still is. Neither way is called right.
|
|
49
|
+
ja: 鉤括弧で引いたもの、項目と注の番号(「1.」「(1)」「※1」)、箇条書きの頭の番号、版の番号の続き(TLS1.2 の 2)、注や URL を含む文、文書の頭の日付の行(更新日:令和7年9月27日)、番号の札(TEL:03…)、アポストロフィでつないだ英字の語のかけら(Van't Hoff の t)は数えません。小文字を含む半角の英語の語(AI for Science の for と Science)は、英字の書き方の票には入れますが、少ないほうとしては指摘しません。英語の語は、略語を全角で書く文書でも半角で書くためです。英字一字・英字の語・数字一字・数字の並びは別々に比べるので、「1桁は全角、2桁以上は半角」はそろっていると見ます。英字一字と数字を違う幅で書いた並び(Q5、H30)は、Q と 5 に分けてそれぞれの組で数えます。ほかの混ざった並び(IoT)は数えません。三桁ごとに区切った数(5,500)は一つの数で、5 を一桁の数とは数えません。有価証券報告書の項目の番号(4【経営者による…】)も数えません。表のセルの数字が続いてしまったもの(8,457 と 95.7 の 8,45795.7)の中の並びは、書き方の票には入れますが、少ないほうとしては指摘しません。セルの切れ目が見えず、8 を一桁の数と読めないためです。全角の英字の語が一つの語(BAR)しかない文書では、別の語(DELICATE)を少ないほうとして指摘しません(同じ語を半角で書いた BAR は指摘します)。どちらの書き方が正しいかは決めません。
|
|
50
|
+
en: Quotations in brackets, item and note numbers (1., (1), ※1), a number at the head of a list item, the rest of a version number (the 2 of TLS1.2), a date line at the head of the document (更新日:令和7年9月27日), the label of a number (TEL:03…), a piece of a word joined by an apostrophe (the t of Van't Hoff), and notes or sentences with a URL are not counted. A half-width English word with lower case (the for and Science of AI for Science) counts toward the document's way of writing letters but is never reported itself, since English words stay half-width even where acronyms are full-width. Single letters, words, single digits and longer numbers are compared separately, so "one digit full-width, more digits half-width" counts as consistent. A single letter and a number written in different widths (Q5, H30) are split, and Q and 5 each count in their own group; other mixed runs (IoT) are not counted. A number grouped in thousands (5,500) is one number, so its 5 is not a single digit. Nor is the item number of an annual securities report (4【経営者による…】) counted. Digits inside numbers of table cells run together (8,45795.7 for 8,457 and 95.7) count toward the document's way of writing but are never reported, since the cell boundary cannot be seen and the 8 cannot be read as a single digit. Where the usual way of writing words rests on one word alone (BAR), a different word (DELICATE) is not reported as the minority; the same word written the other way (BAR) still is. Neither way is called right.
|
|
51
51
|
level_meaning:
|
|
52
52
|
ja: 少ないほうが組の {limit}% 以下のとき指摘
|
|
53
53
|
en: reported when the minority form is {limit}% of its group or less
|
|
@@ -9,8 +9,8 @@ name:
|
|
|
9
9
|
en: Look-alike character
|
|
10
10
|
|
|
11
11
|
why:
|
|
12
|
-
ja: 部首の字(⼈ U+2F08)や互換漢字は、ふつうの「人」と同じに見えて別の字です。濁点を別の字にした「か+゛」(macOS
|
|
13
|
-
en: "A Kangxi radical (⼈ U+2F08) looks like the ordinary 人 and is another character; so is a CJK compatibility ideograph. A letter written as a base and a separate combining mark (e + U+0301, common in macOS file names and text copied from them) looks like é and is another sequence. Search, sorting, dictionaries and spelling checks all miss them, and the reader cannot see what to fix. They come from PDF copies and input methods. Code is checked too."
|
|
12
|
+
ja: 部首の字(⼈ U+2F08)や互換漢字は、ふつうの「人」と同じに見えて別の字です。濁点を別の字にした「か+゛」(macOS のファイル名や、そこからコピーした文に多い)も、「が」と同じに見えて別の並びです。カタカナの間の全角ハイフン「-」やマイナス「−」(ニュ-ス)も、長音の「ー」に見えて別の字です。どれも検索、並べ替え、辞書引き、表記の照合から漏れ、読み手には直す所が見えません。PDF からのコピーや、入力の変換で入ります。コードの中も見ます。
|
|
13
|
+
en: "A Kangxi radical (⼈ U+2F08) looks like the ordinary 人 and is another character; so is a CJK compatibility ideograph. A letter written as a base and a separate combining mark (e + U+0301, common in macOS file names and text copied from them) looks like é and is another sequence. A full-width hyphen or a minus between katakana (ニュ-ス) looks like the long-vowel mark ー and is another character. Search, sorting, dictionaries and spelling checks all miss them, and the reader cannot see what to fix. They come from PDF copies and input methods. Code is checked too."
|
|
14
14
|
|
|
15
15
|
message:
|
|
16
16
|
ja: 「{written}」({code})は「{usual}」と同じに見える別の字です
|
|
@@ -29,6 +29,9 @@ messages:
|
|
|
29
29
|
spacing-mark:
|
|
30
30
|
ja: 「{written}」は濁点・半濁点を別の字で書いています({code})。一字の「{usual}」と書きます
|
|
31
31
|
en: '"{written}" writes the voicing mark as a separate character ({code}), not the single letter "{usual}"'
|
|
32
|
+
dash:
|
|
33
|
+
ja: 「{written}」({code})はダッシュの字です。カタカナの長音は「{usual}」と書きます
|
|
34
|
+
en: '"{written}" ({code}) is a dash, not the katakana long-vowel mark "{usual}"'
|
|
32
35
|
|
|
33
36
|
how_to_fix:
|
|
34
37
|
ja: その字を消して、ふつうの字を打ち直してください。文書全体を NFC に正規化しても直ります(部首の字は NFKC)。
|
|
@@ -40,7 +43,7 @@ use_for: [business, technical, blog, legal, docs, academic, literature, speech]
|
|
|
40
43
|
|
|
41
44
|
group: slips
|
|
42
45
|
summary:
|
|
43
|
-
ja:
|
|
46
|
+
ja: 部首の字(⼈)、互換漢字、分かれた濁点(か+゛)、長音に見えるダッシュ(ニュ-ス)など、同じに見える別の字
|
|
44
47
|
en: A character that looks like an ordinary one but is a different one
|
|
45
48
|
example:
|
|
46
49
|
ja:
|
|
@@ -53,8 +56,8 @@ example:
|
|
|
53
56
|
Send the form to the café office.
|
|
54
57
|
|
|
55
58
|
not_flagged:
|
|
56
|
-
ja: 一字にまとまる形の無い組み合わせ(字に付いた異体字の指定、合成済みの形の無いアクセント)と、Unicode が別の字として持つ互換漢字(﨑
|
|
57
|
-
en: Combinations with no single precomposed form (a variation selector after a character, an accent with no precomposed letter) and compatibility ideographs that Unicode keeps as their own characters (﨑) are not reported. Nor is a look-alike on a line that talks about such characters (decomposed, Kangxi, NFD), or on the line just before or after one, as it is an example shown on purpose.
|
|
59
|
+
ja: 一字にまとまる形の無い組み合わせ(字に付いた異体字の指定、合成済みの形の無いアクセント)と、Unicode が別の字として持つ互換漢字(﨑 など)は指しません。カタカナの間でも半角の「-」は、型や範囲をつなぐ字(<アルゴリズム>-<ハッシュ>、ァ-ヶ)なので指しません。字そのものを話題にした語(濁点、部首、長音、NFD など)が同じ行かすぐ前・すぐ後ろの行にある字(「ホ゜ケット のような、コピペで出る濁点のチェック」)は、見せるために書いた例なので指しません。
|
|
60
|
+
en: Combinations with no single precomposed form (a variation selector after a character, an accent with no precomposed letter) and compatibility ideographs that Unicode keeps as their own characters (﨑) are not reported. A half-width - between katakana joins the parts of a template or a range (<アルゴリズム>-<ハッシュ>, ァ-ヶ) and is not reported. Nor is a look-alike on a line that talks about such characters (decomposed, Kangxi, NFD), or on the line just before or after one, as it is an example shown on purpose.
|
|
58
61
|
sources: [textlint-ja-presets]
|
|
59
62
|
rewrite:
|
|
60
63
|
depth: light
|
|
@@ -17,6 +17,8 @@ uses: [pos]
|
|
|
17
17
|
# 文書が単独で使う法令・制度の名前(政治資金規正法)と、法令が名に取った語(愛玩動物看護師法の「愛玩動物看護師」)は、連なりの中でも割る。
|
|
18
18
|
# 職名(kanji-known-word)のすぐ前か後ろの人の姓と名も割る。元号の付いた年(令和元年)と、仮名へ続く接続の語の漢字(及び の「及」)は外す。
|
|
19
19
|
# 連なりの中ほどの list-suffix(高齢運転者等専用駐車区間の「等」)は語の終わりを見せるので、そこでも割る。
|
|
20
|
+
# すぐ後ろに designation-phrase(として認定)が続く連なりは、制度が決めた区分の名前なので数えない。
|
|
21
|
+
# 句点の無い一行が「〜の」と notice-title-ending(お知らせ、ご案内)で終われば、「の」の前の連なりは送り手が付けた題の名前なので数えない。
|
|
20
22
|
extra_word_lists:
|
|
21
23
|
[
|
|
22
24
|
prefecture-unit,
|
|
@@ -30,6 +32,8 @@ extra_word_lists:
|
|
|
30
32
|
reference-prefix,
|
|
31
33
|
list-suffix,
|
|
32
34
|
kanji-known-word,
|
|
35
|
+
designation-phrase,
|
|
36
|
+
notice-title-ending,
|
|
33
37
|
]
|
|
34
38
|
languages: [ja]
|
|
35
39
|
severity: info
|
|
@@ -25,7 +25,7 @@ levels: { strict: 40, normal: 30, relaxed: 20 }
|
|
|
25
25
|
options:
|
|
26
26
|
min_paragraphs:
|
|
27
27
|
kind: count
|
|
28
|
-
default:
|
|
28
|
+
default: 9
|
|
29
29
|
about:
|
|
30
30
|
ja: 測る段落の数の下限。段落が少ないと長さのばらつきは偶然で小さく出て、人の書いた文書でも揃って見えます
|
|
31
31
|
en: The fewest paragraphs measured. With few paragraphs, the variation is small by chance, and a person's writing looks uniform too
|
|
@@ -56,6 +56,12 @@ example:
|
|
|
56
56
|
|
|
57
57
|
そのあとで、記録を残します。どの設定を変えたかを、仲間が読める場所に書き留めてください。
|
|
58
58
|
|
|
59
|
+
さらに、通知を整えます。届く知らせの種類を選んで、要らないものは止めてください。
|
|
60
|
+
|
|
61
|
+
また、表示を見直します。文字の大きさと色の組み合わせを、読みやすい形に変えてください。
|
|
62
|
+
|
|
63
|
+
念のため、控えを取ります。書き出しの画面から、今の設定を一つのファイルに保存してください。
|
|
64
|
+
|
|
59
65
|
最後に、動きを確かめます。試しの文書を一つ置いて、指摘が画面に出ることを見てください。
|
|
60
66
|
after: |
|
|
61
67
|
最初に、道具を手元に入れます。
|
|
@@ -68,6 +74,12 @@ example:
|
|
|
68
74
|
|
|
69
75
|
そのあとで、記録を残します。どの設定を変えたかを、仲間が読める場所に書き留めてください。変えた理由も一言添えておくと、半年後の自分が助かります。
|
|
70
76
|
|
|
77
|
+
さらに、通知を整えます。
|
|
78
|
+
|
|
79
|
+
また、表示を見直します。文字の大きさと色の組み合わせを、読みやすい形に変えてください。
|
|
80
|
+
|
|
81
|
+
念のため、控えを取ります。
|
|
82
|
+
|
|
71
83
|
最後に、動きを確かめます。試しの文書を一つ置いて、指摘が画面に出ることを見てください。
|
|
72
84
|
en:
|
|
73
85
|
config: { genre: blog/tech }
|
|
@@ -82,6 +94,12 @@ example:
|
|
|
82
94
|
|
|
83
95
|
Then, write it down. Note which settings you changed in a place where your team can read it.
|
|
84
96
|
|
|
97
|
+
Next, set up notifications. Choose which alerts you want and turn off the ones you do not need.
|
|
98
|
+
|
|
99
|
+
Also, adjust the display. Change the text size and the colors to a pair that is easy to read.
|
|
100
|
+
|
|
101
|
+
To be safe, save a copy. Export the current settings from the backup page and keep the file.
|
|
102
|
+
|
|
85
103
|
Finally, check that it works. Add a sample document and look for the findings on the screen.
|
|
86
104
|
after: |
|
|
87
105
|
First, install the tool.
|
|
@@ -94,11 +112,17 @@ example:
|
|
|
94
112
|
|
|
95
113
|
Then, write it down. Note which settings you changed in a place where your team can read it. Add a line on why, too; it will help you in six months.
|
|
96
114
|
|
|
115
|
+
Next, set up notifications.
|
|
116
|
+
|
|
117
|
+
Also, adjust the display. Change the text size and the colors to a pair that is easy to read.
|
|
118
|
+
|
|
119
|
+
To be safe, save a copy.
|
|
120
|
+
|
|
97
121
|
Finally, check that it works. Add a sample document and look for the findings on the screen.
|
|
98
122
|
|
|
99
123
|
not_flagged:
|
|
100
|
-
ja: 段落が
|
|
101
|
-
en: Documents with fewer than
|
|
124
|
+
ja: 段落が 9 より少ない文書は見ません(min_paragraphs で変えられます)。ビジネス文書と技術文書のジャンルでは見ません。
|
|
125
|
+
en: Documents with fewer than 9 paragraphs are not checked (min_paragraphs changes it). Business and technical genres do not run this rule.
|
|
102
126
|
level_meaning:
|
|
103
127
|
ja: 段落の長さのばらつきが {limit}% 未満なら指摘
|
|
104
128
|
en: reported when paragraph length varies by less than {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. 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.
|
|
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. A sentence that opens with a label ([通信関連], 化学品事業……) starts a new item of a list and does not continue the run before it.
|
|
48
48
|
level_meaning:
|
|
49
49
|
ja: 同じ文末の文が {limit} 文続くまで
|
|
50
50
|
en: up to {limit} sentences in a row with the same ending
|
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 項目とは数えません。どの項目も「受付: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."
|
|
125
|
+
ja: 箇条書きが 1 つしかない文書は見ません。5 つより少なければ、1 つで割合が大きく動くので、全部が 3 項目のときだけ指摘します。本文の最初の文より前の箇条書き(題と日付のすぐ下の要点の箱)は、項目の数をサイトの型が決めているので数えません。すぐ下の行が「など」で始まる箇条書きは、書いた 3 つのほかにもあると言っているので、3 項目とは数えません。どの項目も「受付:2鉢」「家賃:8万円」のように札の後ろに数を書いた箇条書きは、数の内訳で項目の数は中身が決めているので、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. 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. Nor is a list whose every item runs to three sentences or more (a bold tip and the sentences that explain it): each item is a paragraph, and the list is a set of developed tips. 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
|
|
@@ -43,8 +43,8 @@ example:
|
|
|
43
43
|
We met. We talked. We agreed. We left.
|
|
44
44
|
|
|
45
45
|
not_flagged:
|
|
46
|
-
ja: ピリオド・疑問符・感嘆符で終わる文と、同じ行で続く次の文のあいだだけを見ます。行末の空白(Markdown
|
|
47
|
-
en: Only the space after a sentence ending in a period, question or exclamation mark, before the next sentence on the same line. Spaces at the end of a line (a Markdown line break) are not counted.
|
|
46
|
+
ja: ピリオド・疑問符・感嘆符で終わる文と、同じ行で続く次の文のあいだだけを見ます。行末の空白(Markdown の改行)は見ません。詩の連の中で一行に二つの文が並ぶときの間(I'm nobody! Who are you?)と、著者欄のように項目名(Affiliation:)の前の空白も見ません。
|
|
47
|
+
en: Only the space after a sentence ending in a period, question or exclamation mark, before the next sentence on the same line. Spaces at the end of a line (a Markdown line break) are not counted, nor a pause inside a verse line of a poem ("I'm nobody! Who are you?"), nor the space before a field's label ("Affiliation:") in an author block.
|
|
48
48
|
level_meaning:
|
|
49
49
|
ja: 少ないほうの空け方が {limit} 箇所あれば指摘
|
|
50
50
|
en: reported once the less common spacing appears {limit} times
|
package/rules/teki-overuse.yaml
CHANGED
|
@@ -27,6 +27,8 @@ how_to_fix:
|
|
|
27
27
|
levels: { strict: 1, normal: 2, relaxed: 3 }
|
|
28
28
|
|
|
29
29
|
use_for: [business, technical, blog, legal, docs, academic, literature, speech]
|
|
30
|
+
off_for:
|
|
31
|
+
literature/essay: "An essay's wording is the author's register: piled-up 〜的 words carry the essayist's argument and voice, and are not a slip to fix."
|
|
30
32
|
|
|
31
33
|
group: wording
|
|
32
34
|
summary:
|
|
@@ -43,5 +43,5 @@ example:
|
|
|
43
43
|
We can meet on Friday 9 October to go through the quote.
|
|
44
44
|
|
|
45
45
|
not_flagged:
|
|
46
|
-
ja: "文の中で例として置いた「○○」とビジネス文書以外の「○○」、行頭の「○」(箇条書きの印)、Markdown のリンク、脚注の番号、チェック欄とチェックリストの項目(- [ ] TODO: …)、値が続く見出しの札(【氏名】山田)、大文字でない「Optional:」と行の途中の OPTIONAL、コードとコードのコメント(// TODO)、文の中の「未定」(日程は未定です)、見出しが雛形と言う節(「## 雛形」「#
|
|
47
|
-
en: 'Markdown links and reference definitions, footnote numbers, checkboxes and checklist items ("- [ ] TODO: …"), a label its value follows ("[Date]: 2024-04-01"), "Optional:" not in capitals and OPTIONAL inside a line, code and code comments ("// TODO"), "TBD" inside a sentence ("the date is TBD"), and blanks under a heading that names a template ("## Template", "# Sample letter") are not reported. Nor is a Japanese example mark (○○) inside a sentence or outside a business document.'
|
|
46
|
+
ja: "文の中で例として置いた「○○」とビジネス文書以外の「○○」、行頭の「○」(箇条書きの印)、Markdown のリンク、脚注の番号、チェック欄とチェックリストの項目(- [ ] TODO: …)、値が続く見出しの札(【氏名】山田)、大文字でない「Optional:」と行の途中の OPTIONAL、コードとコードのコメント(// TODO)、文の中の「未定」(日程は未定です)、見出しが雛形と言う節(「## 雛形」「# 記入例」)の中の空欄、文書がほかの行で値を書き入れている書式の欄の名前(【氏名】 山田 花子 とある文書の「【氏名】に旧氏を書く」)、記入線の横の札(____ [Name of New Employer])、例を示す行のかぎ括弧の中(例:「【会社名】の田中です」)も指しません。"
|
|
47
|
+
en: 'Markdown links and reference definitions, footnote numbers, checkboxes and checklist items ("- [ ] TODO: …"), a label its value follows ("[Date]: 2024-04-01"), "Optional:" not in capitals and OPTIONAL inside a line, code and code comments ("// TODO"), "TBD" inside a sentence ("the date is TBD"), and blanks under a heading that names a template ("## Template", "# Sample letter") are not reported. Nor are a field label of a form that the document fills in on another line (【氏名】 followed by a name), the caption beside a line to write on ("________ [Name of New Employer]"), and a blank inside a quoted example ("Helpful: “See the link [insert link name] below the image”"). Nor is a Japanese example mark (○○) inside a sentence or outside a business document.'
|
|
@@ -50,8 +50,8 @@ example:
|
|
|
50
50
|
This agreement is between Harbour Ltd (the "Seller") and Hill Ltd (the "Buyer"). The Seller ships within five days.
|
|
51
51
|
|
|
52
52
|
not_flagged:
|
|
53
|
-
ja: 定義の条(「X」とは…をいう)で定義した語は、前で使っても言いません。定義の条は文書の頭にも終わりにも置く書き方があるためです。規約やポリシーの丁寧な形(以下「X」といいます)も、法令の形と同じに読みます。見出しの行(章・節の行、条の前の「(買主の義務)」のような見出し)の語と、漢字で終わる語にさらに漢字が続く長い語(「監査委員会」の「監査委員」)と、定義の括弧の前の長い名前をそのまま書いた所(「…作成の手引き(以下「手引き」という。)」より前の「…作成の手引き」)は、使った所に数えません。最初の一か所だけを指します。別の語を定義する括弧の前の名前の中(This Services Agreement (this "Agreement") の Services、本サービス利用契約(以下「本契約」という。)の本サービス)も、使った所に数えません。目次・索引の行(目次の見出しの下の項目、一行に詰めた目次、定義した語と条の番地の一覧)と、条の番号の後ろの題(Section 1.1 Closing.)と、番号と語の終わりに条の番地の括弧を添えただけの札((1)文化芸術推進基本計画(第7条関係))と、語を含むもっと長い名前(定義の括弧の前の名前を前で写した株式会社みなと、もっと長い定義した語、Navistar Financial Corporation)も数えません。文書自身の名前と定義した語に同じ頭を付けた所(この就業規則(以下「規則」)より前の「この規則」)と、すぐ後ろの括弧に定義の長い名前を書き添えた所は、読み手に分かるので言いません。要約の節(「要旨」「裁判要旨」「Summary」のような見出しの下)で、定義がその節の外にある語と、番号と題だけの項目の行((2)本件仮換地の指定等)は、本文を縮めたり名前を付けたりした所なので数えません。番地や法令の名前に続けて語の意味の出どころを書いた所(69条の3
|
|
54
|
-
en: Terms defined in a definitions clause ("X" means ...) are not checked, since a definitions clause may come first or last. A heading line (a chapter or section line, or the caption above an article) does not count as a use, nor does a longer word that runs on in kanji past a term ending in kanji, nor an earlier copy of the long name written just before the definition's bracket. The polite Japanese form (以下「X」といいます) is read like the statute form. Only the first early use is pointed at. A word inside the name written right before another term's defining bracket (Services in This Services Agreement (this "Agreement")) is not a use either. Nor are contents and index lines (the items under a contents heading, a table of contents or a list of defined terms and section numbers packed on one line), a caption after a section number (Section 1.1 Closing.), a label of a number and the term ending in a bracketed section reference ((a) Seller (Section 2)), or a longer name that holds the term, such as an earlier copy of the name before the bracket (Board of Directors before our Board of Directors ("Board")), a longer defined term, a capitalised name ending in it (Navistar Financial Corporation). The document naming itself (this Agreement before (this "Agreement")) and a use followed by the long name in brackets are clear to the reader and not pointed at. A use in a summary section (under a heading such as Summary, Syllabus or 裁判要旨) of a term defined outside it, and a numbered line that only names the section below ((2) Interim Land Designation) summarise or name the body, so they are not uses either.
|
|
53
|
+
ja: 定義の条(「X」とは…をいう)で定義した語は、前で使っても言いません。定義の条は文書の頭にも終わりにも置く書き方があるためです。規約やポリシーの丁寧な形(以下「X」といいます)も、法令の形と同じに読みます。見出しの行(章・節の行、条の前の「(買主の義務)」のような見出し)の語と、漢字で終わる語にさらに漢字が続く長い語(「監査委員会」の「監査委員」)と、定義の括弧の前の長い名前をそのまま書いた所(「…作成の手引き(以下「手引き」という。)」より前の「…作成の手引き」)は、使った所に数えません。最初の一か所だけを指します。別の語を定義する括弧の前の名前の中(This Services Agreement (this "Agreement") の Services、本サービス利用契約(以下「本契約」という。)の本サービス)も、使った所に数えません。目次・索引の行(目次の見出しの下の項目、一行に詰めた目次、定義した語と条の番地の一覧)と、条の番号の後ろの題(Section 1.1 Closing.)と、番号と語の終わりに条の番地の括弧を添えただけの札((1)文化芸術推進基本計画(第7条関係))と、語を含むもっと長い名前(定義の括弧の前の名前を前で写した株式会社みなと、もっと長い定義した語、Navistar Financial Corporation)も数えません。文書自身の名前と定義した語に同じ頭を付けた所(この就業規則(以下「規則」)より前の「この規則」)と、すぐ後ろの括弧に定義の長い名前を書き添えた所は、読み手に分かるので言いません。要約の節(「要旨」「裁判要旨」「Summary」のような見出しの下)で、定義がその節の外にある語と、番号と題だけの項目の行((2)本件仮換地の指定等)は、本文を縮めたり名前を付けたりした所なので数えません。番地や法令の名前に続けて語の意味の出どころを書いた所(69条の3所定の小規模宅地等)も数えません。「はじめに」「序論」の節は後の本文が定義することを先に名指す所なので、要約の節と同じに読みます。他の法令を引き写した節(見出しがその法令の名前で、文書がほかでその法令を引いている)の条の中の定義は、その法令の定義で、この文書の語の定義としては読みません。英語の語を大文字の長い名前の終わりに書いた所(The National Security Act of 1947)より後ろの the Act は、その名前を指すので数えません。
|
|
54
|
+
en: Terms defined in a definitions clause ("X" means ...) are not checked, since a definitions clause may come first or last. A heading line (a chapter or section line, or the caption above an article) does not count as a use, nor does a longer word that runs on in kanji past a term ending in kanji, nor an earlier copy of the long name written just before the definition's bracket. The polite Japanese form (以下「X」といいます) is read like the statute form. Only the first early use is pointed at. A word inside the name written right before another term's defining bracket (Services in This Services Agreement (this "Agreement")) is not a use either. Nor are contents and index lines (the items under a contents heading, a table of contents or a list of defined terms and section numbers packed on one line), a caption after a section number (Section 1.1 Closing.), a label of a number and the term ending in a bracketed section reference ((a) Seller (Section 2)), or a longer name that holds the term, such as an earlier copy of the name before the bracket (Board of Directors before our Board of Directors ("Board")), a longer defined term, a capitalised name ending in it (Navistar Financial Corporation). The document naming itself (this Agreement before (this "Agreement")) and a use followed by the long name in brackets are clear to the reader and not pointed at. A use in a summary section (under a heading such as Summary, Syllabus or 裁判要旨) of a term defined outside it, and a numbered line that only names the section below ((2) Interim Land Designation) summarise or name the body, so they are not uses either. An introduction (a heading that is the whole of Introduction, Preface or Foreword) names ahead what the body defines and is read like a summary. A definition inside an article copied from another statute (under a heading that names a document the text cites elsewhere) is that statute's, not this document's. After a longer capitalised name ending in the term (The National Security Act of 1947), "the Act" points back to that name and is not an early use.
|
|
55
55
|
rewrite:
|
|
56
56
|
depth: structure
|
|
57
57
|
ja:
|
|
@@ -41,11 +41,15 @@ export const headLabel = (text: string): { readonly label: string; readonly leng
|
|
|
41
41
|
|
|
42
42
|
export type AbstractSpan = { readonly label: number; readonly body: Span };
|
|
43
43
|
|
|
44
|
-
type Words = { readonly abstracts: ReadonlySet<string>; readonly sections: ReadonlySet<string> };
|
|
44
|
+
type Words = { readonly abstracts: ReadonlySet<string>; readonly sections: ReadonlySet<string>; readonly bookends: ReadonlySet<string> };
|
|
45
|
+
|
|
46
|
+
/** The lexicon group of a section that only opens or closes a text (はじめに, おわりに), which an essay has as well as a paper. */
|
|
47
|
+
const BOOKEND = "bookend";
|
|
45
48
|
|
|
46
49
|
const wordsOf = (doc: ProseDocument): Words => {
|
|
47
|
-
const set = (id: string): ReadonlySet<string> =>
|
|
48
|
-
|
|
50
|
+
const set = (id: string, group?: string): ReadonlySet<string> =>
|
|
51
|
+
new Set((doc.lexicons[id] ?? []).filter((entry) => group === undefined || entry.group === group).map((entry) => entry.pattern.toLowerCase()));
|
|
52
|
+
return { abstracts: set("abstract-heading"), sections: set("paper-section-heading"), bookends: set("paper-section-heading", BOOKEND) };
|
|
49
53
|
};
|
|
50
54
|
|
|
51
55
|
/** Abstracts under a heading of their own: the text up to the next heading. */
|
|
@@ -75,11 +79,17 @@ export const abstractsOf = (doc: ProseDocument): AbstractSpan[] => {
|
|
|
75
79
|
return found.filter((abstract, index) => found.findIndex((other) => other.label === abstract.label) === index);
|
|
76
80
|
};
|
|
77
81
|
|
|
78
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* The first heading that names a paper's section, when there are MIN_SECTIONS of them and one is more than an opening or a
|
|
84
|
+
* closing; undefined otherwise. An article with only はじめに and おわりに around its own sections is an essay or a review,
|
|
85
|
+
* which carries no abstract.
|
|
86
|
+
*/
|
|
79
87
|
export const firstSectionHeading = (doc: ProseDocument): number | undefined => {
|
|
80
88
|
const words = wordsOf(doc);
|
|
81
|
-
const
|
|
82
|
-
|
|
89
|
+
const labels = (doc.markup?.headings ?? []).map((heading) => ({ start: heading.start, label: labelOf(heading.text) }));
|
|
90
|
+
const sections = labels.filter(({ label }) => words.sections.has(label));
|
|
91
|
+
const hasBody = sections.some(({ label }) => !words.bookends.has(label));
|
|
92
|
+
return sections.length >= MIN_SECTIONS && hasBody ? sections[0]?.start : undefined;
|
|
83
93
|
};
|
|
84
94
|
|
|
85
95
|
type Measure = { readonly size: number; readonly limit: number | undefined; readonly unit: LengthUnit };
|
|
@@ -22,5 +22,27 @@ const followsVolitional = (at: number, tokens: readonly Token[]): boolean => {
|
|
|
22
22
|
/** A が with only punctuation after it (思えるんですが……。) softens the sentence's end; it joins no second clause. */
|
|
23
23
|
const endsSentence = (at: number, tokens: readonly Token[]): boolean => tokens.slice(at + 1).every((token) => isSpace(token) || CLOSING_POS.has(token.pos));
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const NOMINAL_POS: ReadonlySet<string> = new Set(["NOUN", "PRON", "PROPN"]);
|
|
26
|
+
|
|
27
|
+
const isNominal = (token: Token | undefined): boolean => token !== undefined && NOMINAL_POS.has(token.pos);
|
|
28
|
+
const isComma = (token: Token | undefined): boolean => token?.surface === "、" || token?.surface === ",";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A Kyushu dialect topic しや (あんたしやが, ムツシユウしやが): the parser reads a verb し with no particle after a bare noun,
|
|
32
|
+
* then が as conjunctive; the が marks the noun.
|
|
33
|
+
*/
|
|
34
|
+
const followsDialectTopic = (at: number, tokens: readonly Token[]): boolean => {
|
|
35
|
+
const [noun, verb, auxiliary] = [tokens[at - 3], tokens[at - 2], tokens[at - 1]];
|
|
36
|
+
return isNominal(noun) && verb?.surface === "し" && verb.pos === "VERB" && auxiliary?.surface === "や" && auxiliary.pos === "AUX";
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** A copula cut from its noun by a comma (恋、では無いが): the writer takes back the word just said; no clause is contrasted. */
|
|
40
|
+
const takesBackWord = (at: number, tokens: readonly Token[]): boolean => {
|
|
41
|
+
const comma = tokens.findLastIndex((token, index) => index < at && isComma(token));
|
|
42
|
+
const [copula, topic] = [tokens[comma + 1], tokens[comma + 2]];
|
|
43
|
+
return comma > 0 && isNominal(tokens[comma - 1]) && copula?.surface === "で" && copula.pos === "AUX" && topic?.surface === "は";
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** The conjunctive が at `at` contrasts two clauses: not a volitional's concession, not a softened end, not a misread particle. */
|
|
47
|
+
export const isContrastiveGa = (at: number, tokens: readonly Token[]): boolean =>
|
|
48
|
+
!followsVolitional(at, tokens) && !endsSentence(at, tokens) && !followsDialectTopic(at, tokens) && !takesBackWord(at, tokens);
|