chaffjs 0.39.0 → 0.40.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 +3 -2
- package/README.md +2 -1
- package/dist/ai-score/human-shares.d.ts.map +1 -1
- package/dist/ai-score/human-shares.js +1 -0
- package/dist/ai-score/human-shares.js.map +1 -1
- package/dist/alternative-words.d.ts +6 -0
- package/dist/alternative-words.d.ts.map +1 -1
- package/dist/alternative-words.js +10 -0
- package/dist/alternative-words.js.map +1 -1
- package/dist/closing-code.d.ts +8 -0
- package/dist/closing-code.d.ts.map +1 -0
- package/dist/closing-code.js +18 -0
- package/dist/closing-code.js.map +1 -0
- package/dist/date-format.d.ts +19 -1
- package/dist/date-format.d.ts.map +1 -1
- package/dist/date-format.js +41 -5
- package/dist/date-format.js.map +1 -1
- package/dist/detectors/acronym-context.d.ts +1 -1
- package/dist/detectors/acronym-context.d.ts.map +1 -1
- package/dist/detectors/acronym-context.js +3 -2
- package/dist/detectors/acronym-context.js.map +1 -1
- package/dist/detectors/acronym-mention.d.ts +5 -0
- package/dist/detectors/acronym-mention.d.ts.map +1 -1
- package/dist/detectors/acronym-mention.js +16 -0
- package/dist/detectors/acronym-mention.js.map +1 -1
- package/dist/detectors/acronym-name.d.ts +5 -0
- package/dist/detectors/acronym-name.d.ts.map +1 -1
- package/dist/detectors/acronym-name.js +15 -0
- package/dist/detectors/acronym-name.js.map +1 -1
- package/dist/detectors/blank-runs.d.ts +12 -0
- package/dist/detectors/blank-runs.d.ts.map +1 -0
- package/dist/detectors/blank-runs.js +27 -0
- package/dist/detectors/blank-runs.js.map +1 -0
- package/dist/detectors/bold-label.d.ts +3 -1
- package/dist/detectors/bold-label.d.ts.map +1 -1
- package/dist/detectors/bold-label.js +16 -6
- package/dist/detectors/bold-label.js.map +1 -1
- package/dist/detectors/capitalised-term.d.ts.map +1 -1
- package/dist/detectors/capitalised-term.js +28 -9
- package/dist/detectors/capitalised-term.js.map +1 -1
- package/dist/detectors/citation-string.d.ts +6 -0
- package/dist/detectors/citation-string.d.ts.map +1 -1
- package/dist/detectors/citation-string.js +52 -0
- package/dist/detectors/citation-string.js.map +1 -1
- package/dist/detectors/contraction-emphasis.d.ts +3 -0
- package/dist/detectors/contraction-emphasis.d.ts.map +1 -0
- package/dist/detectors/contraction-emphasis.js +24 -0
- package/dist/detectors/contraction-emphasis.js.map +1 -0
- package/dist/detectors/contraction-mention.d.ts +12 -1
- package/dist/detectors/contraction-mention.d.ts.map +1 -1
- package/dist/detectors/contraction-mention.js +39 -6
- package/dist/detectors/contraction-mention.js.map +1 -1
- package/dist/detectors/contraction-mix.d.ts +3 -0
- package/dist/detectors/contraction-mix.d.ts.map +1 -0
- package/dist/detectors/contraction-mix.js +69 -0
- package/dist/detectors/contraction-mix.js.map +1 -0
- package/dist/detectors/date-format.d.ts.map +1 -1
- package/dist/detectors/date-format.js +13 -1
- package/dist/detectors/date-format.js.map +1 -1
- package/dist/detectors/duplicate-definition.d.ts +3 -0
- package/dist/detectors/duplicate-definition.d.ts.map +1 -0
- package/dist/detectors/duplicate-definition.js +16 -0
- package/dist/detectors/duplicate-definition.js.map +1 -0
- package/dist/detectors/final-period-captions.d.ts +15 -0
- package/dist/detectors/final-period-captions.d.ts.map +1 -0
- package/dist/detectors/final-period-captions.js +61 -0
- package/dist/detectors/final-period-captions.js.map +1 -0
- package/dist/detectors/heading-sentences.d.ts +10 -0
- package/dist/detectors/heading-sentences.d.ts.map +1 -0
- package/dist/detectors/heading-sentences.js +32 -0
- package/dist/detectors/heading-sentences.js.map +1 -0
- package/dist/detectors/lexicon.d.ts +1 -2
- package/dist/detectors/lexicon.d.ts.map +1 -1
- package/dist/detectors/lexicon.js +5 -55
- package/dist/detectors/lexicon.js.map +1 -1
- package/dist/detectors/list-lead-in.d.ts +1 -1
- package/dist/detectors/list-lead-in.d.ts.map +1 -1
- package/dist/detectors/list-lead-in.js +31 -10
- package/dist/detectors/list-lead-in.js.map +1 -1
- package/dist/detectors/missing-final-period.d.ts.map +1 -1
- package/dist/detectors/missing-final-period.js +3 -1
- package/dist/detectors/missing-final-period.js.map +1 -1
- package/dist/detectors/numbering-readings.d.ts +2 -2
- package/dist/detectors/numbering-readings.d.ts.map +1 -1
- package/dist/detectors/numbering-readings.js +7 -0
- package/dist/detectors/numbering-readings.js.map +1 -1
- package/dist/detectors/open-end-anaphor.d.ts +8 -0
- package/dist/detectors/open-end-anaphor.d.ts.map +1 -0
- package/dist/detectors/open-end-anaphor.js +22 -0
- package/dist/detectors/open-end-anaphor.js.map +1 -0
- package/dist/detectors/open-end-lead.d.ts +4 -0
- package/dist/detectors/open-end-lead.d.ts.map +1 -0
- package/dist/detectors/open-end-lead.js +34 -0
- package/dist/detectors/open-end-lead.js.map +1 -0
- package/dist/detectors/open-end-scope.d.ts.map +1 -1
- package/dist/detectors/open-end-scope.js +7 -1
- package/dist/detectors/open-end-scope.js.map +1 -1
- package/dist/detectors/ordinal-run-gaps.d.ts +1 -0
- package/dist/detectors/ordinal-run-gaps.d.ts.map +1 -1
- package/dist/detectors/ordinal-run-gaps.js +1 -1
- package/dist/detectors/ordinal-run-gaps.js.map +1 -1
- package/dist/detectors/orthographic-variant-open.d.ts +4 -2
- package/dist/detectors/orthographic-variant-open.d.ts.map +1 -1
- package/dist/detectors/orthographic-variant-open.js +5 -3
- package/dist/detectors/orthographic-variant-open.js.map +1 -1
- package/dist/detectors/orthography.d.ts.map +1 -1
- package/dist/detectors/orthography.js +14 -5
- package/dist/detectors/orthography.js.map +1 -1
- package/dist/detectors/placeholder-text.d.ts.map +1 -1
- package/dist/detectors/placeholder-text.js +14 -2
- package/dist/detectors/placeholder-text.js.map +1 -1
- package/dist/detectors/quote-without-source.d.ts +6 -2
- package/dist/detectors/quote-without-source.d.ts.map +1 -1
- package/dist/detectors/quote-without-source.js +33 -8
- package/dist/detectors/quote-without-source.js.map +1 -1
- package/dist/detectors/register-separate-part.d.ts +7 -0
- package/dist/detectors/register-separate-part.d.ts.map +1 -0
- package/dist/detectors/register-separate-part.js +32 -0
- package/dist/detectors/register-separate-part.js.map +1 -0
- package/dist/detectors/registry/contraction-mix.js +1 -1
- package/dist/detectors/registry/contraction-mix.js.map +1 -1
- package/dist/detectors/registry/duplicate-definition.js +1 -1
- package/dist/detectors/registry/duplicate-definition.js.map +1 -1
- package/dist/detectors/reproduced-text.d.ts +5 -0
- package/dist/detectors/reproduced-text.d.ts.map +1 -0
- package/dist/detectors/reproduced-text.js +19 -0
- package/dist/detectors/reproduced-text.js.map +1 -0
- package/dist/detectors/request-owner.d.ts +2 -1
- package/dist/detectors/request-owner.d.ts.map +1 -1
- package/dist/detectors/request-owner.js +31 -7
- package/dist/detectors/request-owner.js.map +1 -1
- package/dist/detectors/requirement-smell.d.ts.map +1 -1
- package/dist/detectors/requirement-smell.js +16 -5
- package/dist/detectors/requirement-smell.js.map +1 -1
- package/dist/detectors/sentence-counts.d.ts +2 -1
- package/dist/detectors/sentence-counts.d.ts.map +1 -1
- package/dist/detectors/sentence-counts.js +23 -7
- package/dist/detectors/sentence-counts.js.map +1 -1
- package/dist/detectors/sentence-ending.d.ts +1 -0
- package/dist/detectors/sentence-ending.d.ts.map +1 -1
- package/dist/detectors/sentence-ending.js +5 -2
- 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 +13 -3
- package/dist/detectors/sentence-length.js.map +1 -1
- package/dist/detectors/sentence-parts.d.ts +2 -0
- package/dist/detectors/sentence-parts.d.ts.map +1 -1
- package/dist/detectors/sentence-parts.js +3 -1
- package/dist/detectors/sentence-parts.js.map +1 -1
- package/dist/detectors/signals.d.ts.map +1 -1
- package/dist/detectors/signals.js +6 -4
- package/dist/detectors/signals.js.map +1 -1
- package/dist/detectors/spelling-variety.d.ts.map +1 -1
- package/dist/detectors/spelling-variety.js +20 -2
- package/dist/detectors/spelling-variety.js.map +1 -1
- package/dist/detectors/structure-tree.d.ts +2 -1
- package/dist/detectors/structure-tree.d.ts.map +1 -1
- package/dist/detectors/structure-tree.js +2 -7
- package/dist/detectors/structure-tree.js.map +1 -1
- package/dist/detectors/structure.d.ts.map +1 -1
- package/dist/detectors/structure.js +19 -5
- package/dist/detectors/structure.js.map +1 -1
- package/dist/detectors/token-shape.d.ts.map +1 -1
- package/dist/detectors/token-shape.js +12 -6
- package/dist/detectors/token-shape.js.map +1 -1
- package/dist/detectors/undefined-term.d.ts +5 -0
- package/dist/detectors/undefined-term.d.ts.map +1 -1
- package/dist/detectors/undefined-term.js +22 -1
- package/dist/detectors/undefined-term.js.map +1 -1
- package/dist/detectors/unfilled-placeholder.d.ts.map +1 -1
- package/dist/detectors/unfilled-placeholder.js +15 -1
- package/dist/detectors/unfilled-placeholder.js.map +1 -1
- package/dist/detectors/unknown-word-context.d.ts +7 -0
- package/dist/detectors/unknown-word-context.d.ts.map +1 -1
- package/dist/detectors/unknown-word-context.js +11 -0
- package/dist/detectors/unknown-word-context.js.map +1 -1
- package/dist/detectors/unknown-word.d.ts.map +1 -1
- package/dist/detectors/unknown-word.js +5 -4
- package/dist/detectors/unknown-word.js.map +1 -1
- package/dist/latin-spacing-source.d.ts +12 -0
- package/dist/latin-spacing-source.d.ts.map +1 -0
- package/dist/latin-spacing-source.js +25 -0
- package/dist/latin-spacing-source.js.map +1 -0
- package/dist/name-separator.d.ts.map +1 -1
- package/dist/name-separator.js +4 -1
- package/dist/name-separator.js.map +1 -1
- package/dist/paragraph-length.d.ts +14 -0
- package/dist/paragraph-length.d.ts.map +1 -1
- package/dist/paragraph-length.js +25 -0
- package/dist/paragraph-length.js.map +1 -1
- package/dist/paragraph-runs.d.ts +2 -2
- package/dist/paragraph-runs.d.ts.map +1 -1
- package/dist/paragraph-runs.js +65 -14
- package/dist/paragraph-runs.js.map +1 -1
- package/dist/quote-echo.d.ts +6 -0
- package/dist/quote-echo.d.ts.map +1 -0
- package/dist/quote-echo.js +14 -0
- package/dist/quote-echo.js.map +1 -0
- package/dist/semantic.d.ts.map +1 -1
- package/dist/semantic.js +2 -2
- package/dist/semantic.js.map +1 -1
- package/dist/set-phrase-particles.d.ts +4 -0
- package/dist/set-phrase-particles.d.ts.map +1 -0
- package/dist/set-phrase-particles.js +26 -0
- package/dist/set-phrase-particles.js.map +1 -0
- package/dist/structure/alternative-clause.d.ts +7 -0
- package/dist/structure/alternative-clause.d.ts.map +1 -1
- package/dist/structure/alternative-clause.js +23 -8
- package/dist/structure/alternative-clause.js.map +1 -1
- package/dist/structure/cited-document-section.d.ts +2 -0
- package/dist/structure/cited-document-section.d.ts.map +1 -1
- package/dist/structure/cited-document-section.js +8 -0
- package/dist/structure/cited-document-section.js.map +1 -1
- package/dist/structure/issues.d.ts +3 -1
- package/dist/structure/issues.d.ts.map +1 -1
- package/dist/structure/issues.js +12 -8
- package/dist/structure/issues.js.map +1 -1
- package/dist/structure/numbering.d.ts +10 -1
- package/dist/structure/numbering.d.ts.map +1 -1
- package/dist/structure/numbering.js +41 -4
- package/dist/structure/numbering.js.map +1 -1
- package/dist/structure/unread-label.d.ts +13 -0
- package/dist/structure/unread-label.d.ts.map +1 -0
- package/dist/structure/unread-label.js +70 -0
- package/dist/structure/unread-label.js.map +1 -0
- package/dist/topic-clause.d.ts.map +1 -1
- package/dist/topic-clause.js +15 -2
- package/dist/topic-clause.js.map +1 -1
- package/package.json +3 -3
- package/rules/ai-generated-composite.yaml +1 -0
- package/rules/ai-tell.yaml +6 -2
- package/rules/bold-label-list.yaml +6 -6
- package/rules/closing-cliche.yaml +2 -2
- package/rules/colon-lead-in.yaml +2 -2
- package/rules/contraction-consistency.yaml +2 -2
- package/rules/date-format-consistency.yaml +2 -2
- package/rules/duplicate-definition.yaml +2 -2
- package/rules/honesty-marker.yaml +84 -0
- package/rules/latin-spacing.yaml +6 -4
- package/rules/max-paragraph-length.yaml +2 -2
- package/rules/max-sentence-length.yaml +4 -2
- package/rules/missing-final-period.yaml +2 -2
- package/rules/no-doubled-joshi.yaml +2 -2
- package/rules/no-mixed-desumasu.yaml +2 -2
- package/rules/nominalization.yaml +1 -1
- package/rules/numbering-gap.yaml +2 -2
- package/rules/one-sentence-paragraph-run.yaml +2 -2
- package/rules/orthographic-variant.yaml +2 -2
- package/rules/quote-without-source.yaml +2 -2
- package/rules/request-without-deadline.yaml +2 -2
- package/rules/requirement-smell.yaml +2 -2
- package/rules/spelling-consistency.yaml +4 -4
- package/rules/teki-overuse.yaml +2 -2
- package/rules/topic-predicate-distance.yaml +2 -2
- package/rules/undefined-acronym.yaml +3 -2
- package/rules/undefined-term.yaml +2 -2
- package/rules/unfilled-placeholder.yaml +2 -2
- package/rules/unknown-word.yaml +2 -2
- package/skills/chaff/SKILL.md +2 -1
- package/src/ai-score/human-shares.ts +1 -0
- package/src/alternative-words.ts +15 -0
- package/src/closing-code.ts +21 -0
- package/src/date-format.ts +54 -7
- package/src/detectors/acronym-context.ts +3 -2
- package/src/detectors/acronym-mention.ts +17 -0
- package/src/detectors/acronym-name.ts +18 -0
- package/src/detectors/blank-runs.ts +30 -0
- package/src/detectors/bold-label.ts +22 -6
- package/src/detectors/capitalised-term.ts +36 -9
- package/src/detectors/citation-string.ts +57 -0
- package/src/detectors/contraction-emphasis.ts +46 -0
- package/src/detectors/contraction-mention.ts +52 -6
- package/src/detectors/contraction-mix.ts +94 -0
- package/src/detectors/date-format.ts +18 -2
- package/src/detectors/duplicate-definition.ts +21 -0
- package/src/detectors/final-period-captions.ts +78 -0
- package/src/detectors/heading-sentences.ts +36 -0
- package/src/detectors/lexicon.ts +5 -61
- package/src/detectors/list-lead-in.ts +44 -10
- package/src/detectors/missing-final-period.ts +9 -1
- package/src/detectors/numbering-readings.ts +10 -2
- package/src/detectors/open-end-anaphor.ts +31 -0
- package/src/detectors/open-end-lead.ts +46 -0
- package/src/detectors/open-end-scope.ts +8 -1
- package/src/detectors/ordinal-run-gaps.ts +1 -1
- package/src/detectors/orthographic-variant-open.ts +8 -3
- package/src/detectors/orthography.ts +20 -7
- package/src/detectors/placeholder-text.ts +21 -4
- package/src/detectors/quote-without-source.ts +52 -10
- package/src/detectors/register-separate-part.ts +42 -0
- package/src/detectors/registry/contraction-mix.ts +1 -1
- package/src/detectors/registry/duplicate-definition.ts +1 -1
- package/src/detectors/reproduced-text.ts +33 -0
- package/src/detectors/request-owner.ts +31 -8
- package/src/detectors/requirement-smell.ts +21 -5
- package/src/detectors/sentence-counts.ts +27 -7
- package/src/detectors/sentence-ending.ts +6 -2
- package/src/detectors/sentence-length.ts +18 -3
- package/src/detectors/sentence-parts.ts +4 -1
- package/src/detectors/signals.ts +7 -4
- package/src/detectors/spelling-variety.ts +26 -2
- package/src/detectors/structure-tree.ts +2 -8
- package/src/detectors/structure.ts +22 -6
- package/src/detectors/token-shape.ts +16 -6
- package/src/detectors/undefined-term.ts +26 -1
- package/src/detectors/unfilled-placeholder.ts +20 -2
- package/src/detectors/unknown-word-context.ts +17 -0
- package/src/detectors/unknown-word.ts +15 -4
- package/src/latin-spacing-source.ts +33 -0
- package/src/name-separator.ts +4 -1
- package/src/paragraph-length.ts +31 -0
- package/src/paragraph-runs.ts +71 -13
- package/src/quote-echo.ts +18 -0
- package/src/semantic.ts +2 -3
- package/src/set-phrase-particles.ts +32 -0
- package/src/structure/alternative-clause.ts +32 -7
- package/src/structure/cited-document-section.ts +8 -0
- package/src/structure/issues.ts +19 -9
- package/src/structure/numbering.ts +50 -3
- package/src/structure/unread-label.ts +74 -0
- package/src/topic-clause.ts +16 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbering.d.ts","sourceRoot":"","sources":["../../src/structure/numbering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"numbering.d.ts","sourceRoot":"","sources":["../../src/structure/numbering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAWnE;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAIhI;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAA;CAAE,CAAC;AA0GhH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,aAAa,EACnB,SAAQ,SAAS,IAAI,EAAO,EAC5B,aAAY,CAAC,IAAI,EAAE,aAAa,KAAK,OAAqB,EAC1D,UAAS,cAA2B,EACpC,QAAO,YAAuB,KAC7B,cAAc,EAiBhB,CAAC"}
|
|
@@ -2,8 +2,10 @@ import { inDocumentOrder } from "./issues.js";
|
|
|
2
2
|
import { numbersQuotedInside } from "./quoted-number.js";
|
|
3
3
|
import { isVersionHistory } from "./version-order.js";
|
|
4
4
|
import { withRepeatsNamed } from "./repeated-number.js";
|
|
5
|
+
import { labelWrittenBetween } from "./unread-label.js";
|
|
5
6
|
const labelOf = (node) => String(node.attrs["label"] ?? node.address);
|
|
6
7
|
const NO_CLAUSES = { isAlternative: () => false, restarts: [] };
|
|
8
|
+
const NO_SKIPS = { source: "", isPartialHeading: () => false };
|
|
7
9
|
const OPENING_BRACKET = /^[([{〔【〈《]/u;
|
|
8
10
|
/** 括弧で囲んだ番号((1)、(a))か。全角と半角は同じに見る。 */
|
|
9
11
|
const isBracketed = (label) => OPENING_BRACKET.test(label.normalize("NFKC"));
|
|
@@ -54,7 +56,7 @@ const unreadBetween = (unread, previous, current) => (unread[firstStartingAfter(
|
|
|
54
56
|
* 隣り合う二つの番号が、1 つ進んでいなければ指摘する。同じ番号なら重なり、飛べば抜け。
|
|
55
57
|
* あいだに読めなかった範囲(unread)があれば、抜けた番号はそこにあるかもしれないので言わない。重なりは言う。
|
|
56
58
|
*/
|
|
57
|
-
const breaksIn = (unread, restarts) => (sequence) => sequence.flatMap((current, index) => {
|
|
59
|
+
const breaksIn = (unread, restarts, isSkipAllowed) => (sequence) => sequence.flatMap((current, index) => {
|
|
58
60
|
const previous = sequence[index - 1];
|
|
59
61
|
// 1 に戻ったら新しい並び。一つの条に (a)(b) の箇条書きが二つある、附則が第1条から振り直す、のどちらも誤りではない。
|
|
60
62
|
// 範囲をまとめた行(第四十三条から第五十五条まで)の次は、範囲の最後から数える。
|
|
@@ -66,6 +68,8 @@ const breaksIn = (unread, restarts) => (sequence) => sequence.flatMap((current,
|
|
|
66
68
|
return [];
|
|
67
69
|
if (current.ordinal > previous.last + 1 && current.ordinal <= previous.last + 1 + current.sideSteps)
|
|
68
70
|
return [];
|
|
71
|
+
if (current.ordinal > previous.last + 1 && isSkipAllowed(previous, current))
|
|
72
|
+
return [];
|
|
69
73
|
return [
|
|
70
74
|
{
|
|
71
75
|
offset: current.node.span.start,
|
|
@@ -73,6 +77,30 @@ const breaksIn = (unread, restarts) => (sequence) => sequence.flatMap((current,
|
|
|
73
77
|
},
|
|
74
78
|
];
|
|
75
79
|
});
|
|
80
|
+
/** 抜粋と書いた見出し(## 根拠条文の抜粋)の下の節点。そこの番号は選んで引いたので、飛んでよい。 */
|
|
81
|
+
const underPartialHeadings = (tree, isPartialHeading) => {
|
|
82
|
+
const under = new Set();
|
|
83
|
+
const pending = [[tree, false]];
|
|
84
|
+
while (pending.length > 0) {
|
|
85
|
+
const [node, inherited] = pending.pop() ?? [tree, false];
|
|
86
|
+
const heading = node.attrs["heading"];
|
|
87
|
+
const partial = inherited || (node.kind === "section" && typeof heading === "string" && isPartialHeading(heading));
|
|
88
|
+
if (partial)
|
|
89
|
+
under.add(node);
|
|
90
|
+
node.children.forEach((child) => pending.push([child, partial]));
|
|
91
|
+
}
|
|
92
|
+
return under;
|
|
93
|
+
};
|
|
94
|
+
/** 並びの始まりの番号。番号は 1 から振る(法令の項は 2 から)。 */
|
|
95
|
+
const LAST_START = 2;
|
|
96
|
+
/**
|
|
97
|
+
* 番号が一つしかなく、それが並びの始まりでない並び(用語集の見出し Section 508 Program、Section 508 Program Manager)は
|
|
98
|
+
* 名前で、番号の並びではない。法令の「2」「2」と続く項(第 1 項は番号が無い)は重なり。
|
|
99
|
+
*/
|
|
100
|
+
const isOneNumber = (sequence) => {
|
|
101
|
+
const [first] = sequence;
|
|
102
|
+
return first !== undefined && sequence.length > 1 && first.ordinal > LAST_START && sequence.every((ordered) => ordered.ordinal === first.ordinal);
|
|
103
|
+
};
|
|
76
104
|
/**
|
|
77
105
|
* 番号の抜けと重なり。比べるのは同じ親の子どうしだけ。英米の法令は章ごとに Section 101、201 と百の位を変えるので、
|
|
78
106
|
* 文書全体の通し番号として比べると抜けに見える。最初の番号は見ない。日本語の項は 2 から番号を振る。
|
|
@@ -83,14 +111,23 @@ const breaksIn = (unread, restarts) => (sequence) => sequence.flatMap((current,
|
|
|
83
111
|
* unread は、読み手には見えるが木に入らない範囲(Markdown の HTML ブロックの中の文字)を、始まりの順に並べたもの。
|
|
84
112
|
* isSideStep は、番号の代わりに「and」と書いた手順(前の手順と並べて行う)。その数だけ、次の番号は飛んでよい。
|
|
85
113
|
* clauses は、別案の条(並びに入れない)と、番号を空けた条の位置(そこから振り直す)。
|
|
114
|
+
* skips は、抜けを言わない場合: 抜けた番号を木が読まずに本文に書いてある((e) の前の行末の (d))か、抜粋と書いた見出しの下。
|
|
86
115
|
*/
|
|
87
|
-
export const numberingBreaks = (tree, unread = [], isSideStep = () => false, clauses = NO_CLAUSES) => {
|
|
116
|
+
export const numberingBreaks = (tree, unread = [], isSideStep = () => false, clauses = NO_CLAUSES, skips = NO_SKIPS) => {
|
|
88
117
|
const quoting = numbersQuotedInside(tree);
|
|
89
118
|
const restarts = clauses.restarts.map((start) => ({ start, end: start }));
|
|
119
|
+
const partial = underPartialHeadings(tree, skips.isPartialHeading);
|
|
120
|
+
const spanOf = (ordered) => ({
|
|
121
|
+
label: labelOf(ordered.node),
|
|
122
|
+
ordinal: ordered.ordinal,
|
|
123
|
+
start: ordered.node.span.start,
|
|
124
|
+
last: ordered.last,
|
|
125
|
+
});
|
|
126
|
+
const isSkipAllowed = (previous, current) => partial.has(current.node) || labelWrittenBetween(skips.source, spanOf(previous), spanOf(current));
|
|
90
127
|
const breaks = inDocumentOrder(tree)
|
|
91
128
|
.flatMap((parent) => sequencesOf(parent, quoting, isSideStep, clauses))
|
|
92
|
-
.filter((sequence) => !isVersionHistory(sequence.map((ordered) => labelOf(ordered.node))))
|
|
93
|
-
.flatMap(breaksIn(unread, restarts));
|
|
129
|
+
.filter((sequence) => !isVersionHistory(sequence.map((ordered) => labelOf(ordered.node))) && !isOneNumber(sequence))
|
|
130
|
+
.flatMap(breaksIn(unread, restarts, isSkipAllowed));
|
|
94
131
|
return withRepeatsNamed(tree, quoting, breaks, unread);
|
|
95
132
|
};
|
|
96
133
|
//# sourceMappingURL=numbering.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbering.js","sourceRoot":"","sources":["../../src/structure/numbering.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAuB,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,OAAO,GAAG,CAAC,IAAmB,EAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;AAW7F,MAA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AAC,OAAgB,EAAmE,EAAE,CAAC,CAAC;QACrG,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;QAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;QAC9B,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAC,CAAC;IACH,MAAM,aAAa,GAAG,CAAC,QAAiB,EAAE,OAAgB,EAAW,EAAE,CACrE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,mBAAmB,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACpG,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC;SACjC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;SACtE,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;SACnH,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IACtD,OAAO,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACzD,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type LabelSpan = {
|
|
2
|
+
readonly label: string;
|
|
3
|
+
readonly ordinal: number;
|
|
4
|
+
readonly start: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Whether the text between two numbered nodes sets out a label of the later one's kind with a number the skip leaves out
|
|
8
|
+
* (between previous's last number and current's), which the tree did not read as a node.
|
|
9
|
+
*/
|
|
10
|
+
export declare const labelWrittenBetween: (source: string, previous: LabelSpan & {
|
|
11
|
+
readonly last: number;
|
|
12
|
+
}, current: LabelSpan) => boolean;
|
|
13
|
+
//# sourceMappingURL=unread-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unread-label.d.ts","sourceRoot":"","sources":["../../src/structure/unread-label.ts"],"names":[],"mappings":"AAuDA,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAErG;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,EAAE,UAAU,SAAS,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,SAAS,SAAS,KAAG,OAYzH,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// A number the tree did not read but the text writes: "(d)" run into the end of the line before "(e)", "6.1" and "6.2"
|
|
2
|
+
// written as plain paragraphs before the "6.3" the tree read, "(11)" joined to the heading of "(10)". A skip across such
|
|
3
|
+
// a label is not a missing number. Pure.
|
|
4
|
+
const LETTERS = "abcdefghijklmnopqrstuvwxyz";
|
|
5
|
+
/** At most this many missing numbers are looked for; a wider skip is not a few labels the tree missed. */
|
|
6
|
+
const MAX_MISSING = 30;
|
|
7
|
+
/** A label in brackets ((11)): in the heading before, a bare number may be any number in its words. */
|
|
8
|
+
const BRACKETED = /^[([]/u;
|
|
9
|
+
/** An HTML comment: text the reader does not see, so a label in it is not written. */
|
|
10
|
+
const HTML_COMMENT = /<!--[\s\S]*?-->/gu;
|
|
11
|
+
const escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
|
|
12
|
+
/** The label written with another number in place of its own: digits for digits, a letter in the same case for a letter. */
|
|
13
|
+
const relabel = (label, ordinal) => {
|
|
14
|
+
const digits = [...label.matchAll(/\d+/gu)].findLast((match) => Number(match[0]) === ordinal);
|
|
15
|
+
if (digits !== undefined)
|
|
16
|
+
return (other) => `${label.slice(0, digits.index)}${other}${label.slice(digits.index + digits[0].length)}`;
|
|
17
|
+
const letter = [...label.matchAll(/(?<![A-Za-z])[A-Za-z](?![A-Za-z])/gu)].findLast((match) => LETTERS.indexOf(match[0].toLowerCase()) + 1 === ordinal);
|
|
18
|
+
if (letter === undefined)
|
|
19
|
+
return undefined;
|
|
20
|
+
const upper = letter[0] !== letter[0].toLowerCase();
|
|
21
|
+
return (other) => {
|
|
22
|
+
const written = LETTERS.charAt(other - 1);
|
|
23
|
+
return `${label.slice(0, letter.index)}${upper ? written.toUpperCase() : written}${label.slice(letter.index + 1)}`;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* A label set out as one: at the start of a line behind the same marks as the later label (## for a heading, none for a
|
|
28
|
+
* paragraph), after a run of spaces within a line, or after a space in the heading that opens the node before
|
|
29
|
+
* ("##### (10) … (11) …", a label in brackets). A label in a sentence or in an HTML comment ("under clause (d)") is a reference, and a list item's "3." under
|
|
30
|
+
* headings numbered "## 4." is another numbering.
|
|
31
|
+
*/
|
|
32
|
+
const setOutIn = (text, label, lead) => {
|
|
33
|
+
const escaped = escapeRegExp(label);
|
|
34
|
+
const after = String.raw `(?![0-9A-Za-z])`;
|
|
35
|
+
const atLineStart = new RegExp(String.raw `^[ \t]*${escapeRegExp(lead)}[ \t]*${escaped}${after}`, "mu");
|
|
36
|
+
const afterSpaces = new RegExp(String.raw `\S[ \t]{2,}${escaped}${after}`, "u");
|
|
37
|
+
if (atLineStart.test(text) || afterSpaces.test(text))
|
|
38
|
+
return true;
|
|
39
|
+
const firstLine = text.split("\n", 1)[0] ?? "";
|
|
40
|
+
const bracketed = BRACKETED.test(label);
|
|
41
|
+
return bracketed && firstLine.trimStart().startsWith("#") && new RegExp(String.raw `\s${escaped}${after}`, "u").test(firstLine);
|
|
42
|
+
};
|
|
43
|
+
/** The marks before a label on its own line (## of a heading, > of a quotation), spaces left out. */
|
|
44
|
+
const leadOf = (source, start, label) => {
|
|
45
|
+
const lineStart = source.lastIndexOf("\n", start - 1) + 1;
|
|
46
|
+
const lineEnd = source.indexOf("\n", start);
|
|
47
|
+
const line = source.slice(lineStart, lineEnd === -1 ? source.length : lineEnd).normalize("NFKC");
|
|
48
|
+
const at = line.indexOf(label);
|
|
49
|
+
return at === -1 ? "" : line.slice(0, at).trim();
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Whether the text between two numbered nodes sets out a label of the later one's kind with a number the skip leaves out
|
|
53
|
+
* (between previous's last number and current's), which the tree did not read as a node.
|
|
54
|
+
*/
|
|
55
|
+
export const labelWrittenBetween = (source, previous, current) => {
|
|
56
|
+
const missing = current.ordinal - previous.last - 1;
|
|
57
|
+
if (missing < 1 || missing > MAX_MISSING || current.start <= previous.start)
|
|
58
|
+
return false;
|
|
59
|
+
const label = current.label.normalize("NFKC");
|
|
60
|
+
const written = relabel(label, current.ordinal);
|
|
61
|
+
if (written === undefined)
|
|
62
|
+
return false;
|
|
63
|
+
const lead = leadOf(source, current.start, label);
|
|
64
|
+
const text = source
|
|
65
|
+
.slice(source.lastIndexOf("\n", previous.start - 1) + 1, current.start)
|
|
66
|
+
.replaceAll(HTML_COMMENT, "")
|
|
67
|
+
.normalize("NFKC");
|
|
68
|
+
return Array.from({ length: missing }, (_, index) => written(previous.last + 1 + index)).some((missingLabel) => setOutIn(text, missingLabel, lead));
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=unread-label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unread-label.js","sourceRoot":"","sources":["../../src/structure/unread-label.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,yHAAyH;AACzH,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,CAAC,MAAM,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACxC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,MAAM;SAChB,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC;SACtE,UAAU,CAAC,YAAY,EAAE,EAAE,CAAC;SAC5B,SAAS,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;AACtJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topic-clause.d.ts","sourceRoot":"","sources":["../src/topic-clause.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AA8HzC,qIAAqI;AACrI,MAAM,MAAM,gBAAgB,GAAG;IAC7B,0GAA0G;IAC1G,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAAC;
|
|
1
|
+
{"version":3,"file":"topic-clause.d.ts","sourceRoot":"","sources":["../src/topic-clause.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AA8HzC,qIAAqI;AACrI,MAAM,MAAM,gBAAgB,GAAG;IAC7B,0GAA0G;IAC1G,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAAC;AAqFF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,SAAS,KAAK,EAAE,EAAE,OAAO,MAAM,EAAE,MAAM,MAAM,EAAE,QAAO,gBAA2B,KAAG,MAAM,GAAG,SAWnI,CAAC"}
|
package/dist/topic-clause.js
CHANGED
|
@@ -119,15 +119,28 @@ const isPoliteGa = (tokens, at) => {
|
|
|
119
119
|
return isPoliteMasu(before) || (before?.pos === "AUX" && before.surface === "た" && isPoliteMasu(tokens[at - 2]));
|
|
120
120
|
};
|
|
121
121
|
const ownGaSubjectBetween = (tokens, from, to) => tokens.some((token, at) => at > from && at < to && isParticle(token, "が") && headsSubject(tokens, at));
|
|
122
|
+
/** A word of a name (赤澤, 大臣), not a noun that sets the time or the case (今後, 当日). */
|
|
123
|
+
const isNameWord = (token) => NOMINAL.has(token.pos) && token.features?.["Adverbial"] !== "Yes";
|
|
124
|
+
/**
|
|
125
|
+
* 石破総理大臣は…明らかにしましたが、赤澤大臣は…どう考えているか: a name and は straight after the comma is a topic of its own
|
|
126
|
+
* that the rest of the sentence is said of, when no subject of its own (が) follows it. A phrase before は (〜した行為は) is not one.
|
|
127
|
+
*/
|
|
128
|
+
const newNameTopicRunsToEnd = (tokens, comma, last) => {
|
|
129
|
+
const topic = tokens.findIndex((token, index) => index > comma && !isNameWord(token));
|
|
130
|
+
const wa = tokens[topic];
|
|
131
|
+
return topic > comma + 1 && wa !== undefined && isParticle(wa, "は") && lastOwnSubject(tokens, last) <= topic;
|
|
132
|
+
};
|
|
122
133
|
/**
|
|
123
134
|
* 当社は…を営んでおりますが、…の重要性が乏しいため、…の記載は行っておりません: after 〜ますが、 the words up to the next comma
|
|
124
135
|
* say something of a subject of their own (が) and a new topic takes what comes after, so the predicate before が was the
|
|
125
|
-
* topic's, when no other subject stands between the topic and it (需要の停滞がありましたが is not). A
|
|
126
|
-
*
|
|
136
|
+
* topic's, when no other subject stands between the topic and it (需要の停滞がありましたが is not). A clause with no subject of
|
|
137
|
+
* its own there is read to the end, unless a name stands as a new topic straight after the comma (〜ましたが、B大臣は…).
|
|
127
138
|
*/
|
|
128
139
|
const closesWithPoliteGa = (tokens, topic, at, last) => {
|
|
129
140
|
if (!isPoliteGa(tokens, at) || !isComma(tokens[at + 1]) || subjectBetween(tokens, topic, at))
|
|
130
141
|
return false;
|
|
142
|
+
if (newNameTopicRunsToEnd(tokens, at + 1, last))
|
|
143
|
+
return true;
|
|
131
144
|
const comma = tokens.findIndex((token, index) => index > at + 1 && index < last && isComma(token));
|
|
132
145
|
const clauseEnd = comma === -1 ? last : comma;
|
|
133
146
|
return ownGaSubjectBetween(tokens, at + 1, clauseEnd) && newTopicAfter(tokens, clauseEnd, last);
|
package/dist/topic-clause.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topic-clause.js","sourceRoot":"","sources":["../src/topic-clause.ts"],"names":[],"mappings":"AAIA,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAClC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACnD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAC3D,gEAAgE;AAChE,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AACxD,qGAAqG;AACrG,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chaffjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "Prose validation harness. Finds what is hard to read, and never rewrites it for you.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chaff",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
91
|
"@anthropic-ai/sdk": "^0.125.0",
|
|
92
|
-
"@chaffjs/lang-en": "0.
|
|
93
|
-
"@chaffjs/lang-ja": "0.
|
|
92
|
+
"@chaffjs/lang-en": "0.37.0",
|
|
93
|
+
"@chaffjs/lang-ja": "0.39.0",
|
|
94
94
|
"character-entities": "^2.0.2",
|
|
95
95
|
"mdast-util-from-markdown": "^2.0.3",
|
|
96
96
|
"mdast-util-frontmatter": "^2.0.1",
|
package/rules/ai-tell.yaml
CHANGED
|
@@ -11,8 +11,8 @@ name:
|
|
|
11
11
|
en: Phrasing common in generated text
|
|
12
12
|
|
|
13
13
|
why:
|
|
14
|
-
ja:
|
|
15
|
-
en: Each is ordinary on its own. Only the pile-up means anything, so the weights are summed. This alone never says the text was generated.
|
|
14
|
+
ja: どれも単独では普通の日本語です。重なったときだけ意味があるので、重みを足し合わせて出しています(ブログでは、人の記事にほぼ出ない重い言い回しなら 1 つでも出します)。これだけで「AI が書いた」とは言えません。
|
|
15
|
+
en: Each is ordinary on its own. Only the pile-up means anything, so the weights are summed (in a blog post, one of the heavier phrases, which human posts rarely use, is enough). This alone never says the text was generated.
|
|
16
16
|
|
|
17
17
|
message:
|
|
18
18
|
ja: 「{word}」が揃っています(点 {density}、{limit} まで)
|
|
@@ -24,6 +24,10 @@ how_to_fix:
|
|
|
24
24
|
|
|
25
25
|
# 重みの合計を 10 倍した点。0.9 の言い回しが 2 つで 18。
|
|
26
26
|
levels: { strict: 10, normal: 18, relaxed: 30 }
|
|
27
|
+
# ブログでは、生成した記事でも決まり文句は 1 つ 2 つしか出ないことが多く、上の段では届かない。重み 0.5 の言い回し 1 つから言う
|
|
28
|
+
# (判定済み corpus と lab の corpus で測った段。人のブログにはほぼ出ない)。
|
|
29
|
+
by_genre:
|
|
30
|
+
blog: { strict: 4, normal: 4, relaxed: 10 }
|
|
27
31
|
|
|
28
32
|
use_for: [technical/readme, blog, business, legal, docs, academic, literature, speech]
|
|
29
33
|
off_for:
|
|
@@ -10,8 +10,8 @@ name:
|
|
|
10
10
|
en: Too many list items led by a bold label
|
|
11
11
|
|
|
12
12
|
why:
|
|
13
|
-
ja: 「-
|
|
14
|
-
en: 'An item that opens with a bold label and a colon ("- **Speed**: ..."), 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.'
|
|
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.'
|
|
15
15
|
|
|
16
16
|
message:
|
|
17
17
|
ja: 「{label}」など、太字の札で始まる項目が {count} 個あります({limit} 個から)
|
|
@@ -36,8 +36,8 @@ sources: [zhang-2024]
|
|
|
36
36
|
|
|
37
37
|
group: ai-tells
|
|
38
38
|
summary:
|
|
39
|
-
ja:
|
|
40
|
-
en: List items
|
|
39
|
+
ja: 太字の札(**速さ**:)や太字の一文で始まる項目が続く箇条書き
|
|
40
|
+
en: List items in a row that open with a bold label or a bold lead sentence
|
|
41
41
|
example:
|
|
42
42
|
ja:
|
|
43
43
|
config: { genre: blog/tech }
|
|
@@ -71,8 +71,8 @@ example:
|
|
|
71
71
|
The monthly bill is lower, and permissions can be split finely.
|
|
72
72
|
|
|
73
73
|
not_flagged:
|
|
74
|
-
ja: 札がコードだけの項目(`--flag`
|
|
75
|
-
en: An item whose label is only code (a list of options or fields) is not counted, nor is one
|
|
74
|
+
ja: 札がコードだけの項目(`--flag` の説明のような、設定や引数の一覧)は数えません。札の後ろにコロンも句点も無い項目(太字が文の頭の語だけのもの)と、その後ろに何も無い項目も数えません。仕様書(technical/spec)・法務・説明書・論文・文学のジャンルでは見ません。
|
|
75
|
+
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.
|
|
76
76
|
level_meaning:
|
|
77
77
|
ja: 太字の札で始まる項目が {limit} 個あれば指摘
|
|
78
78
|
en: reported once {limit} list items open with a bold label
|
|
@@ -62,8 +62,8 @@ example:
|
|
|
62
62
|
Changing one line of the settings made the build twice as fast. Next, we will try running the tests in parallel.
|
|
63
63
|
|
|
64
64
|
not_flagged:
|
|
65
|
-
ja:
|
|
66
|
-
en: Only the last four paragraphs of the last section are checked, with or without headings; the document's first paragraph and "to sum up" earlier in the text are ordinary links and are not reported. List items are not checked. A send-off such as "Happy brewing!" or "and go from there" counts only in the last paragraph; earlier it is ordinary text.
|
|
65
|
+
ja: 最後の節の、終わりの四段落だけを見ます。見出しの無い文書でも同じです。文書の最初の段落と、それより前の本文の「まとめると」は普通のつなぎなので指しません。箇条書きの中も見ません。「〜してみてほしい」「試してみてください」「楽しんでください!」のような読み手への願いは、最後の段落にあるときだけ指します。本文の途中なら普通の勧めです。
|
|
66
|
+
en: Only the last four paragraphs of the last section are checked, with or without headings; the document's first paragraph and "to sum up" earlier in the text are ordinary links and are not reported. List items are not checked. A send-off such as "Happy brewing!", "give it a try" or "and go from there" counts only in the last paragraph; earlier it is ordinary text.
|
|
67
67
|
level_meaning:
|
|
68
68
|
ja: 当てはまる結びが {limit} 箇所あれば指摘
|
|
69
69
|
en: reported once there are {limit}
|
package/rules/colon-lead-in.yaml
CHANGED
|
@@ -92,8 +92,8 @@ example:
|
|
|
92
92
|
- A map
|
|
93
93
|
|
|
94
94
|
not_flagged:
|
|
95
|
-
ja: 1
|
|
96
|
-
en: A single colon lead-in, and a lead-in that does not end in a colon, are not counted. Nor is the same noun label repeated before each entry's list (a bold
|
|
95
|
+
ja: 1 つだけのコロンの前置きと、コロンで終わらない前置き(「次のとおりとする。」)は数えません。項目ごとに同じ名詞の札(太字の「参考:」、Community changes, past quarter:)を置く形は、長くても文でなく名詞句なら、項目の欄の名前なので数えません。一行に立つ太字の名詞の札(**メリット:**、**Pros:**)も、見出しと同じく箇条書きの名前なので数えません。太字の書けないテキストの文書では、一行に立つ名詞の札(Releases:)を同じように扱います。項目がどれもコードで始まる箇条書き(`omit` …、`include` …)は、値や選択肢を並べた部品の一覧なので、その前置きも数えません。前置きが 3 つより少ない節にしか無いとき(短いハウツーの手順の前置き二つ、一つの節に並べた事実の一覧)は、節ごとに続く形ではないので言いません。説明書・法務・仕様書(technical/spec)のジャンルでは見ません。短い文書は測りません。英語の文書は、人もコロンから箇条書きへよく渡すので、上限を高くしています。日本語の文書の中の英文(Examples include:)は数えません。
|
|
96
|
+
en: A single colon lead-in, and a lead-in that does not end in a colon, are not counted. Nor is the same noun label repeated before each entry's list (a bold 参考:, Community changes, past quarter:), which names a field of the entry however long it is, as long as it is a noun phrase and not a sentence; nor a bold noun label on a line of its own (**Pros:**, **Cons:**), which names its list as a heading does; nor, in a plain-text document, which cannot write bold, a noun label alone on its line (Releases:). Nor is a lead-in to a list whose every item opens with code (`omit` …, `include` …), which lists values or options, a parts list that can stay. Lead-ins in fewer than three sections (two procedure lead-ins in a short how-to, the lists of facts in one section of a press release) are not section after section and are not reported; a document without headings counts its lead-ins. Documentation, legal and specification (technical/spec) genres do not run this rule. Short documents are not measured. English writers hand off to a list after a colon often, so the English limit is higher. In a Japanese document, an English sentence inside (Examples include:) is not counted.
|
|
97
97
|
level_meaning:
|
|
98
98
|
ja: コロンで箇条書きへ渡す文が 1000 字あたり {limit} 個まで
|
|
99
99
|
en: "colon lead-ins to lists: up to {limit} per 1000 words"
|
|
@@ -42,8 +42,8 @@ example:
|
|
|
42
42
|
We don't store your password. We don't read your messages. We don't share your data. We don't sell your address.
|
|
43
43
|
|
|
44
44
|
not_flagged:
|
|
45
|
-
ja: 短縮形を使うかどうかは決めません。比べるのは同じ語の 2 つの形(「you're」と「you are」)だけで、別の語どうしは比べません。「you're」と書き、否定は「do not」と書く文書は揃っています。同じ語の 2 つの形が同じ回数なら、少ないほうが無いので指しません。引用符で挙げた短い語句("Do Not Disturb"、‘we’re going to x
|
|
46
|
-
en: Whether to use contractions is not decided. Only the two forms of the same word are compared ("you're" with "you are"), never different words, so a document that writes "you're" but keeps "do not" in full is consistent. When both forms of a word appear as often, there is no minority and nothing is pointed at. A short phrase in quotation marks ("Do Not Disturb", ‘we’re going to x’)
|
|
45
|
+
ja: 短縮形を使うかどうかは決めません。比べるのは同じ語の 2 つの形(「you're」と「you are」)だけで、別の語どうしは比べません。「you're」と書き、否定は「do not」と書く文書は揃っています。同じ語の 2 つの形が同じ回数なら、少ないほうが無いので指しません。引用符で挙げた短い語句("Do Not Disturb"、‘we’re going to x’)と引用の中の引用は、名前か人の言葉なので数えません。一語だけ強調した語(does **not**)は強勢のために選んだ形、同じ語の 2 つの形を並べた文(Use cannot, instead of can’t.)と語を読点で長く並べた一覧(検索語の一覧)は語を挙げているだけなので、どちらも数えません。
|
|
46
|
+
en: Whether to use contractions is not decided. Only the two forms of the same word are compared ("you're" with "you are"), never different words, so a document that writes "you're" but keeps "do not" in full is consistent. When both forms of a word appear as often, there is no minority and nothing is pointed at. A short phrase in quotation marks ("Do Not Disturb", ‘we’re going to x’) and a quotation inside another quotation are a name or someone else's words and are not counted. A word emphasised alone (does **not**) is chosen for stress, and a sentence naming both forms of a word (Use cannot, instead of can’t.) or a long comma-separated list of terms (search keywords) only names the words; none of them is counted.
|
|
47
47
|
level_meaning:
|
|
48
48
|
ja: 同じ語の少ないほうの書き方が {limit} 箇所以下のとき指摘
|
|
49
49
|
en: reported when the minority form of a word appears {limit} times or fewer
|
|
@@ -53,8 +53,8 @@ example:
|
|
|
53
53
|
Registration opens on October 2, 2026 and closes on October 9, 2026. Results are sent on October 16, 2026.
|
|
54
54
|
|
|
55
55
|
not_flagged:
|
|
56
|
-
ja: 年だけ、月日だけの日付、URL や版の中の数(/2026/10/02/、1.2026.10
|
|
57
|
-
en: Year-only and month-day dates, numbers inside URLs and versions (/2026/10/02/, 1.2026.10), and dates in code are not compared. When the minority is more than a third of the dates, the document is taken to use two styles on purpose (ISO in tables, long dates in prose) and nothing is reported, nor when the two commonest styles are tied.
|
|
56
|
+
ja: 年だけ、月日だけの日付、URL や版の中の数(/2026/10/02/、1.2026.10)、コードの中の日付は比べません。文献一覧と番号の付いた注の並びの中の日付(引いた文書の題の中の日付、参照日)も比べません。ページの更新日の刻印([更新日 2021年10月1日])と、題のすぐ下の日付だけの行は、本文とは別に比べます。少ないほうが全体の三分の一を超える文書は、二つの書き方を使い分けている(表は 2026-10-02、本文は 2026年10月2日)と読んで指しません。いちばん多い書き方が同じ数で並ぶときも指しません。
|
|
57
|
+
en: Year-only and month-day dates, numbers inside URLs and versions (/2026/10/02/, 1.2026.10), and dates in code are not compared, nor are dates in a reference list or a run of numbered notes (dates in cited titles, access dates). A page's update stamp ([Updated 2021-10-01]) and a line holding only a date right under the title are compared apart from the body. When the minority is more than a third of the dates, the document is taken to use two styles on purpose (ISO in tables, long dates in prose) and nothing is reported, nor when the two commonest styles are tied.
|
|
58
58
|
level_meaning:
|
|
59
59
|
ja: 少ないほうの書き方の日付が全体の {limit}% 以下なら指摘
|
|
60
60
|
en: reported while the minority style is {limit}% of the dates or less
|
|
@@ -82,5 +82,5 @@ example:
|
|
|
82
82
|
Users may use the Service free of charge.
|
|
83
83
|
|
|
84
84
|
not_flagged:
|
|
85
|
-
ja: 二つの定義が食い違っているかは決めません。二つ目を指すだけです。語を名前にした見出しは定義に数えません。英語で、括弧に引用符だけで入れた語句のうち、名前らしく大文字で始めていない語を含むもの(("The key point is"))は、例を引いたものとして定義に数えません。添付した文書(前後を空行に挟まれた「Exhibit A to Merger Agreement」のような題の行、または「## **SCHEDULE B**」のような見出しから後ろ)は別の文書なので、その中の定義は、本文の定義とは比べず、添付した文書の中でだけ比べます。同じ名前の後ろの括弧で同じ語を定義し直したもの(件名と本文の両方にある Financial Crimes Enforcement Network ("FinCEN")
|
|
86
|
-
en: 'Whether the two definitions conflict is not decided; only the second is pointed at. A heading that names the term is not a definition. In English, a phrase quoted alone in brackets with a word a name would capitalise left in lower case ("The key point is") quotes an example, and is not a definition. An attached instrument (from a title line such as "Exhibit A to Merger Agreement" between blank lines, or a heading such as "## **SCHEDULE B**") is a separate document: its definitions are compared only with each other, not with those of the body. A term defined again in brackets after the same capitalised name (Financial Crimes Enforcement Network ("FinCEN") in both the subject line and the body, or in the quoted title of another letter) restates one definition, and is not reported.'
|
|
85
|
+
ja: 二つの定義が食い違っているかは決めません。二つ目を指すだけです。語を名前にした見出しは定義に数えません。英語で、括弧に引用符だけで入れた語句のうち、名前らしく大文字で始めていない語を含むもの(("The key point is"))は、例を引いたものとして定義に数えません。添付した文書(前後を空行に挟まれた「Exhibit A to Merger Agreement」のような題の行、または「## **SCHEDULE B**」のような見出しから後ろ)は別の文書なので、その中の定義は、本文の定義とは比べず、添付した文書の中でだけ比べます。同じ名前の後ろの括弧で同じ語を定義し直したもの(件名と本文の両方にある Financial Crimes Enforcement Network ("FinCEN")、引いた別の文書の題の中の定義)は、一つの定義を書き直しただけなので指しません。ひな形の契約が「第1条(オプション1:…)」「第1条(オプション2:…)」のように番号か文字を添えて並べた選ぶ条項の中の定義は、選ばなければ消えるので、どれを選んでも残る定義と、同じ条項の中の定義とだけ比べます(「オプション1~3共通」のように範囲を添えた条項は、どれを選んでも残ります)。
|
|
86
|
+
en: 'Whether the two definitions conflict is not decided; only the second is pointed at. A heading that names the term is not a definition. In English, a phrase quoted alone in brackets with a word a name would capitalise left in lower case ("The key point is") quotes an example, and is not a definition. An attached instrument (from a title line such as "Exhibit A to Merger Agreement" between blank lines, or a heading such as "## **SCHEDULE B**") is a separate document: its definitions are compared only with each other, not with those of the body. A term defined again in brackets after the same capitalised name (Financial Crimes Enforcement Network ("FinCEN") in both the subject line and the body, or in the quoted title of another letter) restates one definition, and is not reported. A clause a model contract offers as one of numbered choices ("Scope (Option A)", "Scope (Option B)"; 第1条(オプション2)) goes when another is chosen, so a definition inside it is compared only with definitions that stay whichever is chosen and with others in the same clause (a clause labelled with a range, such as オプション1~3共通, stays whichever is chosen).'
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
id: honesty-marker
|
|
2
|
+
layer: L2
|
|
3
|
+
status: stable
|
|
4
|
+
how_to_find: phrase-in-use
|
|
5
|
+
word_list: honesty-marker
|
|
6
|
+
extra_word_lists: [mention-cue]
|
|
7
|
+
requires: [pos]
|
|
8
|
+
languages: [ja, en]
|
|
9
|
+
severity: info
|
|
10
|
+
|
|
11
|
+
name:
|
|
12
|
+
ja: 「正直」と前置きする
|
|
13
|
+
en: An honesty marker
|
|
14
|
+
|
|
15
|
+
why:
|
|
16
|
+
ja: 「正直、」「正直に言うと」と前置きすると、その文だけが本音に見え、ほかの文は本音ではなかったのかと読めます。人のブログや業務文書にはほとんど出ず、「自然に書いて」と頼んだ生成文が、人らしく見せるために 1 つ入れることの多い言い回しです。1 つでも言いますが、生成だとは言いません。
|
|
17
|
+
en: '"Honestly,", "if I''m being honest" and "my honest take" flag one sentence as candid, which leaves the reader wondering about the rest. Human blog posts and business documents rarely use them; generated text asked to sound natural often adds one to sound human. One is reported, and that alone does not say the text was generated.'
|
|
18
|
+
|
|
19
|
+
message:
|
|
20
|
+
ja: 「{matched}」と前置きしています
|
|
21
|
+
en: '"{matched}" flags this sentence as candid'
|
|
22
|
+
|
|
23
|
+
how_to_fix:
|
|
24
|
+
ja: 前置きを消して、そのまま言ってください(正直かなり迷いました → かなり迷いました)。
|
|
25
|
+
en: Drop the marker and say it plainly ("Honestly, it was hard" → "It was hard").
|
|
26
|
+
|
|
27
|
+
levels: { strict: 1, normal: 1, relaxed: 2 }
|
|
28
|
+
|
|
29
|
+
use_for: [blog, business, legal, docs, academic, literature, speech]
|
|
30
|
+
off_for:
|
|
31
|
+
legal: "A statute or contract states obligations, not the writer's candour."
|
|
32
|
+
docs: "A help page states how things work; a candour marker there is rare and not a sign of generation."
|
|
33
|
+
academic: 'A paper may say "to be honest about the limits" as part of its argument; the marker is not reported there.'
|
|
34
|
+
literature: "Length, rhythm, repetition and register are the author's choices in literature, and dialogue mixes styles. Only what one work can hold itself to runs: consistent spacing and commas, and numbering without gaps."
|
|
35
|
+
speech: 'A speaker says "honestly" aloud as part of their own voice.'
|
|
36
|
+
|
|
37
|
+
group: ai-tells
|
|
38
|
+
summary:
|
|
39
|
+
ja: 「正直、」「正直に言うと」のように、本音だと前置きする言い回し
|
|
40
|
+
en: A sentence flagged as candid ("honestly", "if I'm being honest")
|
|
41
|
+
example:
|
|
42
|
+
ja:
|
|
43
|
+
config: { genre: blog/essay }
|
|
44
|
+
before: |
|
|
45
|
+
最初の 1 週間は、正直つらかった。
|
|
46
|
+
after: |
|
|
47
|
+
最初の 1 週間はつらかった。
|
|
48
|
+
en:
|
|
49
|
+
config: { genre: blog/essay }
|
|
50
|
+
before: |
|
|
51
|
+
I still write letters, if I'm honest. Not because I think email is bad.
|
|
52
|
+
after: |
|
|
53
|
+
I still write letters. Not because I think email is bad.
|
|
54
|
+
|
|
55
|
+
not_flagged:
|
|
56
|
+
ja: ブログと業務文書だけを見ます。論文、法令、文学、講演の書き起こしなどは対象にしません。人柄の「正直な人」「正直者」は前置きではないので数えません(読点の後の「、正直な人」は数えます)。文頭の「正直、」が 3 つ以上重なれば announcing-opener も言います。言葉として名指しているだけのもの(「正直」という言葉)も指しません。文頭の「正直なところ、」は人の文章にもあるので数えません(読点の後の「、正直なところ」は数えます)。
|
|
57
|
+
en: Only blog posts and business documents are checked; papers, statutes, literature and transcripts are not. "Honestly" as manner ("live honestly") is not a marker and is not listed. A piling-up of sentence openers, "Honestly," among them, is announcing-opener's. A marker only named as a term (the word "honestly") is not reported.
|
|
58
|
+
level_meaning:
|
|
59
|
+
ja: 前置きが {limit} 箇所あれば指摘
|
|
60
|
+
en: reported once there are {limit}
|
|
61
|
+
rewrite:
|
|
62
|
+
depth: light
|
|
63
|
+
ja:
|
|
64
|
+
direction: 「正直」の前置きを消して、文をそのまま言い切ってください。
|
|
65
|
+
pairs:
|
|
66
|
+
- before: ご提案には、正直かなり迷いました。
|
|
67
|
+
after: ご提案には、かなり迷いました。
|
|
68
|
+
- before: 正直に言うと、最初は重たく感じていた。
|
|
69
|
+
after: 最初は重たく感じていた。
|
|
70
|
+
keep:
|
|
71
|
+
- 書き手の確かさ(言い切りか、推量か)
|
|
72
|
+
avoid:
|
|
73
|
+
- 前置きを別の前置き(実は、本当のところ)に替える
|
|
74
|
+
en:
|
|
75
|
+
direction: Drop the honesty marker and state the sentence plainly.
|
|
76
|
+
pairs:
|
|
77
|
+
- before: Honestly, the setup took an hour.
|
|
78
|
+
after: The setup took an hour.
|
|
79
|
+
- before: Here's my honest take on the headphones.
|
|
80
|
+
after: Here is what I think of the headphones.
|
|
81
|
+
keep:
|
|
82
|
+
- the writer's certainty (stated or hedged)
|
|
83
|
+
avoid:
|
|
84
|
+
- swapping the marker for another ("to tell the truth", "frankly")
|