slopless 0.1.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.md +64 -0
- package/dist/families/metrics/avg-sentence-length.js +22 -0
- package/dist/families/metrics/avg-sentence-length.js.map +1 -0
- package/dist/families/metrics/coleman-liau.js +27 -0
- package/dist/families/metrics/coleman-liau.js.map +1 -0
- package/dist/families/metrics/flesch-kincaid.js +27 -0
- package/dist/families/metrics/flesch-kincaid.js.map +1 -0
- package/dist/families/metrics/gunning-fog.js +27 -0
- package/dist/families/metrics/gunning-fog.js.map +1 -0
- package/dist/families/metrics/paragraph-length.js +21 -0
- package/dist/families/metrics/paragraph-length.js.map +1 -0
- package/dist/families/metrics/word-repetition.js +46 -0
- package/dist/families/metrics/word-repetition.js.map +1 -0
- package/dist/families/orthography/colon-dramatic.js +117 -0
- package/dist/families/orthography/colon-dramatic.js.map +1 -0
- package/dist/families/orthography/em-dashes.js +41 -0
- package/dist/families/orthography/em-dashes.js.map +1 -0
- package/dist/families/orthography/exclamation-density.js +51 -0
- package/dist/families/orthography/exclamation-density.js.map +1 -0
- package/dist/families/orthography/fake-timestamps.js +103 -0
- package/dist/families/orthography/fake-timestamps.js.map +1 -0
- package/dist/families/orthography/sentence-case.js +66 -0
- package/dist/families/orthography/sentence-case.js.map +1 -0
- package/dist/families/orthography/smart-quotes.js +53 -0
- package/dist/families/orthography/smart-quotes.js.map +1 -0
- package/dist/families/phrases/cliches.js +17 -0
- package/dist/families/phrases/cliches.js.map +1 -0
- package/dist/families/phrases/corporate-speak.js +23 -0
- package/dist/families/phrases/corporate-speak.js.map +1 -0
- package/dist/families/phrases/data/cliches.json +699 -0
- package/dist/families/phrases/data/corporate-speak.json +27 -0
- package/dist/families/phrases/data/prohibited-phrases.json +8 -0
- package/dist/families/phrases/data/skunked-terms.json +10 -0
- package/dist/families/phrases/data/uncomparables.json +57 -0
- package/dist/families/phrases/humble-bragger.js +26 -0
- package/dist/families/phrases/humble-bragger.js.map +1 -0
- package/dist/families/phrases/jargon-faker.js +84 -0
- package/dist/families/phrases/jargon-faker.js.map +1 -0
- package/dist/families/phrases/llm-disclaimer.js +54 -0
- package/dist/families/phrases/llm-disclaimer.js.map +1 -0
- package/dist/families/phrases/prohibited-phrases.js +17 -0
- package/dist/families/phrases/prohibited-phrases.js.map +1 -0
- package/dist/families/phrases/skunked-terms.js +23 -0
- package/dist/families/phrases/skunked-terms.js.map +1 -0
- package/dist/families/phrases/uncomparables.js +78 -0
- package/dist/families/phrases/uncomparables.js.map +1 -0
- package/dist/families/semantic-thinness/patterns/abstract-contrast.json +85 -0
- package/dist/families/semantic-thinness/patterns/abstract-metaphor-claim.json +112 -0
- package/dist/families/semantic-thinness/patterns/body-emotion-shorthand.json +77 -0
- package/dist/families/semantic-thinness/patterns/body-knows.json +80 -0
- package/dist/families/semantic-thinness/patterns/deictic-summary.json +109 -0
- package/dist/families/semantic-thinness/patterns/empty-atmosphere-shift.json +70 -0
- package/dist/families/semantic-thinness/patterns/empty-emotional-weather.json +104 -0
- package/dist/families/semantic-thinness/patterns/empty-scene-state.json +117 -0
- package/dist/families/semantic-thinness/patterns/empty-scene-transition.json +98 -0
- package/dist/families/semantic-thinness/patterns/gaze-choreography.json +87 -0
- package/dist/families/semantic-thinness/patterns/generic-lesson-extraction.json +82 -0
- package/dist/families/semantic-thinness/patterns/generic-pressure-or-stakes.json +107 -0
- package/dist/families/semantic-thinness/patterns/generic-realization.json +113 -0
- package/dist/families/semantic-thinness/patterns/hollow-significance.json +103 -0
- package/dist/families/semantic-thinness/patterns/low-information-physical-blocking.json +113 -0
- package/dist/families/semantic-thinness/patterns/point-is-frame.json +81 -0
- package/dist/families/semantic-thinness/patterns/real-work-begins.json +66 -0
- package/dist/families/semantic-thinness/patterns/silence-as-actor.json +69 -0
- package/dist/families/semantic-thinness/patterns/something-shifted.json +73 -0
- package/dist/families/semantic-thinness/patterns/truth-answer-moves.json +75 -0
- package/dist/families/semantic-thinness/patterns/vague-connective-payoff.json +90 -0
- package/dist/families/semantic-thinness/patterns/vague-threshold-change.json +98 -0
- package/dist/families/semantic-thinness/private/pattern-data-a.js +15 -0
- package/dist/families/semantic-thinness/private/pattern-data-a.js.map +1 -0
- package/dist/families/semantic-thinness/private/pattern-data-b.js +15 -0
- package/dist/families/semantic-thinness/private/pattern-data-b.js.map +1 -0
- package/dist/families/semantic-thinness/private/pattern-data-c.js +9 -0
- package/dist/families/semantic-thinness/private/pattern-data-c.js.map +1 -0
- package/dist/families/semantic-thinness/private/pattern-data-d.js +17 -0
- package/dist/families/semantic-thinness/private/pattern-data-d.js.map +1 -0
- package/dist/families/semantic-thinness/private/pattern-data.js +11 -0
- package/dist/families/semantic-thinness/private/pattern-data.js.map +1 -0
- package/dist/families/semantic-thinness/private/pattern-matcher.js +172 -0
- package/dist/families/semantic-thinness/private/pattern-matcher.js.map +1 -0
- package/dist/families/semantic-thinness/semantic-thinness.js +25 -0
- package/dist/families/semantic-thinness/semantic-thinness.js.map +1 -0
- package/dist/families/syntactic-patterns/authority/authority-padding.js +81 -0
- package/dist/families/syntactic-patterns/authority/authority-padding.js.map +1 -0
- package/dist/families/syntactic-patterns/closers/affirmation-closers.js +48 -0
- package/dist/families/syntactic-patterns/closers/affirmation-closers.js.map +1 -0
- package/dist/families/syntactic-patterns/closers/boilerplate-conclusion.js +131 -0
- package/dist/families/syntactic-patterns/closers/boilerplate-conclusion.js.map +1 -0
- package/dist/families/syntactic-patterns/closers/false-question.js +30 -0
- package/dist/families/syntactic-patterns/closers/false-question.js.map +1 -0
- package/dist/families/syntactic-patterns/closers/summative-closer.js +33 -0
- package/dist/families/syntactic-patterns/closers/summative-closer.js.map +1 -0
- package/dist/families/syntactic-patterns/contrast/blame-reframe.js +59 -0
- package/dist/families/syntactic-patterns/contrast/blame-reframe.js.map +1 -0
- package/dist/families/syntactic-patterns/contrast/contrastive-aphorism.js +203 -0
- package/dist/families/syntactic-patterns/contrast/contrastive-aphorism.js.map +1 -0
- package/dist/families/syntactic-patterns/contrast/negation-reframe.js +20 -0
- package/dist/families/syntactic-patterns/contrast/negation-reframe.js.map +1 -0
- package/dist/families/syntactic-patterns/contrast/private/negation-reframe-matcher.js +218 -0
- package/dist/families/syntactic-patterns/contrast/private/negation-reframe-matcher.js.map +1 -0
- package/dist/families/syntactic-patterns/contrast/private/negation-reframe-parts.js +136 -0
- package/dist/families/syntactic-patterns/contrast/private/negation-reframe-parts.js.map +1 -0
- package/dist/families/syntactic-patterns/generalization/softening-language.js +143 -0
- package/dist/families/syntactic-patterns/generalization/softening-language.js.map +1 -0
- package/dist/families/syntactic-patterns/generalization/universalizing-claims.js +137 -0
- package/dist/families/syntactic-patterns/generalization/universalizing-claims.js.map +1 -0
- package/dist/families/syntactic-patterns/lead-ins/boilerplate-framing.js +104 -0
- package/dist/families/syntactic-patterns/lead-ins/boilerplate-framing.js.map +1 -0
- package/dist/families/syntactic-patterns/lead-ins/generic-signposting.js +230 -0
- package/dist/families/syntactic-patterns/lead-ins/generic-signposting.js.map +1 -0
- package/dist/families/syntactic-patterns/lead-ins/lesson-framing.js +76 -0
- package/dist/families/syntactic-patterns/lead-ins/lesson-framing.js.map +1 -0
- package/dist/families/syntactic-patterns/lead-ins/llm-openers.js +24 -0
- package/dist/families/syntactic-patterns/lead-ins/llm-openers.js.map +1 -0
- package/dist/families/syntactic-patterns/lead-ins/observer-guidance.js +95 -0
- package/dist/families/syntactic-patterns/lead-ins/observer-guidance.js.map +1 -0
- package/dist/families/syntactic-patterns/llm-artifacts/response-wrapper.js +106 -0
- package/dist/families/syntactic-patterns/llm-artifacts/response-wrapper.js.map +1 -0
- package/dist/families/syntactic-patterns/repetition/demonstrative-emphasis.js +251 -0
- package/dist/families/syntactic-patterns/repetition/demonstrative-emphasis.js.map +1 -0
- package/dist/families/syntactic-patterns/repetition/empty-emphasis.js +108 -0
- package/dist/families/syntactic-patterns/repetition/empty-emphasis.js.map +1 -0
- package/dist/families/syntactic-patterns/repetition/fragment-stacking.js +306 -0
- package/dist/families/syntactic-patterns/repetition/fragment-stacking.js.map +1 -0
- package/dist/families/syntactic-patterns/repetition/triple-repeat.js +149 -0
- package/dist/families/syntactic-patterns/repetition/triple-repeat.js.map +1 -0
- package/dist/families/term-policy/recommended-terms.js +87 -0
- package/dist/families/term-policy/recommended-terms.js.map +1 -0
- package/dist/families/term-policy/required-terms.js +32 -0
- package/dist/families/term-policy/required-terms.js.map +1 -0
- package/dist/families/words/data/prohibited-words.json +12 -0
- package/dist/families/words/data/simplicity-pairs.json +7 -0
- package/dist/families/words/hedge-stacking.js +43 -0
- package/dist/families/words/hedge-stacking.js.map +1 -0
- package/dist/families/words/llm-vocabulary.js +33 -0
- package/dist/families/words/llm-vocabulary.js.map +1 -0
- package/dist/families/words/prohibited-words.js +17 -0
- package/dist/families/words/prohibited-words.js.map +1 -0
- package/dist/families/words/simplicity.js +27 -0
- package/dist/families/words/simplicity.js.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/presets/everything.js +52 -0
- package/dist/presets/everything.js.map +1 -0
- package/dist/registries/metrics.js +15 -0
- package/dist/registries/metrics.js.map +1 -0
- package/dist/registries/orthography.js +15 -0
- package/dist/registries/orthography.js.map +1 -0
- package/dist/registries/phrases.js +19 -0
- package/dist/registries/phrases.js.map +1 -0
- package/dist/registries/semantic-thinness.js +5 -0
- package/dist/registries/semantic-thinness.js.map +1 -0
- package/dist/registries/syntactic-patterns/authority.js +5 -0
- package/dist/registries/syntactic-patterns/authority.js.map +1 -0
- package/dist/registries/syntactic-patterns/closers.js +11 -0
- package/dist/registries/syntactic-patterns/closers.js.map +1 -0
- package/dist/registries/syntactic-patterns/contrast.js +9 -0
- package/dist/registries/syntactic-patterns/contrast.js.map +1 -0
- package/dist/registries/syntactic-patterns/generalization.js +7 -0
- package/dist/registries/syntactic-patterns/generalization.js.map +1 -0
- package/dist/registries/syntactic-patterns/lead-ins.js +13 -0
- package/dist/registries/syntactic-patterns/lead-ins.js.map +1 -0
- package/dist/registries/syntactic-patterns/llm-artifacts.js +5 -0
- package/dist/registries/syntactic-patterns/llm-artifacts.js.map +1 -0
- package/dist/registries/syntactic-patterns/repetition.js +11 -0
- package/dist/registries/syntactic-patterns/repetition.js.map +1 -0
- package/dist/registries/syntactic-patterns.js +17 -0
- package/dist/registries/syntactic-patterns.js.map +1 -0
- package/dist/registries/term-policy.js +7 -0
- package/dist/registries/term-policy.js.map +1 -0
- package/dist/registries/words.js +11 -0
- package/dist/registries/words.js.map +1 -0
- package/dist/shared/matchers/phrases.js +71 -0
- package/dist/shared/matchers/phrases.js.map +1 -0
- package/dist/shared/matchers/prose-patterns.js +104 -0
- package/dist/shared/matchers/prose-patterns.js.map +1 -0
- package/dist/shared/text/document.js +18 -0
- package/dist/shared/text/document.js.map +1 -0
- package/dist/shared/text/normalize.js +30 -0
- package/dist/shared/text/normalize.js.map +1 -0
- package/dist/shared/text/quotes.js +20 -0
- package/dist/shared/text/quotes.js.map +1 -0
- package/dist/shared/text/sections.js +119 -0
- package/dist/shared/text/sections.js.map +1 -0
- package/dist/shared/text/sentences.js +79 -0
- package/dist/shared/text/sentences.js.map +1 -0
- package/dist/shared/text/tokens.js +18 -0
- package/dist/shared/text/tokens.js.map +1 -0
- package/dist/shared/text/traverse.js +10 -0
- package/dist/shared/text/traverse.js.map +1 -0
- package/dist/shared/text/whitespace.js +25 -0
- package/dist/shared/text/whitespace.js.map +1 -0
- package/package.json +115 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[
|
|
2
|
+
"all hands on deck",
|
|
3
|
+
"apples to apples",
|
|
4
|
+
"at the end of the day",
|
|
5
|
+
"back to the drawing board",
|
|
6
|
+
"bang for your buck",
|
|
7
|
+
"circle back around",
|
|
8
|
+
"drill-down",
|
|
9
|
+
"elephant in the room",
|
|
10
|
+
"get my manager's blessing",
|
|
11
|
+
"get the ball rolling",
|
|
12
|
+
"hit the ground running",
|
|
13
|
+
"i don't have the bandwidth",
|
|
14
|
+
"it's on my radar",
|
|
15
|
+
"let's touch base",
|
|
16
|
+
"low-hanging fruit",
|
|
17
|
+
"move the goal post",
|
|
18
|
+
"no brainer",
|
|
19
|
+
"on my plate",
|
|
20
|
+
"par for the course",
|
|
21
|
+
"ping me",
|
|
22
|
+
"synergy",
|
|
23
|
+
"take this offline",
|
|
24
|
+
"think outside the box",
|
|
25
|
+
"thrown under the bus",
|
|
26
|
+
"win-win"
|
|
27
|
+
]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"comparators": [
|
|
3
|
+
"extremely",
|
|
4
|
+
"increasingly",
|
|
5
|
+
"kind of",
|
|
6
|
+
"largely",
|
|
7
|
+
"less",
|
|
8
|
+
"mildly",
|
|
9
|
+
"more",
|
|
10
|
+
"quite",
|
|
11
|
+
"very"
|
|
12
|
+
],
|
|
13
|
+
"fancyComparators": ["least", "most"],
|
|
14
|
+
"adjectives": [
|
|
15
|
+
"absolute",
|
|
16
|
+
"adequate",
|
|
17
|
+
"chief",
|
|
18
|
+
"complete",
|
|
19
|
+
"correct",
|
|
20
|
+
"devoid",
|
|
21
|
+
"entire",
|
|
22
|
+
"false",
|
|
23
|
+
"fatal",
|
|
24
|
+
"favorite",
|
|
25
|
+
"final",
|
|
26
|
+
"ideal",
|
|
27
|
+
"impossible",
|
|
28
|
+
"inevitable",
|
|
29
|
+
"infinite",
|
|
30
|
+
"irrevocable",
|
|
31
|
+
"main",
|
|
32
|
+
"manifest",
|
|
33
|
+
"only",
|
|
34
|
+
"paramount",
|
|
35
|
+
"perfect",
|
|
36
|
+
"perpetual",
|
|
37
|
+
"possible",
|
|
38
|
+
"preferable",
|
|
39
|
+
"principal",
|
|
40
|
+
"singular",
|
|
41
|
+
"stationary",
|
|
42
|
+
"sufficient",
|
|
43
|
+
"true",
|
|
44
|
+
"unanimous",
|
|
45
|
+
"unavoidable",
|
|
46
|
+
"unbroken",
|
|
47
|
+
"uniform",
|
|
48
|
+
"unique",
|
|
49
|
+
"universal",
|
|
50
|
+
"void",
|
|
51
|
+
"whole"
|
|
52
|
+
],
|
|
53
|
+
"exceptions": [
|
|
54
|
+
["more", "perfect"],
|
|
55
|
+
["more", "possible"]
|
|
56
|
+
]
|
|
57
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { findPhraseMatches } from "../../shared/matchers/phrases.js";
|
|
2
|
+
import { allParagraphSentences } from "../../shared/text/sections.js";
|
|
3
|
+
const HUMBLE_BRAGGER_PHRASES = [
|
|
4
|
+
"in my experience",
|
|
5
|
+
"as someone who has",
|
|
6
|
+
"having worked with"
|
|
7
|
+
];
|
|
8
|
+
const rule = (context) => {
|
|
9
|
+
const { Syntax, RuleError, locator, report } = context;
|
|
10
|
+
return {
|
|
11
|
+
[Syntax.Document](node) {
|
|
12
|
+
for (const item of allParagraphSentences(node)) {
|
|
13
|
+
for (const match of findPhraseMatches(item.sentence.text, HUMBLE_BRAGGER_PHRASES)) {
|
|
14
|
+
report(item.paragraph, new RuleError(`Humble-bragging phrase found: "${match.text}". Remove the credentialing lead-in.`, {
|
|
15
|
+
padding: locator.range([
|
|
16
|
+
item.source.originalStartFor(item.sentence.start + match.start),
|
|
17
|
+
item.source.originalEndFor(item.sentence.start + match.end)
|
|
18
|
+
])
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default rule;
|
|
26
|
+
//# sourceMappingURL=humble-bragger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"humble-bragger.js","sourceRoot":"","sources":["../../../src/families/phrases/humble-bragger.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,sBAAsB,GAAG;IAC7B,kBAAkB;IAClB,oBAAoB;IACpB,oBAAoB;CACrB,CAAC;AAEF,MAAM,IAAI,GAAuB,CAAC,OAAO,EAAE,EAAE;IAC3C,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAEvD,OAAO;QACL,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAqB;YACrC,KAAK,MAAM,IAAI,IAAI,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC/C,KAAK,MAAM,KAAK,IAAI,iBAAiB,CACnC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAClB,sBAAsB,CACvB,EAAE,CAAC;oBACF,MAAM,CACJ,IAAI,CAAC,SAAS,EACd,IAAI,SAAS,CACX,kCAAkC,KAAK,CAAC,IAAI,sCAAsC,EAClF;wBACE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;4BACrB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAC1B,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAClC;4BACD,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC;yBAC5D,CAAC;qBACH,CACF,CACF,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { findPhraseMatches } from "../../shared/matchers/phrases.js";
|
|
2
|
+
import { allParagraphSentences } from "../../shared/text/sections.js";
|
|
3
|
+
import { wordTokens } from "../../shared/text/tokens.js";
|
|
4
|
+
const JARGON_FAKER_PHRASES = [
|
|
5
|
+
"debug our",
|
|
6
|
+
"debug your",
|
|
7
|
+
"optimizing for",
|
|
8
|
+
"iterating on your"
|
|
9
|
+
];
|
|
10
|
+
const DEBUG_LITERAL_OBJECTS = new Set([
|
|
11
|
+
"api",
|
|
12
|
+
"app",
|
|
13
|
+
"bug",
|
|
14
|
+
"build",
|
|
15
|
+
"code",
|
|
16
|
+
"crash",
|
|
17
|
+
"deployment",
|
|
18
|
+
"endpoint",
|
|
19
|
+
"error",
|
|
20
|
+
"function",
|
|
21
|
+
"issue",
|
|
22
|
+
"module",
|
|
23
|
+
"package",
|
|
24
|
+
"parser",
|
|
25
|
+
"pipeline",
|
|
26
|
+
"production",
|
|
27
|
+
"query",
|
|
28
|
+
"script",
|
|
29
|
+
"server",
|
|
30
|
+
"service",
|
|
31
|
+
"test",
|
|
32
|
+
"tests"
|
|
33
|
+
]);
|
|
34
|
+
const OPTIMIZE_LITERAL_TARGETS = new Set([
|
|
35
|
+
"accuracy",
|
|
36
|
+
"cost",
|
|
37
|
+
"efficiency",
|
|
38
|
+
"latency",
|
|
39
|
+
"memory",
|
|
40
|
+
"performance",
|
|
41
|
+
"precision",
|
|
42
|
+
"recall",
|
|
43
|
+
"reliability",
|
|
44
|
+
"speed",
|
|
45
|
+
"throughput"
|
|
46
|
+
]);
|
|
47
|
+
function nextWordAfter(text, end) {
|
|
48
|
+
return wordTokens(text.slice(end)).at(0)?.normalized;
|
|
49
|
+
}
|
|
50
|
+
function isLiteralTechnicalUse(sentence, phrase, end) {
|
|
51
|
+
const nextWord = nextWordAfter(sentence, end);
|
|
52
|
+
if (nextWord === undefined) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
if (phrase === "debug our" || phrase === "debug your") {
|
|
56
|
+
return DEBUG_LITERAL_OBJECTS.has(nextWord);
|
|
57
|
+
}
|
|
58
|
+
if (phrase === "optimizing for") {
|
|
59
|
+
return OPTIMIZE_LITERAL_TARGETS.has(nextWord);
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const rule = (context) => {
|
|
64
|
+
const { Syntax, RuleError, locator, report } = context;
|
|
65
|
+
return {
|
|
66
|
+
[Syntax.Document](node) {
|
|
67
|
+
for (const item of allParagraphSentences(node)) {
|
|
68
|
+
for (const match of findPhraseMatches(item.sentence.text, JARGON_FAKER_PHRASES)) {
|
|
69
|
+
if (isLiteralTechnicalUse(item.sentence.text, match.phrase, match.end)) {
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
report(item.paragraph, new RuleError(`Fake jargon phrase found: "${match.text}". Replace the borrowed tech metaphor with plain language.`, {
|
|
73
|
+
padding: locator.range([
|
|
74
|
+
item.source.originalStartFor(item.sentence.start + match.start),
|
|
75
|
+
item.source.originalEndFor(item.sentence.start + match.end)
|
|
76
|
+
])
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export default rule;
|
|
84
|
+
//# sourceMappingURL=jargon-faker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jargon-faker.js","sourceRoot":"","sources":["../../../src/families/phrases/jargon-faker.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,oBAAoB,GAAG;IAC3B,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,mBAAmB;CACpB,CAAC;AAEF,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACpC,KAAK;IACL,KAAK;IACL,KAAK;IACL,OAAO;IACP,MAAM;IACN,OAAO;IACP,YAAY;IACZ,UAAU;IACV,OAAO;IACP,UAAU;IACV,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,MAAM;IACN,OAAO;CACR,CAAC,CAAC;AAEH,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IACvC,UAAU;IACV,MAAM;IACN,YAAY;IACZ,SAA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AG,CAAC,EAClE,CAAC;wBACD,SAAS;oBACX,CAAC;oBAED,MAAM,CACJ,IAAI,CAAC,SAAS,EACd,IAAI,SAAS,CACX,8BAA8B,KAAK,CAAC,IAAI,4DAA4D,EACpG;wBACE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;4BACrB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAC1B,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAClC;4BACD,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC;yBAC5D,CAAC;qBACH,CACF,CACF,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { cleanSentence, containsAny, textStartsWithPattern } from "../../shared/matchers/prose-patterns.js";
|
|
2
|
+
import { allParagraphSentences } from "../../shared/text/sections.js";
|
|
3
|
+
const START_PATTERNS = [
|
|
4
|
+
"as a language model",
|
|
5
|
+
"as an ai language model",
|
|
6
|
+
"as a language model ai",
|
|
7
|
+
"as a large language model",
|
|
8
|
+
"as of my knowledge cutoff",
|
|
9
|
+
"as of my last knowledge update",
|
|
10
|
+
"my knowledge cutoff date is",
|
|
11
|
+
"i do not have access to real-time",
|
|
12
|
+
"i don't have access to real-time",
|
|
13
|
+
"i do not have real-time",
|
|
14
|
+
"i don't have real-time"
|
|
15
|
+
];
|
|
16
|
+
const CONTAINS_PATTERNS = [
|
|
17
|
+
"as i am an ai language model",
|
|
18
|
+
"as i am a language model",
|
|
19
|
+
"i am an ai language model",
|
|
20
|
+
"i am a language model",
|
|
21
|
+
"knowledge cutoff date is",
|
|
22
|
+
"my knowledge is based on data up to",
|
|
23
|
+
"my training data up until",
|
|
24
|
+
"do not have access to real-time information",
|
|
25
|
+
"don't have access to real-time information",
|
|
26
|
+
"do not have access to real-time data",
|
|
27
|
+
"don't have access to real-time data"
|
|
28
|
+
];
|
|
29
|
+
const PREFIXES = ["however, ", "but "];
|
|
30
|
+
function matchDisclaimer(sentence) {
|
|
31
|
+
const stripped = cleanSentence(sentence, PREFIXES);
|
|
32
|
+
return (START_PATTERNS.find((pattern) => textStartsWithPattern(stripped, pattern)) ?? containsAny(stripped, CONTAINS_PATTERNS));
|
|
33
|
+
}
|
|
34
|
+
const rule = (context) => {
|
|
35
|
+
const { Syntax, RuleError, locator, report } = context;
|
|
36
|
+
return {
|
|
37
|
+
[Syntax.Document](node) {
|
|
38
|
+
for (const item of allParagraphSentences(node)) {
|
|
39
|
+
const matched = matchDisclaimer(item.sentence.text);
|
|
40
|
+
if (matched === undefined) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
report(item.paragraph, new RuleError(`LLM disclaimer found: "${matched}". Remove assistant leakage.`, {
|
|
44
|
+
padding: locator.range([
|
|
45
|
+
item.source.originalStartFor(item.sentence.start),
|
|
46
|
+
item.source.originalEndFor(item.sentence.end)
|
|
47
|
+
])
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export default rule;
|
|
54
|
+
//# sourceMappingURL=llm-disclaimer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-disclaimer.js","sourceRoot":"","sources":["../../../src/families/phrases/llm-disclaimer.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,WAAW,EACX,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,cAAc,GAAG;IACrB,qBAAqB;IACrB,yBAAyB;IACzB,wBAAwB;IACxB,2BAA2B;IAC3B,2BAA2B;IAC3B,gCAAgC;IAChC,6BAA6B;IAC7B,mCAAmC;IACnC,kCAAkC;IAClC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,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;qBAC9C,CAAC;iBACH,CACF,CACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import prohibitedPhrases from "./data/prohibited-phrases.json" with { type: "json" };
|
|
2
|
+
import { findPhraseMatches } from "../../shared/matchers/phrases.js";
|
|
3
|
+
const rule = (context) => {
|
|
4
|
+
const { Syntax, RuleError, getSource, locator, report } = context;
|
|
5
|
+
return {
|
|
6
|
+
[Syntax.Str](node) {
|
|
7
|
+
const text = getSource(node);
|
|
8
|
+
for (const match of findPhraseMatches(text, prohibitedPhrases)) {
|
|
9
|
+
report(node, new RuleError(`Prohibited phrase found: "${match.text}". Rewrite without this phrase.`, {
|
|
10
|
+
padding: locator.range([match.start, match.end])
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default rule;
|
|
17
|
+
//# sourceMappingURL=prohibited-phrases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prohibited-phrases.js","sourceRoot":"","sources":["../../../src/families/phrases/prohibited-phrases.ts"],"names":[],"mappings":"AACA,OAAO,iBAAiB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,MAAM,IAAI,GAAuB,CAAC,OAAO,EAAE,EAAE;IAC3C,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAElE,OAAO;QACL,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI;YACf,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;YAE7B,KAAK,MAAM,KAAK,IAAI,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,EAAE,CAAC;gBAC/D,MAAM,CACJ,IAAI,EACJ,IAAI,SAAS,CACX,6BAA6B,KAAK,CAAC,IAAI,iCAAiC,EACxE;oBACE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;iBACjD,CACF,CACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { RuleHelper } from "textlint-rule-helper";
|
|
2
|
+
import skunkedTerms from "./data/skunked-terms.json" with { type: "json" };
|
|
3
|
+
import { findUnquotedPhraseMatches } from "../../shared/matchers/phrases.js";
|
|
4
|
+
const rule = (context) => {
|
|
5
|
+
const { Syntax, RuleError, getSource, locator, report } = context;
|
|
6
|
+
const helper = new RuleHelper(context);
|
|
7
|
+
const ignoredParents = [Syntax.Link, Syntax.LinkReference];
|
|
8
|
+
return {
|
|
9
|
+
[Syntax.Str](node) {
|
|
10
|
+
if (helper.isChildNode(node, ignoredParents)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const text = getSource(node);
|
|
14
|
+
for (const match of findUnquotedPhraseMatches(text, skunkedTerms)) {
|
|
15
|
+
report(node, new RuleError(`Skunked term found: "${match.text}". Replace it with a less disputed word.`, {
|
|
16
|
+
padding: locator.range([match.start, match.end])
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default rule;
|
|
23
|
+
//# sourceMappingURL=skunked-terms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skunked-terms.js","sourceRoot":"","sources":["../../../src/families/phrases/skunked-terms.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,YAAY,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,IAAI,GAAuB,CAAC,OAAO,EAAE,EAAE;IAC3C,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAClE,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IAE3D,OAAO;QACL,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI;YACf,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,cAAc,CAAC,EAAE,CAAC;gBAC7C,OAAO;YACT,CAAC;YAED,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;YAE7B,KAAK,MAAM,KAAK,IAAI,yBAAyB,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,CAAC;gBAClE,MAAM,CACJ,IAAI,EACJ,IAAI,SAAS,CACX,wBAAwB,KAAK,CAAC,IAAI,0CAA0C,EAC5E;oBACE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;iBACjD,CACF,CACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { RuleHelper } from "textlint-rule-helper";
|
|
2
|
+
import uncomparables from "./data/uncomparables.json" with { type: "json" };
|
|
3
|
+
import { findUnquotedPhraseMatches } from "../../shared/matchers/phrases.js";
|
|
4
|
+
import { normalizeForMatch } from "../../shared/text/normalize.js";
|
|
5
|
+
import { wordTokens } from "../../shared/text/tokens.js";
|
|
6
|
+
const EXCEPTION_SEPARATOR = "\u0000";
|
|
7
|
+
function exceptionKey(comparator, adjective) {
|
|
8
|
+
return `${normalizeForMatch(comparator)}${EXCEPTION_SEPARATOR}${normalizeForMatch(adjective)}`;
|
|
9
|
+
}
|
|
10
|
+
function exceptionKeys() {
|
|
11
|
+
const keys = [];
|
|
12
|
+
for (const exception of uncomparables.exceptions) {
|
|
13
|
+
const comparator = exception[0];
|
|
14
|
+
const adjective = exception[1];
|
|
15
|
+
if (comparator === undefined || adjective === undefined) {
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
keys.push(exceptionKey(comparator, adjective));
|
|
19
|
+
}
|
|
20
|
+
return keys;
|
|
21
|
+
}
|
|
22
|
+
const EXCEPTION_KEYS = new Set(exceptionKeys());
|
|
23
|
+
EXCEPTION_KEYS.add(exceptionKey("least", "possible"));
|
|
24
|
+
function uncomparablePhrases() {
|
|
25
|
+
const phrases = [];
|
|
26
|
+
for (const comparator of [
|
|
27
|
+
...uncomparables.comparators,
|
|
28
|
+
...uncomparables.fancyComparators
|
|
29
|
+
]) {
|
|
30
|
+
for (const adjective of uncomparables.adjectives) {
|
|
31
|
+
if (EXCEPTION_KEYS.has(exceptionKey(comparator, adjective))) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
phrases.push(`${comparator} ${adjective}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return phrases;
|
|
38
|
+
}
|
|
39
|
+
const UNCOMPARABLE_PHRASES = uncomparablePhrases();
|
|
40
|
+
const FANCY_COMPARATORS = new Set(uncomparables.fancyComparators.map((comparator) => normalizeForMatch(comparator)));
|
|
41
|
+
function startsWithFancyComparator(phrase) {
|
|
42
|
+
const firstToken = wordTokens(phrase)[0];
|
|
43
|
+
return (firstToken !== undefined && FANCY_COMPARATORS.has(firstToken.normalized));
|
|
44
|
+
}
|
|
45
|
+
function previousTokenIsAt(text, match) {
|
|
46
|
+
const previousTokens = wordTokens(text.slice(0, match.start));
|
|
47
|
+
const previousToken = previousTokens.at(-1);
|
|
48
|
+
return previousToken?.normalized === "at";
|
|
49
|
+
}
|
|
50
|
+
function shouldReport(text, match) {
|
|
51
|
+
if (!startsWithFancyComparator(match.phrase)) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
return !previousTokenIsAt(text, match);
|
|
55
|
+
}
|
|
56
|
+
const rule = (context) => {
|
|
57
|
+
const { Syntax, RuleError, getSource, locator, report } = context;
|
|
58
|
+
const helper = new RuleHelper(context);
|
|
59
|
+
const ignoredParents = [Syntax.Link, Syntax.LinkReference];
|
|
60
|
+
return {
|
|
61
|
+
[Syntax.Str](node) {
|
|
62
|
+
if (helper.isChildNode(node, ignoredParents)) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const text = getSource(node);
|
|
66
|
+
for (const match of findUnquotedPhraseMatches(text, UNCOMPARABLE_PHRASES)) {
|
|
67
|
+
if (!shouldReport(text, match)) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
report(node, new RuleError(`Uncomparable phrase found: "${match.text}". Remove the modifier.`, {
|
|
71
|
+
padding: locator.range([match.start, match.end])
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
export default rule;
|
|
78
|
+
//# sourceMappingURL=uncomparables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uncomparables.js","sourceRoot":"","sources":["../../../src/families/phrases/uncomparables.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,aAAa,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5E,OAAO,EACL,yBAAyB,EAE1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,iBA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AAO,CAAC,CAAC;IACvC,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IAE3D,OAAO;QACL,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI;YACf,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,cAAc,CAAC,EAAE,CAAC;gBAC7C,OAAO;YACT,CAAC;YAED,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;YAE7B,KAAK,MAAM,KAAK,IAAI,yBAAyB,CAC3C,IAAI,EACJ,oBAAoB,CACrB,EAAE,CAAC;gBACF,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;oBAC/B,SAAS;gBACX,CAAC;gBAED,MAAM,CACJ,IAAI,EACJ,IAAI,SAAS,CACX,+BAA+B,KAAK,CAAC,IAAI,yBAAyB,EAClE;oBACE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;iBACjD,CACF,CACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "abstract-contrast",
|
|
3
|
+
"class": "abstract-contrast",
|
|
4
|
+
"purpose": "Catch abstract not-this-but-that contrasts that reframe with abstract nouns instead of adding concrete information.",
|
|
5
|
+
"templates": [
|
|
6
|
+
"{abstractSubject} is not {abstractObject}. It is {abstractObject}.",
|
|
7
|
+
"{abstractSubject} is not about {abstractObject}. It is about {abstractObject}.",
|
|
8
|
+
"{abstractSubject} {metaphorVerb} in {abstractObject}, not in {abstractObject}.",
|
|
9
|
+
"This is not {abstractObject}. This is {abstractObject}.",
|
|
10
|
+
"The point is not {abstractObject}. The point is {abstractObject}."
|
|
11
|
+
],
|
|
12
|
+
"slots": {
|
|
13
|
+
"abstractSubject": [
|
|
14
|
+
"prevention",
|
|
15
|
+
"healing",
|
|
16
|
+
"growth",
|
|
17
|
+
"trust",
|
|
18
|
+
"leadership",
|
|
19
|
+
"connection",
|
|
20
|
+
"confidence",
|
|
21
|
+
"discipline",
|
|
22
|
+
"change",
|
|
23
|
+
"repair",
|
|
24
|
+
"the work",
|
|
25
|
+
"the lesson",
|
|
26
|
+
"the answer",
|
|
27
|
+
"the process",
|
|
28
|
+
"the practice",
|
|
29
|
+
"the point",
|
|
30
|
+
"the problem"
|
|
31
|
+
],
|
|
32
|
+
"abstractObject": [
|
|
33
|
+
"control",
|
|
34
|
+
"clarity",
|
|
35
|
+
"repair",
|
|
36
|
+
"practice",
|
|
37
|
+
"consistency",
|
|
38
|
+
"rehearsal",
|
|
39
|
+
"the lecture",
|
|
40
|
+
"the lesson",
|
|
41
|
+
"the work",
|
|
42
|
+
"the process",
|
|
43
|
+
"the outcome",
|
|
44
|
+
"the mindset",
|
|
45
|
+
"the rhythm",
|
|
46
|
+
"the pattern",
|
|
47
|
+
"the storm",
|
|
48
|
+
"the quiet",
|
|
49
|
+
"the answer",
|
|
50
|
+
"the point",
|
|
51
|
+
"the performance"
|
|
52
|
+
],
|
|
53
|
+
"metaphorVerb": [
|
|
54
|
+
"lives",
|
|
55
|
+
"lands",
|
|
56
|
+
"starts",
|
|
57
|
+
"sits",
|
|
58
|
+
"rests",
|
|
59
|
+
"belongs",
|
|
60
|
+
"shows up"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"rejectIf": [
|
|
64
|
+
"either side of contrast contains concrete technical, factual, or measured content",
|
|
65
|
+
"contrast names specific actors, dates, places, statutes, code symbols, or physical objects",
|
|
66
|
+
"sentence pair is a legitimate correction of a concrete misconception"
|
|
67
|
+
],
|
|
68
|
+
"positiveExamples": [
|
|
69
|
+
"The point is not control. The point is repair.",
|
|
70
|
+
"Prevention lives in rehearsal, not in the lecture.",
|
|
71
|
+
"This is not clarity. This is performance.",
|
|
72
|
+
"Growth is not intensity. It is consistency.",
|
|
73
|
+
"The work is not the outcome. The work is the process."
|
|
74
|
+
],
|
|
75
|
+
"negativeExamples": [
|
|
76
|
+
"The bug is not in the parser. It is in the offset mapper.",
|
|
77
|
+
"The policy is not a tax credit. It is a direct rebate.",
|
|
78
|
+
"The fix is not to retry the request. It is to close the socket.",
|
|
79
|
+
"The sensor is not in the hallway. It is in the stairwell."
|
|
80
|
+
],
|
|
81
|
+
"notes": [
|
|
82
|
+
"This overlaps with negation-reframe and contrastive-aphorism.",
|
|
83
|
+
"Activation should avoid duplicate reports with existing contrast rules."
|
|
84
|
+
]
|
|
85
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "abstract-metaphor-claim",
|
|
3
|
+
"class": "abstract-metaphor",
|
|
4
|
+
"purpose": "Catch slogan-like abstract metaphors where an abstract subject performs a physical or spatial action with no concrete referent.",
|
|
5
|
+
"templates": [
|
|
6
|
+
"{abstractSubject} {metaphorVerb} in {abstractObject}.",
|
|
7
|
+
"{abstractSubject} {metaphorVerb} inside {abstractObject}.",
|
|
8
|
+
"{abstractSubject} {metaphorVerb} after {abstractObject}.",
|
|
9
|
+
"{abstractSubject} {metaphorVerb} with {abstractObject}.",
|
|
10
|
+
"{abstractSubject} {linkingVerb} {abstractComplement}."
|
|
11
|
+
],
|
|
12
|
+
"slots": {
|
|
13
|
+
"abstractSubject": [
|
|
14
|
+
"prevention",
|
|
15
|
+
"problem-solving",
|
|
16
|
+
"trust",
|
|
17
|
+
"clarity",
|
|
18
|
+
"repair",
|
|
19
|
+
"growth",
|
|
20
|
+
"change",
|
|
21
|
+
"resilience",
|
|
22
|
+
"confidence",
|
|
23
|
+
"connection",
|
|
24
|
+
"discipline",
|
|
25
|
+
"leadership",
|
|
26
|
+
"healing",
|
|
27
|
+
"progress",
|
|
28
|
+
"safety",
|
|
29
|
+
"accountability",
|
|
30
|
+
"momentum",
|
|
31
|
+
"consistency",
|
|
32
|
+
"daily life",
|
|
33
|
+
"the answer",
|
|
34
|
+
"the work",
|
|
35
|
+
"the lesson",
|
|
36
|
+
"the process",
|
|
37
|
+
"the practice",
|
|
38
|
+
"the relationship"
|
|
39
|
+
],
|
|
40
|
+
"metaphorVerb": [
|
|
41
|
+
"lives",
|
|
42
|
+
"lands",
|
|
43
|
+
"sits",
|
|
44
|
+
"starts",
|
|
45
|
+
"belongs",
|
|
46
|
+
"rests",
|
|
47
|
+
"moves",
|
|
48
|
+
"breathes",
|
|
49
|
+
"travels",
|
|
50
|
+
"arrives",
|
|
51
|
+
"settles",
|
|
52
|
+
"grows",
|
|
53
|
+
"shows up",
|
|
54
|
+
"takes root",
|
|
55
|
+
"holds"
|
|
56
|
+
],
|
|
57
|
+
"abstractObject": [
|
|
58
|
+
"rehearsal",
|
|
59
|
+
"repair",
|
|
60
|
+
"practice",
|
|
61
|
+
"consistency",
|
|
62
|
+
"attention",
|
|
63
|
+
"patience",
|
|
64
|
+
"discipline",
|
|
65
|
+
"the work",
|
|
66
|
+
"the process",
|
|
67
|
+
"the lesson",
|
|
68
|
+
"the moment",
|
|
69
|
+
"the pattern",
|
|
70
|
+
"the relationship",
|
|
71
|
+
"the conversation",
|
|
72
|
+
"the storm",
|
|
73
|
+
"the quiet",
|
|
74
|
+
"the rhythm"
|
|
75
|
+
],
|
|
76
|
+
"linkingVerb": ["is", "was", "becomes", "became", "remains"],
|
|
77
|
+
"abstractComplement": [
|
|
78
|
+
"a steadier rhythm",
|
|
79
|
+
"a quieter practice",
|
|
80
|
+
"a different kind of repair",
|
|
81
|
+
"a form of rehearsal",
|
|
82
|
+
"a kind of discipline",
|
|
83
|
+
"a daily practice",
|
|
84
|
+
"the real curriculum",
|
|
85
|
+
"the actual work"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"rejectIf": [
|
|
89
|
+
"subject is concrete or named",
|
|
90
|
+
"verb use is literal",
|
|
91
|
+
"sentence includes a concrete example, event, actor, object, number, date, or causal explanation",
|
|
92
|
+
"metaphor is inside quoted literary prose"
|
|
93
|
+
],
|
|
94
|
+
"positiveExamples": [
|
|
95
|
+
"Prevention lives in rehearsal.",
|
|
96
|
+
"Problem-solving lands after the storm.",
|
|
97
|
+
"Trust sits inside repair.",
|
|
98
|
+
"The answer is a steadier rhythm.",
|
|
99
|
+
"Daily life is the curriculum.",
|
|
100
|
+
"Safety starts with consistency."
|
|
101
|
+
],
|
|
102
|
+
"negativeExamples": [
|
|
103
|
+
"The backup generator sits inside the repair shop.",
|
|
104
|
+
"The answer is to move the server restart before the migration.",
|
|
105
|
+
"Prevention starts with installing smoke alarms in every bedroom.",
|
|
106
|
+
"Trust improved after the team published the missing incident timeline."
|
|
107
|
+
],
|
|
108
|
+
"notes": [
|
|
109
|
+
"This pattern needs abstract/concrete slot checks before activation.",
|
|
110
|
+
"Short slogan-like sentences are higher confidence than long explanatory sentences."
|
|
111
|
+
]
|
|
112
|
+
}
|