humanizer-lint 1.1.0 → 1.2.1
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 +40 -9
- package/SKILL.md +19 -21
- package/package.json +6 -2
- package/rules/de-slop.json +190 -0
- package/rules/en-slop.json +50 -49
- package/rules/es-slop.json +190 -0
- package/rules/fr-slop.json +190 -0
- package/rules/id-slop.json +58 -57
- package/rules/ms-slop.json +190 -0
- package/rules/pt-slop.json +190 -0
- package/rules/zh-slop.json +190 -0
- package/scripts/analyze.mjs +9 -3
- package/scripts/core/analyzer-core.mjs +51 -24
- package/scripts/utils/tokenizer.mjs +149 -82
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "ms",
|
|
3
|
+
"stopwords": [
|
|
4
|
+
"yang",
|
|
5
|
+
"dan",
|
|
6
|
+
"di",
|
|
7
|
+
"ini",
|
|
8
|
+
"untuk",
|
|
9
|
+
"dengan",
|
|
10
|
+
"tidak",
|
|
11
|
+
"dalam",
|
|
12
|
+
"daripada",
|
|
13
|
+
"pada",
|
|
14
|
+
"adalah",
|
|
15
|
+
"kerana",
|
|
16
|
+
"boleh",
|
|
17
|
+
"bagi",
|
|
18
|
+
"bahawa",
|
|
19
|
+
"oleh",
|
|
20
|
+
"juga",
|
|
21
|
+
"akan",
|
|
22
|
+
"kepada",
|
|
23
|
+
"mereka"
|
|
24
|
+
],
|
|
25
|
+
"patterns": [
|
|
26
|
+
{
|
|
27
|
+
"id": "MS001",
|
|
28
|
+
"type": "SLOP_PHRASE",
|
|
29
|
+
"pattern": "dalam\\s+era\\s+digital\\s+kini",
|
|
30
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "MS002",
|
|
34
|
+
"type": "SLOP_PHRASE",
|
|
35
|
+
"pattern": "tidak\\s+dapat\\s+dinafikan\\s+bahawa",
|
|
36
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "MS003",
|
|
40
|
+
"type": "SLOP_PHRASE",
|
|
41
|
+
"pattern": "penting\\s+untuk\\s+diingat",
|
|
42
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "MS004",
|
|
46
|
+
"type": "SLOP_PHRASE",
|
|
47
|
+
"pattern": "perlu\\s+dinyatakan\\s+bahawa",
|
|
48
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "MS005",
|
|
52
|
+
"type": "SLOP_PHRASE",
|
|
53
|
+
"pattern": "secara\\s+keseluruhannya",
|
|
54
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "MS006",
|
|
58
|
+
"type": "SLOP_PHRASE",
|
|
59
|
+
"pattern": "kesimpulannya",
|
|
60
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "MS007",
|
|
64
|
+
"type": "SLOP_PHRASE",
|
|
65
|
+
"pattern": "tambahan\\s+pula",
|
|
66
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "MS008",
|
|
70
|
+
"type": "SLOP_PHRASE",
|
|
71
|
+
"pattern": "selain\\s+itu",
|
|
72
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "MS009",
|
|
76
|
+
"type": "SLOP_PHRASE",
|
|
77
|
+
"pattern": "memainkan\\s+peranan\\s+penting",
|
|
78
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "MS010",
|
|
82
|
+
"type": "SLOP_PHRASE",
|
|
83
|
+
"pattern": "bukan\\s+sahaja",
|
|
84
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "MS011",
|
|
88
|
+
"type": "SLOP_PHRASE",
|
|
89
|
+
"pattern": "malah",
|
|
90
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "MS012",
|
|
94
|
+
"type": "SLOP_PHRASE",
|
|
95
|
+
"pattern": "seiring\\s+dengan\\s+perkembangan\\s+pesat",
|
|
96
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "MS013",
|
|
100
|
+
"type": "SLOP_PHRASE",
|
|
101
|
+
"pattern": "mari\\s+kita\\s+terokai",
|
|
102
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "MS014",
|
|
106
|
+
"type": "SLOP_PHRASE",
|
|
107
|
+
"pattern": "hal\\s+ini\\s+membuktikan\\s+bahawa",
|
|
108
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "MS015",
|
|
112
|
+
"type": "SLOP_PHRASE",
|
|
113
|
+
"pattern": "dalam\\s+dunia\\s+yang\\s+pantas\\s+berubah",
|
|
114
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "MS016",
|
|
118
|
+
"type": "SLOP_PHRASE",
|
|
119
|
+
"pattern": "perlu\\s+diberi\\s+perhatian",
|
|
120
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"id": "MS017",
|
|
124
|
+
"type": "SLOP_PHRASE",
|
|
125
|
+
"pattern": "tanpa\\s+ragu-ragu",
|
|
126
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "MS018",
|
|
130
|
+
"type": "SLOP_PHRASE",
|
|
131
|
+
"pattern": "sebagai\\s+kesimpulan",
|
|
132
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "MS019",
|
|
136
|
+
"type": "SLOP_PHRASE",
|
|
137
|
+
"pattern": "pada\\s+masa\\s+kini",
|
|
138
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id": "MS020",
|
|
142
|
+
"type": "SLOP_PHRASE",
|
|
143
|
+
"pattern": "membuka\\s+peluang\\s+baharu",
|
|
144
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "MS021",
|
|
148
|
+
"type": "SLOP_PHRASE",
|
|
149
|
+
"pattern": "satu\\s+langkah\\s+ke\\s+hadapan",
|
|
150
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "MS022",
|
|
154
|
+
"type": "SLOP_PHRASE",
|
|
155
|
+
"pattern": "memberi\\s+impak\\s+besar",
|
|
156
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "MS023",
|
|
160
|
+
"type": "SLOP_PHRASE",
|
|
161
|
+
"pattern": "dalam\\s+landskap\\s+digital",
|
|
162
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"id": "MS024",
|
|
166
|
+
"type": "SLOP_PHRASE",
|
|
167
|
+
"pattern": "menjadi\\s+semakin\\s+penting",
|
|
168
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "MS025",
|
|
172
|
+
"type": "SLOP_PHRASE",
|
|
173
|
+
"pattern": "secara\\s+tidak\\s+langsung",
|
|
174
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"id": "MS026",
|
|
178
|
+
"type": "DEFINITIONAL_OPENING",
|
|
179
|
+
"pattern": "^(?:Dalam konteks|Dalam dunia|Dalam bidang) [\\w\\s]+,",
|
|
180
|
+
"scope": "paragraph-start",
|
|
181
|
+
"fixInstruction": "Start with the specific subject or event instead of a generic framing clause."
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "MS027",
|
|
185
|
+
"type": "STRUCTURAL_CLICHE",
|
|
186
|
+
"pattern": "\\bbukan\\s+sahaja\\b[\\s\\S]{0,100}?\\bmalah\\b",
|
|
187
|
+
"fixInstruction": "State both claims directly without the stock paired construction."
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "pt",
|
|
3
|
+
"stopwords": [
|
|
4
|
+
"de",
|
|
5
|
+
"a",
|
|
6
|
+
"o",
|
|
7
|
+
"que",
|
|
8
|
+
"e",
|
|
9
|
+
"do",
|
|
10
|
+
"da",
|
|
11
|
+
"em",
|
|
12
|
+
"um",
|
|
13
|
+
"para",
|
|
14
|
+
"é",
|
|
15
|
+
"com",
|
|
16
|
+
"não",
|
|
17
|
+
"uma",
|
|
18
|
+
"os",
|
|
19
|
+
"no",
|
|
20
|
+
"se",
|
|
21
|
+
"na",
|
|
22
|
+
"por",
|
|
23
|
+
"mais"
|
|
24
|
+
],
|
|
25
|
+
"patterns": [
|
|
26
|
+
{
|
|
27
|
+
"id": "PT001",
|
|
28
|
+
"type": "SLOP_PHRASE",
|
|
29
|
+
"pattern": "no\\s+mundo\\s+acelerado\\s+de\\s+hoje",
|
|
30
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "PT002",
|
|
34
|
+
"type": "SLOP_PHRASE",
|
|
35
|
+
"pattern": "vale\\s+ressaltar\\s+que",
|
|
36
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "PT003",
|
|
40
|
+
"type": "SLOP_PHRASE",
|
|
41
|
+
"pattern": "é\\s+importante\\s+notar\\s+que",
|
|
42
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "PT004",
|
|
46
|
+
"type": "SLOP_PHRASE",
|
|
47
|
+
"pattern": "não\\s+há\\s+como\\s+negar",
|
|
48
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "PT005",
|
|
52
|
+
"type": "SLOP_PHRASE",
|
|
53
|
+
"pattern": "em\\s+conclusão",
|
|
54
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "PT006",
|
|
58
|
+
"type": "SLOP_PHRASE",
|
|
59
|
+
"pattern": "em\\s+resumo",
|
|
60
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "PT007",
|
|
64
|
+
"type": "SLOP_PHRASE",
|
|
65
|
+
"pattern": "além\\s+disso",
|
|
66
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "PT008",
|
|
70
|
+
"type": "SLOP_PHRASE",
|
|
71
|
+
"pattern": "desempenha\\s+um\\s+papel\\s+crucial",
|
|
72
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "PT009",
|
|
76
|
+
"type": "SLOP_PHRASE",
|
|
77
|
+
"pattern": "uma\\s+tapeçaria\\s+de",
|
|
78
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "PT010",
|
|
82
|
+
"type": "SLOP_PHRASE",
|
|
83
|
+
"pattern": "mergulhar\\s+fundo",
|
|
84
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "PT011",
|
|
88
|
+
"type": "SLOP_PHRASE",
|
|
89
|
+
"pattern": "não\\s+apenas",
|
|
90
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "PT012",
|
|
94
|
+
"type": "SLOP_PHRASE",
|
|
95
|
+
"pattern": "mas\\s+também",
|
|
96
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "PT013",
|
|
100
|
+
"type": "SLOP_PHRASE",
|
|
101
|
+
"pattern": "na\\s+era\\s+digital",
|
|
102
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "PT014",
|
|
106
|
+
"type": "SLOP_PHRASE",
|
|
107
|
+
"pattern": "é\\s+fundamental\\s+lembrar",
|
|
108
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "PT015",
|
|
112
|
+
"type": "SLOP_PHRASE",
|
|
113
|
+
"pattern": "sem\\s+dúvida",
|
|
114
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "PT016",
|
|
118
|
+
"type": "SLOP_PHRASE",
|
|
119
|
+
"pattern": "no\\s+cenário\\s+atual",
|
|
120
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"id": "PT017",
|
|
124
|
+
"type": "SLOP_PHRASE",
|
|
125
|
+
"pattern": "ao\\s+longo\\s+do\\s+tempo",
|
|
126
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "PT018",
|
|
130
|
+
"type": "SLOP_PHRASE",
|
|
131
|
+
"pattern": "em\\s+última\\s+análise",
|
|
132
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "PT019",
|
|
136
|
+
"type": "SLOP_PHRASE",
|
|
137
|
+
"pattern": "abrir\\s+caminho\\s+para",
|
|
138
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id": "PT020",
|
|
142
|
+
"type": "SLOP_PHRASE",
|
|
143
|
+
"pattern": "mudar\\s+o\\s+jogo",
|
|
144
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "PT021",
|
|
148
|
+
"type": "SLOP_PHRASE",
|
|
149
|
+
"pattern": "em\\s+um\\s+mundo\\s+em\\s+constante\\s+evolução",
|
|
150
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "PT022",
|
|
154
|
+
"type": "SLOP_PHRASE",
|
|
155
|
+
"pattern": "uma\\s+abordagem\\s+holística",
|
|
156
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "PT023",
|
|
160
|
+
"type": "SLOP_PHRASE",
|
|
161
|
+
"pattern": "insights\\s+valiosos",
|
|
162
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"id": "PT024",
|
|
166
|
+
"type": "SLOP_PHRASE",
|
|
167
|
+
"pattern": "de\\s+forma\\s+contínua",
|
|
168
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "PT025",
|
|
172
|
+
"type": "SLOP_PHRASE",
|
|
173
|
+
"pattern": "vale\\s+a\\s+pena\\s+mencionar",
|
|
174
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"id": "PT026",
|
|
178
|
+
"type": "DEFINITIONAL_OPENING",
|
|
179
|
+
"pattern": "^(?:No contexto de|No âmbito de|No mundo de) [\\w\\s]+,",
|
|
180
|
+
"scope": "paragraph-start",
|
|
181
|
+
"fixInstruction": "Start with the specific subject or event instead of a generic framing clause."
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "PT027",
|
|
185
|
+
"type": "STRUCTURAL_CLICHE",
|
|
186
|
+
"pattern": "\\bnão\\s+apenas\\b[\\s\\S]{0,100}?\\bmas\\s+também\\b",
|
|
187
|
+
"fixInstruction": "State both claims directly without the stock paired construction."
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "zh",
|
|
3
|
+
"stopwords": [
|
|
4
|
+
"的",
|
|
5
|
+
"了",
|
|
6
|
+
"和",
|
|
7
|
+
"是",
|
|
8
|
+
"在",
|
|
9
|
+
"我",
|
|
10
|
+
"有",
|
|
11
|
+
"而",
|
|
12
|
+
"及",
|
|
13
|
+
"与",
|
|
14
|
+
"着",
|
|
15
|
+
"或",
|
|
16
|
+
"一个",
|
|
17
|
+
"没有",
|
|
18
|
+
"我们",
|
|
19
|
+
"你们",
|
|
20
|
+
"他们",
|
|
21
|
+
"这个",
|
|
22
|
+
"那个",
|
|
23
|
+
"因此"
|
|
24
|
+
],
|
|
25
|
+
"patterns": [
|
|
26
|
+
{
|
|
27
|
+
"id": "ZH001",
|
|
28
|
+
"type": "SLOP_PHRASE",
|
|
29
|
+
"pattern": "在当今快节奏的世界中",
|
|
30
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "ZH002",
|
|
34
|
+
"type": "SLOP_PHRASE",
|
|
35
|
+
"pattern": "在数字化时代",
|
|
36
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "ZH003",
|
|
40
|
+
"type": "SLOP_PHRASE",
|
|
41
|
+
"pattern": "值得注意的是",
|
|
42
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "ZH004",
|
|
46
|
+
"type": "SLOP_PHRASE",
|
|
47
|
+
"pattern": "不可否认的是",
|
|
48
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "ZH005",
|
|
52
|
+
"type": "SLOP_PHRASE",
|
|
53
|
+
"pattern": "总而言之",
|
|
54
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "ZH006",
|
|
58
|
+
"type": "SLOP_PHRASE",
|
|
59
|
+
"pattern": "综上所述",
|
|
60
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "ZH007",
|
|
64
|
+
"type": "SLOP_PHRASE",
|
|
65
|
+
"pattern": "此外",
|
|
66
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "ZH008",
|
|
70
|
+
"type": "SLOP_PHRASE",
|
|
71
|
+
"pattern": "更重要的是",
|
|
72
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "ZH009",
|
|
76
|
+
"type": "SLOP_PHRASE",
|
|
77
|
+
"pattern": "扮演着至关重要的角色",
|
|
78
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "ZH010",
|
|
82
|
+
"type": "SLOP_PHRASE",
|
|
83
|
+
"pattern": "不仅",
|
|
84
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "ZH011",
|
|
88
|
+
"type": "SLOP_PHRASE",
|
|
89
|
+
"pattern": "而且",
|
|
90
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "ZH012",
|
|
94
|
+
"type": "SLOP_PHRASE",
|
|
95
|
+
"pattern": "深入探讨",
|
|
96
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "ZH013",
|
|
100
|
+
"type": "SLOP_PHRASE",
|
|
101
|
+
"pattern": "这不仅关乎",
|
|
102
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "ZH014",
|
|
106
|
+
"type": "SLOP_PHRASE",
|
|
107
|
+
"pattern": "见证了",
|
|
108
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "ZH015",
|
|
112
|
+
"type": "SLOP_PHRASE",
|
|
113
|
+
"pattern": "双刃剑",
|
|
114
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "ZH016",
|
|
118
|
+
"type": "SLOP_PHRASE",
|
|
119
|
+
"pattern": "在当前环境下",
|
|
120
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"id": "ZH017",
|
|
124
|
+
"type": "SLOP_PHRASE",
|
|
125
|
+
"pattern": "毋庸置疑",
|
|
126
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "ZH018",
|
|
130
|
+
"type": "SLOP_PHRASE",
|
|
131
|
+
"pattern": "需要指出的是",
|
|
132
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "ZH019",
|
|
136
|
+
"type": "SLOP_PHRASE",
|
|
137
|
+
"pattern": "随着时代的发展",
|
|
138
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id": "ZH020",
|
|
142
|
+
"type": "SLOP_PHRASE",
|
|
143
|
+
"pattern": "从本质上讲",
|
|
144
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "ZH021",
|
|
148
|
+
"type": "SLOP_PHRASE",
|
|
149
|
+
"pattern": "在不断变化的格局中",
|
|
150
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "ZH022",
|
|
154
|
+
"type": "SLOP_PHRASE",
|
|
155
|
+
"pattern": "开启了新的篇章",
|
|
156
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "ZH023",
|
|
160
|
+
"type": "SLOP_PHRASE",
|
|
161
|
+
"pattern": "改变游戏规则",
|
|
162
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"id": "ZH024",
|
|
166
|
+
"type": "SLOP_PHRASE",
|
|
167
|
+
"pattern": "无缝衔接",
|
|
168
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "ZH025",
|
|
172
|
+
"type": "SLOP_PHRASE",
|
|
173
|
+
"pattern": "全方位的方法",
|
|
174
|
+
"fixInstruction": "Replace this stock phrase with the concrete fact, actor, or action."
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"id": "ZH026",
|
|
178
|
+
"type": "DEFINITIONAL_OPENING",
|
|
179
|
+
"pattern": "^(?:在.*?的背景下|在.*?领域中|在.*?世界里),",
|
|
180
|
+
"scope": "paragraph-start",
|
|
181
|
+
"fixInstruction": "Start with the specific subject or event instead of a generic framing clause."
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "ZH027",
|
|
185
|
+
"type": "STRUCTURAL_CLICHE",
|
|
186
|
+
"pattern": "不仅[\\s\\S]{0,100}?而且",
|
|
187
|
+
"fixInstruction": "State both claims directly without the stock paired construction."
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
package/scripts/analyze.mjs
CHANGED
|
@@ -9,6 +9,12 @@ import { calculateMetrics } from './utils/metrics.mjs';
|
|
|
9
9
|
const RULES = {
|
|
10
10
|
id: JSON.parse(readFileSync(new URL('../rules/id-slop.json', import.meta.url), 'utf8')),
|
|
11
11
|
en: JSON.parse(readFileSync(new URL('../rules/en-slop.json', import.meta.url), 'utf8')),
|
|
12
|
+
es: JSON.parse(readFileSync(new URL('../rules/es-slop.json', import.meta.url), 'utf8')),
|
|
13
|
+
ms: JSON.parse(readFileSync(new URL('../rules/ms-slop.json', import.meta.url), 'utf8')),
|
|
14
|
+
fr: JSON.parse(readFileSync(new URL('../rules/fr-slop.json', import.meta.url), 'utf8')),
|
|
15
|
+
de: JSON.parse(readFileSync(new URL('../rules/de-slop.json', import.meta.url), 'utf8')),
|
|
16
|
+
pt: JSON.parse(readFileSync(new URL('../rules/pt-slop.json', import.meta.url), 'utf8')),
|
|
17
|
+
zh: JSON.parse(readFileSync(new URL('../rules/zh-slop.json', import.meta.url), 'utf8')),
|
|
12
18
|
};
|
|
13
19
|
const DEFAULT_PROFILE = JSON.parse(readFileSync(new URL('../profiles/default-human.json', import.meta.url), 'utf8'));
|
|
14
20
|
const { analyzeText } = createAnalyzer({ rules: RULES, defaultProfile: DEFAULT_PROFILE, calculateMetrics });
|
|
@@ -16,7 +22,7 @@ const { analyzeText } = createAnalyzer({ rules: RULES, defaultProfile: DEFAULT_P
|
|
|
16
22
|
export { analyzeText };
|
|
17
23
|
|
|
18
24
|
function formatHuman(result) {
|
|
19
|
-
const lines = [`Status: ${result.status}`, `Score: ${result.score}`, `Language: ${result.language}`];
|
|
25
|
+
const lines = [`Status: ${result.status}`, `Score: ${result.score}`, `Language: ${result.language}`, `Rule pack: ${result.rulePack}`];
|
|
20
26
|
if (result.warning) lines.push(`Warning: ${result.warning}`);
|
|
21
27
|
lines.push('', 'Metrics:');
|
|
22
28
|
for (const [name, value] of Object.entries(result.metrics)) lines.push(` ${name}: ${value}`);
|
|
@@ -50,11 +56,11 @@ export async function runAnalyzeCli(argv, io = {}) {
|
|
|
50
56
|
allowPositionals: false,
|
|
51
57
|
});
|
|
52
58
|
if (values.help) {
|
|
53
|
-
stdout('Usage: humanizer-lint (--file <path> | --stdin) [--lang
|
|
59
|
+
stdout('Usage: humanizer-lint (--file <path> | --stdin) [--lang auto|universal|<ISO-639-1>] [--profile <path>] [--json]\n');
|
|
54
60
|
return 0;
|
|
55
61
|
}
|
|
56
62
|
if (Boolean(values.file) === Boolean(values.stdin)) throw new Error('Choose exactly one input: --file or --stdin');
|
|
57
|
-
if (
|
|
63
|
+
if (!/^(?:auto|universal|[a-z]{2})$/u.test(values.lang)) throw new Error('--lang must be auto, universal, or an ISO 639-1 code');
|
|
58
64
|
if (values.stdin && io.stdin == null && process.stdin.isTTY) throw new Error('--stdin requires piped input');
|
|
59
65
|
const text = values.file ? await new Promise((resolve, reject) => readFile(values.file, 'utf8', (error, data) => error ? reject(error) : resolve(data))) : await stdin();
|
|
60
66
|
const profile = values.profile ? JSON.parse(await new Promise((resolve, reject) => readFile(values.profile, 'utf8', (error, data) => error ? reject(error) : resolve(data)))) : undefined;
|