opengrammar-server 2.0.615350
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.npm.md +95 -0
- package/bin/opengrammar-server.js +111 -0
- package/dist/server.js +48639 -0
- package/package.json +80 -0
- package/server-node.ts +159 -0
- package/server.ts +15 -0
- package/src/analyzer.ts +542 -0
- package/src/dictionary.ts +1973 -0
- package/src/index.ts +978 -0
- package/src/nlp/nlp-engine.ts +17 -0
- package/src/nlp/tone-analyzer.ts +269 -0
- package/src/rephraser.ts +146 -0
- package/src/rules/categories/academic-writing.ts +182 -0
- package/src/rules/categories/adjectives-adverbs.ts +152 -0
- package/src/rules/categories/articles.ts +160 -0
- package/src/rules/categories/business-writing.ts +250 -0
- package/src/rules/categories/capitalization.ts +79 -0
- package/src/rules/categories/clarity.ts +117 -0
- package/src/rules/categories/common-errors.ts +601 -0
- package/src/rules/categories/confused-words.ts +219 -0
- package/src/rules/categories/conjunctions.ts +176 -0
- package/src/rules/categories/dangling-modifiers.ts +123 -0
- package/src/rules/categories/formality.ts +274 -0
- package/src/rules/categories/formatting-idioms.ts +323 -0
- package/src/rules/categories/gerund-infinitive.ts +274 -0
- package/src/rules/categories/grammar-advanced.ts +294 -0
- package/src/rules/categories/grammar.ts +286 -0
- package/src/rules/categories/inclusive-language.ts +280 -0
- package/src/rules/categories/nouns-pronouns.ts +233 -0
- package/src/rules/categories/prepositions-extended.ts +217 -0
- package/src/rules/categories/prepositions.ts +159 -0
- package/src/rules/categories/punctuation.ts +347 -0
- package/src/rules/categories/quantity-agreement.ts +200 -0
- package/src/rules/categories/readability.ts +293 -0
- package/src/rules/categories/sentence-structure.ts +100 -0
- package/src/rules/categories/spelling-advanced.ts +164 -0
- package/src/rules/categories/spelling.ts +119 -0
- package/src/rules/categories/style-tone.ts +511 -0
- package/src/rules/categories/style.ts +78 -0
- package/src/rules/categories/subject-verb-agreement.ts +201 -0
- package/src/rules/categories/tone-rules.ts +206 -0
- package/src/rules/categories/verb-tense.ts +582 -0
- package/src/rules/context-filter.ts +446 -0
- package/src/rules/index.ts +96 -0
- package/src/rules/ruleset-part1-cj-pu-sp.json +657 -0
- package/src/rules/ruleset-part1-np-ad-aa-pr.json +831 -0
- package/src/rules/ruleset-part1-ss-vt.json +907 -0
- package/src/rules/ruleset-part2-cw-st-nf.json +318 -0
- package/src/rules/ruleset-part3-aw-bw-il-rd.json +161 -0
- package/src/rules/types.ts +79 -0
- package/src/shared-types.ts +152 -0
- package/src/spellchecker.ts +418 -0
- package/tsconfig.json +25 -0
|
@@ -0,0 +1,907 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"generated_for": "OpenGrammar Engine",
|
|
4
|
+
"part": "1A_of_3",
|
|
5
|
+
"categories": [
|
|
6
|
+
{
|
|
7
|
+
"code": "SS",
|
|
8
|
+
"name": "Sentence Structure",
|
|
9
|
+
"rules": [
|
|
10
|
+
{
|
|
11
|
+
"rule_id": "SS_SVA_001",
|
|
12
|
+
"category": "Sentence Structure",
|
|
13
|
+
"subcategory": "Subject-Verb Agreement",
|
|
14
|
+
"title": "Singular subject with plural verb",
|
|
15
|
+
"description": "A singular subject requires a singular verb form.",
|
|
16
|
+
"severity": "error",
|
|
17
|
+
"language_register": "both",
|
|
18
|
+
"pattern_description": "Detect singular subjects (he, she, it, everyone, someone, anybody, each, every, neither, either, nobody, nothing) followed by plural verb forms (are, were, have, do, go, need, want, make, take, come, give, say, seem, know, think).",
|
|
19
|
+
"examples": {
|
|
20
|
+
"incorrect": [
|
|
21
|
+
"He are going to the store.",
|
|
22
|
+
"She have a new car.",
|
|
23
|
+
"Everyone are welcome.",
|
|
24
|
+
"Each of the students have a book."
|
|
25
|
+
],
|
|
26
|
+
"correct": [
|
|
27
|
+
"He is going to the store.",
|
|
28
|
+
"She has a new car.",
|
|
29
|
+
"Everyone is welcome.",
|
|
30
|
+
"Each of the students has a book."
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"exceptions": [
|
|
34
|
+
"Subjunctive mood: 'I recommend that he have...'",
|
|
35
|
+
"Questions with inverted order: 'Are you...?'"
|
|
36
|
+
],
|
|
37
|
+
"fix_hint": "Replace plural verb with singular form matching the subject.",
|
|
38
|
+
"british_variant": "Collective nouns may take plural verbs in British English (The team are playing)."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"rule_id": "SS_SVA_002",
|
|
42
|
+
"category": "Sentence Structure",
|
|
43
|
+
"subcategory": "Subject-Verb Agreement",
|
|
44
|
+
"title": "Plural subject with singular verb",
|
|
45
|
+
"description": "A plural subject requires a plural verb form.",
|
|
46
|
+
"severity": "error",
|
|
47
|
+
"language_register": "both",
|
|
48
|
+
"pattern_description": "Detect plural subjects (they, we, you, both, few, many, several) followed by singular verb forms (is, was, has, does, goes).",
|
|
49
|
+
"examples": {
|
|
50
|
+
"incorrect": [
|
|
51
|
+
"They is coming.",
|
|
52
|
+
"We was there.",
|
|
53
|
+
"You has finished.",
|
|
54
|
+
"Many students was absent."
|
|
55
|
+
],
|
|
56
|
+
"correct": [
|
|
57
|
+
"They are coming.",
|
|
58
|
+
"We were there.",
|
|
59
|
+
"You have finished.",
|
|
60
|
+
"Many students were absent."
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"exceptions": ["'You was' in dialect — flag in formal register only."],
|
|
64
|
+
"fix_hint": "Replace singular verb with plural form.",
|
|
65
|
+
"british_variant": "No significant difference."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"rule_id": "SS_SVA_003",
|
|
69
|
+
"category": "Sentence Structure",
|
|
70
|
+
"subcategory": "Subject-Verb Agreement",
|
|
71
|
+
"title": "Indefinite pronoun agreement",
|
|
72
|
+
"description": "Indefinite pronouns like everyone, someone, anybody, each, every, neither, either always take singular verbs.",
|
|
73
|
+
"severity": "error",
|
|
74
|
+
"language_register": "both",
|
|
75
|
+
"pattern_description": "Match (everyone|someone|anybody|somebody|nobody|no one|each|every|neither|either) + plural verb (are|were|have|do|go|seem|need|want).",
|
|
76
|
+
"examples": {
|
|
77
|
+
"incorrect": [
|
|
78
|
+
"Everyone have their own opinion.",
|
|
79
|
+
"Somebody are at the door.",
|
|
80
|
+
"Neither of them were ready.",
|
|
81
|
+
"Each of the boys have a ball."
|
|
82
|
+
],
|
|
83
|
+
"correct": [
|
|
84
|
+
"Everyone has their own opinion.",
|
|
85
|
+
"Somebody is at the door.",
|
|
86
|
+
"Neither of them was ready.",
|
|
87
|
+
"Each of the boys has a ball."
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"exceptions": ["'None' can take singular or plural depending on context."],
|
|
91
|
+
"fix_hint": "Change verb to singular form.",
|
|
92
|
+
"british_variant": "No significant difference."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"rule_id": "SS_SVA_004",
|
|
96
|
+
"category": "Sentence Structure",
|
|
97
|
+
"subcategory": "Subject-Verb Agreement",
|
|
98
|
+
"title": "Collective noun agreement",
|
|
99
|
+
"description": "Collective nouns (team, committee, family, group, staff, jury, audience, crowd, class, government) take singular verbs in American English.",
|
|
100
|
+
"severity": "warning",
|
|
101
|
+
"language_register": "formal",
|
|
102
|
+
"pattern_description": "Match (team|committee|family|group|staff|jury|audience|crowd|class|government|company|board|council|panel) + plural verb.",
|
|
103
|
+
"examples": {
|
|
104
|
+
"incorrect": [
|
|
105
|
+
"The team are playing well.",
|
|
106
|
+
"The committee have decided.",
|
|
107
|
+
"The family are gathering."
|
|
108
|
+
],
|
|
109
|
+
"correct": [
|
|
110
|
+
"The team is playing well.",
|
|
111
|
+
"The committee has decided.",
|
|
112
|
+
"The family is gathering."
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"exceptions": [
|
|
116
|
+
"When emphasizing individual members: 'The team are arguing among themselves.' (valid in BrE)"
|
|
117
|
+
],
|
|
118
|
+
"fix_hint": "In American English, use singular verb. In British English, both may be acceptable.",
|
|
119
|
+
"british_variant": "British English commonly uses plural verbs with collective nouns when referring to individual members."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"rule_id": "SS_SVA_005",
|
|
123
|
+
"category": "Sentence Structure",
|
|
124
|
+
"subcategory": "Subject-Verb Agreement",
|
|
125
|
+
"title": "Compound subjects with 'and'",
|
|
126
|
+
"description": "Two subjects joined by 'and' take a plural verb.",
|
|
127
|
+
"severity": "error",
|
|
128
|
+
"language_register": "both",
|
|
129
|
+
"pattern_description": "Match (Noun/Pronoun) + 'and' + (Noun/Pronoun) + singular verb (is|was|has|does).",
|
|
130
|
+
"examples": {
|
|
131
|
+
"incorrect": [
|
|
132
|
+
"John and Mary is coming.",
|
|
133
|
+
"The cat and the dog was sleeping.",
|
|
134
|
+
"Bread and butter is my favorite."
|
|
135
|
+
],
|
|
136
|
+
"correct": ["John and Mary are coming.", "The cat and the dog were sleeping."]
|
|
137
|
+
},
|
|
138
|
+
"exceptions": [
|
|
139
|
+
"When compound subject refers to single entity: 'Bread and butter is my favorite breakfast.' 'Mac and cheese is delicious.'"
|
|
140
|
+
],
|
|
141
|
+
"fix_hint": "Use plural verb unless the compound subject is a single concept.",
|
|
142
|
+
"british_variant": "No significant difference."
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"rule_id": "SS_SVA_006",
|
|
146
|
+
"category": "Sentence Structure",
|
|
147
|
+
"subcategory": "Subject-Verb Agreement",
|
|
148
|
+
"title": "Compound subjects with or/nor",
|
|
149
|
+
"description": "With or/nor, the verb agrees with the nearest subject.",
|
|
150
|
+
"severity": "error",
|
|
151
|
+
"language_register": "both",
|
|
152
|
+
"pattern_description": "Match 'either...or' / 'neither...nor' / 'or' — check verb agreement with nearest subject.",
|
|
153
|
+
"examples": {
|
|
154
|
+
"incorrect": [
|
|
155
|
+
"Neither the students nor the teacher were ready.",
|
|
156
|
+
"Either the dogs or the cat are outside."
|
|
157
|
+
],
|
|
158
|
+
"correct": [
|
|
159
|
+
"Neither the students nor the teacher was ready.",
|
|
160
|
+
"Either the dogs or the cat is outside."
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"exceptions": [
|
|
164
|
+
"When nearest subject is plural, plural verb is correct: 'Neither the teacher nor the students were ready.'"
|
|
165
|
+
],
|
|
166
|
+
"fix_hint": "Match verb to the subject closest to it.",
|
|
167
|
+
"british_variant": "No significant difference."
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"rule_id": "SS_SVA_007",
|
|
171
|
+
"category": "Sentence Structure",
|
|
172
|
+
"subcategory": "Subject-Verb Agreement",
|
|
173
|
+
"title": "There is/are agreement",
|
|
174
|
+
"description": "In expletive constructions, the verb must agree with the real subject that follows.",
|
|
175
|
+
"severity": "error",
|
|
176
|
+
"language_register": "both",
|
|
177
|
+
"pattern_description": "Match 'there is/was' + plural noun or 'there are/were' + singular noun.",
|
|
178
|
+
"examples": {
|
|
179
|
+
"incorrect": [
|
|
180
|
+
"There is many reasons.",
|
|
181
|
+
"There is several problems.",
|
|
182
|
+
"There was two cats.",
|
|
183
|
+
"There are a problem."
|
|
184
|
+
],
|
|
185
|
+
"correct": [
|
|
186
|
+
"There are many reasons.",
|
|
187
|
+
"There are several problems.",
|
|
188
|
+
"There were two cats.",
|
|
189
|
+
"There is a problem."
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"exceptions": [
|
|
193
|
+
"Informal speech often uses 'there's' with plural nouns — flag only in formal register."
|
|
194
|
+
],
|
|
195
|
+
"fix_hint": "Match is/was with singular subjects; are/were with plural subjects.",
|
|
196
|
+
"british_variant": "No significant difference."
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"rule_id": "SS_FRG_001",
|
|
200
|
+
"category": "Sentence Structure",
|
|
201
|
+
"subcategory": "Sentence Fragments",
|
|
202
|
+
"title": "Dependent clause as sentence",
|
|
203
|
+
"description": "A dependent clause beginning with a subordinating conjunction cannot stand alone as a sentence.",
|
|
204
|
+
"severity": "error",
|
|
205
|
+
"language_register": "both",
|
|
206
|
+
"pattern_description": "Detect sentences starting with (because|although|though|even though|while|whereas|since|unless|until|if|when|whenever|wherever|after|before|as soon as|in order to|so that) that are short (<10 words) and lack a comma joining a main clause.",
|
|
207
|
+
"examples": {
|
|
208
|
+
"incorrect": [
|
|
209
|
+
"Because I was tired.",
|
|
210
|
+
"Although she studied hard.",
|
|
211
|
+
"When the rain stopped.",
|
|
212
|
+
"If you want to come."
|
|
213
|
+
],
|
|
214
|
+
"correct": [
|
|
215
|
+
"Because I was tired, I went to bed.",
|
|
216
|
+
"Although she studied hard, she failed.",
|
|
217
|
+
"When the rain stopped, we went outside.",
|
|
218
|
+
"If you want to come, let me know."
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
"exceptions": [
|
|
222
|
+
"Intentional fragments in creative writing or dialogue.",
|
|
223
|
+
"Answers to questions: 'Why? Because I was tired.'"
|
|
224
|
+
],
|
|
225
|
+
"fix_hint": "Attach the dependent clause to an independent clause, or rewrite as a complete sentence.",
|
|
226
|
+
"british_variant": "No significant difference."
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"rule_id": "SS_FRG_002",
|
|
230
|
+
"category": "Sentence Structure",
|
|
231
|
+
"subcategory": "Sentence Fragments",
|
|
232
|
+
"title": "Missing main verb",
|
|
233
|
+
"description": "A complete sentence requires a main verb. Phrases with only participles or no verb are fragments.",
|
|
234
|
+
"severity": "error",
|
|
235
|
+
"language_register": "both",
|
|
236
|
+
"pattern_description": "Detect sentences that contain no conjugated verb — only nouns, adjectives, or participial phrases without auxiliaries. Requires NLP POS tagging.",
|
|
237
|
+
"examples": {
|
|
238
|
+
"incorrect": [
|
|
239
|
+
"The big red ball on the table.",
|
|
240
|
+
"Running through the park at dawn.",
|
|
241
|
+
"A beautiful day in the neighborhood."
|
|
242
|
+
],
|
|
243
|
+
"correct": [
|
|
244
|
+
"The big red ball is on the table.",
|
|
245
|
+
"She was running through the park at dawn.",
|
|
246
|
+
"It was a beautiful day in the neighborhood."
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"exceptions": ["Titles, headings, bullet points, exclamations ('What a day!')"],
|
|
250
|
+
"fix_hint": "Add a main verb to complete the sentence.",
|
|
251
|
+
"british_variant": "No significant difference."
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"rule_id": "SS_FRG_003",
|
|
255
|
+
"category": "Sentence Structure",
|
|
256
|
+
"subcategory": "Sentence Fragments",
|
|
257
|
+
"title": "Missing subject",
|
|
258
|
+
"description": "A sentence (other than an imperative) requires an explicit subject.",
|
|
259
|
+
"severity": "warning",
|
|
260
|
+
"language_register": "formal",
|
|
261
|
+
"pattern_description": "Detect sentences starting with a conjugated verb that is not imperative mood, lacking a subject. Requires NLP.",
|
|
262
|
+
"examples": {
|
|
263
|
+
"incorrect": [
|
|
264
|
+
"Was going to the store.",
|
|
265
|
+
"Has been very helpful.",
|
|
266
|
+
"Seems like a good idea."
|
|
267
|
+
],
|
|
268
|
+
"correct": [
|
|
269
|
+
"He was going to the store.",
|
|
270
|
+
"She has been very helpful.",
|
|
271
|
+
"It seems like a good idea."
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
"exceptions": [
|
|
275
|
+
"Imperative sentences: 'Go to the store.' 'Be quiet.'",
|
|
276
|
+
"Informal diary style."
|
|
277
|
+
],
|
|
278
|
+
"fix_hint": "Add a subject before the verb.",
|
|
279
|
+
"british_variant": "No significant difference."
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"rule_id": "SS_FRG_004",
|
|
283
|
+
"category": "Sentence Structure",
|
|
284
|
+
"subcategory": "Sentence Fragments",
|
|
285
|
+
"title": "Phrase fragment",
|
|
286
|
+
"description": "A phrase (prepositional, appositive, participial) standing alone as a sentence is a fragment.",
|
|
287
|
+
"severity": "error",
|
|
288
|
+
"language_register": "both",
|
|
289
|
+
"pattern_description": "Detect standalone phrases starting with prepositions (in, on, at, by, for, with, to, from, about, of) that end with a period but contain no independent clause.",
|
|
290
|
+
"examples": {
|
|
291
|
+
"incorrect": ["In the morning.", "With great enthusiasm.", "For the best results."],
|
|
292
|
+
"correct": [
|
|
293
|
+
"In the morning, she went for a run.",
|
|
294
|
+
"He spoke with great enthusiasm.",
|
|
295
|
+
"For the best results, follow the instructions."
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
"exceptions": ["Titles, answers to questions, creative writing."],
|
|
299
|
+
"fix_hint": "Attach the phrase to a complete sentence or add a subject and verb.",
|
|
300
|
+
"british_variant": "No significant difference."
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"rule_id": "SS_RUN_001",
|
|
304
|
+
"category": "Sentence Structure",
|
|
305
|
+
"subcategory": "Run-on Sentences",
|
|
306
|
+
"title": "Comma splice",
|
|
307
|
+
"description": "Two independent clauses joined only by a comma is a comma splice error.",
|
|
308
|
+
"severity": "error",
|
|
309
|
+
"language_register": "both",
|
|
310
|
+
"pattern_description": "Detect two clauses (each with subject + verb, 4+ words) separated by only a comma, without a coordinating conjunction.",
|
|
311
|
+
"examples": {
|
|
312
|
+
"incorrect": [
|
|
313
|
+
"I went to the store, I bought milk.",
|
|
314
|
+
"She is smart, she studies hard.",
|
|
315
|
+
"The movie was great, everyone enjoyed it."
|
|
316
|
+
],
|
|
317
|
+
"correct": [
|
|
318
|
+
"I went to the store, and I bought milk.",
|
|
319
|
+
"I went to the store; I bought milk.",
|
|
320
|
+
"She is smart. She studies hard."
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
"exceptions": [
|
|
324
|
+
"Very short closely related clauses in informal writing: 'I came, I saw, I conquered.'"
|
|
325
|
+
],
|
|
326
|
+
"fix_hint": "Add a coordinating conjunction, replace comma with semicolon or period, or restructure with a subordinate clause.",
|
|
327
|
+
"british_variant": "No significant difference."
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"rule_id": "SS_RUN_002",
|
|
331
|
+
"category": "Sentence Structure",
|
|
332
|
+
"subcategory": "Run-on Sentences",
|
|
333
|
+
"title": "Fused sentence",
|
|
334
|
+
"description": "Two independent clauses joined with no punctuation at all.",
|
|
335
|
+
"severity": "error",
|
|
336
|
+
"language_register": "both",
|
|
337
|
+
"pattern_description": "Detect two independent clauses (each with subject + verb) with no punctuation or conjunction between them. Requires NLP clause detection.",
|
|
338
|
+
"examples": {
|
|
339
|
+
"incorrect": [
|
|
340
|
+
"I went to the store I bought milk.",
|
|
341
|
+
"She likes coffee he prefers tea.",
|
|
342
|
+
"The sun set the stars appeared."
|
|
343
|
+
],
|
|
344
|
+
"correct": [
|
|
345
|
+
"I went to the store. I bought milk.",
|
|
346
|
+
"She likes coffee; he prefers tea.",
|
|
347
|
+
"The sun set, and the stars appeared."
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
"exceptions": ["Intentional stylistic choice in literary writing."],
|
|
351
|
+
"fix_hint": "Add a period, semicolon, or comma + conjunction between clauses.",
|
|
352
|
+
"british_variant": "No significant difference."
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"rule_id": "SS_MOD_001",
|
|
356
|
+
"category": "Sentence Structure",
|
|
357
|
+
"subcategory": "Dangling Modifiers",
|
|
358
|
+
"title": "Dangling participial phrase",
|
|
359
|
+
"description": "A participial phrase at the beginning of a sentence must modify the grammatical subject that immediately follows.",
|
|
360
|
+
"severity": "warning",
|
|
361
|
+
"language_register": "both",
|
|
362
|
+
"pattern_description": "Detect sentences starting with a present or past participial phrase (Walking, Having finished, Covered in mud) followed by a comma, where the subject after the comma is not the logical doer. Requires NLP.",
|
|
363
|
+
"examples": {
|
|
364
|
+
"incorrect": [
|
|
365
|
+
"Walking to school, the rain started.",
|
|
366
|
+
"Having finished dinner, the TV was turned on.",
|
|
367
|
+
"Covered in mud, the mother scolded the children."
|
|
368
|
+
],
|
|
369
|
+
"correct": [
|
|
370
|
+
"Walking to school, I got caught in the rain.",
|
|
371
|
+
"Having finished dinner, we turned on the TV.",
|
|
372
|
+
"Covered in mud, the children were scolded by their mother."
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
"exceptions": ["Absolute phrases: 'Weather permitting, we will go.'"],
|
|
376
|
+
"fix_hint": "Rewrite so the subject of the main clause is the logical doer of the participial action.",
|
|
377
|
+
"british_variant": "No significant difference."
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"rule_id": "SS_MOD_002",
|
|
381
|
+
"category": "Sentence Structure",
|
|
382
|
+
"subcategory": "Misplaced Modifiers",
|
|
383
|
+
"title": "Misplaced adverb (almost, only, just, nearly, merely)",
|
|
384
|
+
"description": "Limiting adverbs should be placed immediately before the word they modify.",
|
|
385
|
+
"severity": "warning",
|
|
386
|
+
"language_register": "formal",
|
|
387
|
+
"pattern_description": "Detect (only|almost|just|nearly|merely|hardly|barely|even|simply) placed before the verb when it should modify a different element.",
|
|
388
|
+
"examples": {
|
|
389
|
+
"incorrect": [
|
|
390
|
+
"She almost drove her kids to school every day.",
|
|
391
|
+
"He only eats vegetables on Mondays.",
|
|
392
|
+
"I just need five minutes."
|
|
393
|
+
],
|
|
394
|
+
"correct": [
|
|
395
|
+
"She drove her kids to school almost every day.",
|
|
396
|
+
"He eats only vegetables on Mondays.",
|
|
397
|
+
"I need just five minutes."
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
"exceptions": [
|
|
401
|
+
"Informal speech widely accepts 'only' before the verb.",
|
|
402
|
+
"Context determines correct placement."
|
|
403
|
+
],
|
|
404
|
+
"fix_hint": "Move the adverb immediately before the word or phrase it modifies.",
|
|
405
|
+
"british_variant": "No significant difference."
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"rule_id": "SS_PAR_001",
|
|
409
|
+
"category": "Sentence Structure",
|
|
410
|
+
"subcategory": "Parallel Structure",
|
|
411
|
+
"title": "Non-parallel items in a list",
|
|
412
|
+
"description": "Items in a list or series should maintain the same grammatical form.",
|
|
413
|
+
"severity": "warning",
|
|
414
|
+
"language_register": "both",
|
|
415
|
+
"pattern_description": "Detect lists where items mix gerunds and infinitives, or mix nouns with clauses. Requires NLP POS analysis of list items.",
|
|
416
|
+
"examples": {
|
|
417
|
+
"incorrect": [
|
|
418
|
+
"She likes swimming, to run, and biking.",
|
|
419
|
+
"The job requires intelligence, working hard, and patience.",
|
|
420
|
+
"He is tall, dark, and has good hair."
|
|
421
|
+
],
|
|
422
|
+
"correct": [
|
|
423
|
+
"She likes swimming, running, and biking.",
|
|
424
|
+
"The job requires intelligence, hard work, and patience.",
|
|
425
|
+
"He is tall, dark, and handsome."
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
"exceptions": [
|
|
429
|
+
"Mixed forms are acceptable when the meaning is clear and changing would sound awkward."
|
|
430
|
+
],
|
|
431
|
+
"fix_hint": "Make all list items the same grammatical form (all gerunds, all infinitives, or all nouns).",
|
|
432
|
+
"british_variant": "No significant difference."
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"rule_id": "SS_PAR_002",
|
|
436
|
+
"category": "Sentence Structure",
|
|
437
|
+
"subcategory": "Parallel Structure",
|
|
438
|
+
"title": "Non-parallel correlative conjunctions",
|
|
439
|
+
"description": "Correlative conjunctions (both...and, not only...but also, either...or, neither...nor) require grammatically parallel elements.",
|
|
440
|
+
"severity": "warning",
|
|
441
|
+
"language_register": "both",
|
|
442
|
+
"pattern_description": "Detect correlative pairs where the grammatical form after each conjunction differs.",
|
|
443
|
+
"examples": {
|
|
444
|
+
"incorrect": [
|
|
445
|
+
"She not only sings but also is dancing.",
|
|
446
|
+
"He both likes to swim and running.",
|
|
447
|
+
"Either you must leave or staying."
|
|
448
|
+
],
|
|
449
|
+
"correct": [
|
|
450
|
+
"She not only sings but also dances.",
|
|
451
|
+
"He likes both swimming and running.",
|
|
452
|
+
"Either you must leave or you must stay."
|
|
453
|
+
]
|
|
454
|
+
},
|
|
455
|
+
"exceptions": [],
|
|
456
|
+
"fix_hint": "Ensure the element after each conjunction is the same grammatical form.",
|
|
457
|
+
"british_variant": "No significant difference."
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"rule_id": "SS_DBS_001",
|
|
461
|
+
"category": "Sentence Structure",
|
|
462
|
+
"subcategory": "Double Subjects",
|
|
463
|
+
"title": "Redundant pronoun after noun subject",
|
|
464
|
+
"description": "Using a pronoun immediately after the noun subject is redundant.",
|
|
465
|
+
"severity": "error",
|
|
466
|
+
"language_register": "both",
|
|
467
|
+
"pattern_description": "Match pattern: (ProperNoun|NounPhrase) + (he|she|it|they) + verb. Regex: /\\b([A-Z][a-z]+)\\s+(he|she|it|they)\\s+(is|are|was|were|has|have|does|do|will|would|can|could|should|shall|might|must)\\b/",
|
|
468
|
+
"examples": {
|
|
469
|
+
"incorrect": [
|
|
470
|
+
"My sister she is very smart.",
|
|
471
|
+
"The teacher he always gives homework.",
|
|
472
|
+
"My parents they are coming."
|
|
473
|
+
],
|
|
474
|
+
"correct": [
|
|
475
|
+
"My sister is very smart.",
|
|
476
|
+
"The teacher always gives homework.",
|
|
477
|
+
"My parents are coming."
|
|
478
|
+
]
|
|
479
|
+
},
|
|
480
|
+
"exceptions": [
|
|
481
|
+
"Deliberate emphasis in speech or creative writing: 'This guy, he never gives up.'"
|
|
482
|
+
],
|
|
483
|
+
"fix_hint": "Remove the redundant pronoun.",
|
|
484
|
+
"british_variant": "No significant difference."
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"rule_id": "SS_FPR_001",
|
|
488
|
+
"category": "Sentence Structure",
|
|
489
|
+
"subcategory": "Faulty Predication",
|
|
490
|
+
"title": "'The reason is because'",
|
|
491
|
+
"description": "'The reason is because' is redundant. Use 'the reason is that' or simply 'because'.",
|
|
492
|
+
"severity": "warning",
|
|
493
|
+
"language_register": "formal",
|
|
494
|
+
"pattern_description": "Regex: /\\bthe\\s+reason\\s+(is|was)\\s+because\\b/i",
|
|
495
|
+
"examples": {
|
|
496
|
+
"incorrect": [
|
|
497
|
+
"The reason is because he was late.",
|
|
498
|
+
"The reason she left was because she was tired."
|
|
499
|
+
],
|
|
500
|
+
"correct": ["The reason is that he was late.", "She left because she was tired."]
|
|
501
|
+
},
|
|
502
|
+
"exceptions": ["Widely accepted in informal speech."],
|
|
503
|
+
"fix_hint": "Replace 'because' with 'that' after 'the reason is', or restructure.",
|
|
504
|
+
"british_variant": "No significant difference."
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"rule_id": "SS_FPR_002",
|
|
508
|
+
"category": "Sentence Structure",
|
|
509
|
+
"subcategory": "Faulty Predication",
|
|
510
|
+
"title": "'The problem is when/where'",
|
|
511
|
+
"description": "A noun subject should not be equated with an adverb clause via a linking verb.",
|
|
512
|
+
"severity": "warning",
|
|
513
|
+
"language_register": "formal",
|
|
514
|
+
"pattern_description": "Regex: /\\b(the\\s+problem|the\\s+issue|the\\s+question|the\\s+difficulty)\\s+(is|was)\\s+(when|where|if)\\b/i",
|
|
515
|
+
"examples": {
|
|
516
|
+
"incorrect": [
|
|
517
|
+
"The problem is when people don't listen.",
|
|
518
|
+
"The issue is where we should meet."
|
|
519
|
+
],
|
|
520
|
+
"correct": [
|
|
521
|
+
"The problem is that people don't listen.",
|
|
522
|
+
"The issue is the meeting location."
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
"exceptions": [],
|
|
526
|
+
"fix_hint": "Replace the adverb clause with a noun clause using 'that'.",
|
|
527
|
+
"british_variant": "No significant difference."
|
|
528
|
+
}
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"code": "VT",
|
|
533
|
+
"name": "Verb Usage & Tense",
|
|
534
|
+
"rules": [
|
|
535
|
+
{
|
|
536
|
+
"rule_id": "VT_IRR_001",
|
|
537
|
+
"category": "Verb Usage & Tense",
|
|
538
|
+
"subcategory": "Irregular Verb Errors",
|
|
539
|
+
"title": "Regularized past tense of irregular verbs",
|
|
540
|
+
"description": "Common irregular verbs should not have -ed added for past tense or past participle.",
|
|
541
|
+
"severity": "error",
|
|
542
|
+
"language_register": "both",
|
|
543
|
+
"pattern_description": "Match regularized forms: buyed→bought, goed→went, comed→came, runned→ran, eated→ate, taked→took, bringed→brought, thinked→thought, knowed→knew, writed→wrote, drived→drove, speaked→spoke, beginned→began, choosed→chose, drinked→drank, flyed→flew, freezed→froze, growed→grew, hided→hid, leaved→left, meaned→meant, payed→paid, rided→rode, ringed→rang, selled→sold, singed→sang, sitted→sat, sleeped→slept, stealed→stole, swimmed→swam, teached→taught, throwed→threw, weared→wore, winned→won, catched→caught, fighted→fought, feeled→felt, finded→found, forgetted→forgot, gived→gave, heared→heard, holded→held, keeped→kept, layed→laid, leaded→led, losted→lost, maked→made, putted→put, readed→read, sayed→said, seed→saw, sended→sent, shooted→shot, shutted→shut, spended→spent, standed→stood, stucked→stuck, telled→told, understanded→understood, waked→woke, withdrawed→withdrew",
|
|
544
|
+
"examples": {
|
|
545
|
+
"incorrect": [
|
|
546
|
+
"I buyed a car.",
|
|
547
|
+
"She goed home.",
|
|
548
|
+
"He bringed his lunch.",
|
|
549
|
+
"They thinked about it.",
|
|
550
|
+
"We beginned the project."
|
|
551
|
+
],
|
|
552
|
+
"correct": [
|
|
553
|
+
"I bought a car.",
|
|
554
|
+
"She went home.",
|
|
555
|
+
"He brought his lunch.",
|
|
556
|
+
"They thought about it.",
|
|
557
|
+
"We began the project."
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
"exceptions": [],
|
|
561
|
+
"fix_hint": "Replace with the correct irregular past tense form.",
|
|
562
|
+
"british_variant": "Some verbs differ: dreamt/dreamed, learnt/learned, spelt/spelled, burnt/burned — both accepted."
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"rule_id": "VT_IRR_002",
|
|
566
|
+
"category": "Verb Usage & Tense",
|
|
567
|
+
"subcategory": "Irregular Verb Errors",
|
|
568
|
+
"title": "Wrong past participle form",
|
|
569
|
+
"description": "Past participles used with have/has/had must be the correct irregular form.",
|
|
570
|
+
"severity": "error",
|
|
571
|
+
"language_register": "both",
|
|
572
|
+
"pattern_description": "Match (have|has|had) + wrong participle: went→gone, ran→run, ate→eaten, drove→driven, spoke→spoken, wrote→written, broke→broken, chose→chosen, flew→flown, froze→frozen, gave→given, grew→grown, knew→known, rode→ridden, rose→risen, sang→sung, sank→sunk, saw→seen, stole→stolen, swam→swum, threw→thrown, took→taken, wore→worn, tore→torn, did→done.",
|
|
573
|
+
"examples": {
|
|
574
|
+
"incorrect": [
|
|
575
|
+
"I have went there.",
|
|
576
|
+
"She has ate lunch.",
|
|
577
|
+
"They have drove home.",
|
|
578
|
+
"He has spoke to them.",
|
|
579
|
+
"We have took the test."
|
|
580
|
+
],
|
|
581
|
+
"correct": [
|
|
582
|
+
"I have gone there.",
|
|
583
|
+
"She has eaten lunch.",
|
|
584
|
+
"They have driven home.",
|
|
585
|
+
"He has spoken to them.",
|
|
586
|
+
"We have taken the test."
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
"exceptions": [],
|
|
590
|
+
"fix_hint": "Replace with proper past participle after have/has/had.",
|
|
591
|
+
"british_variant": "got/gotten — British uses 'got', American uses 'gotten' for past participle."
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"rule_id": "VT_MOD_001",
|
|
595
|
+
"category": "Verb Usage & Tense",
|
|
596
|
+
"subcategory": "Modal Perfect Errors",
|
|
597
|
+
"title": "Modal + have + wrong form",
|
|
598
|
+
"description": "After 'modal + have', the past participle (not past tense) must be used.",
|
|
599
|
+
"severity": "error",
|
|
600
|
+
"language_register": "both",
|
|
601
|
+
"pattern_description": "Regex: /\\b(should|could|would|might|must|may)\\s+have\\s+(went|ran|ate|drove|spoke|wrote|broke|chose|flew|froze|gave|grew|knew|rode|rose|sang|sank|saw|stole|swam|threw|took|wore|tore|did|came|began|drank|fell|got|hid|lay|led|paid|sat|slept|stood|told|woke)\\b/i",
|
|
602
|
+
"examples": {
|
|
603
|
+
"incorrect": [
|
|
604
|
+
"I should have went.",
|
|
605
|
+
"She could have ran faster.",
|
|
606
|
+
"They would have ate earlier.",
|
|
607
|
+
"He must have drove there.",
|
|
608
|
+
"We might have took the wrong turn."
|
|
609
|
+
],
|
|
610
|
+
"correct": [
|
|
611
|
+
"I should have gone.",
|
|
612
|
+
"She could have run faster.",
|
|
613
|
+
"They would have eaten earlier.",
|
|
614
|
+
"He must have driven there.",
|
|
615
|
+
"We might have taken the wrong turn."
|
|
616
|
+
]
|
|
617
|
+
},
|
|
618
|
+
"exceptions": [],
|
|
619
|
+
"fix_hint": "Replace past tense with past participle after 'modal + have'.",
|
|
620
|
+
"british_variant": "No significant difference."
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"rule_id": "VT_MOD_002",
|
|
624
|
+
"category": "Verb Usage & Tense",
|
|
625
|
+
"subcategory": "Modal Verb Errors",
|
|
626
|
+
"title": "'Could/would/should of' instead of 'have'",
|
|
627
|
+
"description": "The construction 'could of' is a mishearing of 'could've'. The correct form is 'could have'.",
|
|
628
|
+
"severity": "error",
|
|
629
|
+
"language_register": "both",
|
|
630
|
+
"pattern_description": "Regex: /\\b(could|would|should|might|must|may)\\s+of\\b/i",
|
|
631
|
+
"examples": {
|
|
632
|
+
"incorrect": [
|
|
633
|
+
"I could of won.",
|
|
634
|
+
"She should of told me.",
|
|
635
|
+
"They would of come.",
|
|
636
|
+
"He might of known.",
|
|
637
|
+
"You must of seen it."
|
|
638
|
+
],
|
|
639
|
+
"correct": [
|
|
640
|
+
"I could have won.",
|
|
641
|
+
"She should have told me.",
|
|
642
|
+
"They would have come.",
|
|
643
|
+
"He might have known.",
|
|
644
|
+
"You must have seen it."
|
|
645
|
+
]
|
|
646
|
+
},
|
|
647
|
+
"exceptions": [],
|
|
648
|
+
"fix_hint": "Replace 'of' with 'have'.",
|
|
649
|
+
"british_variant": "No significant difference."
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"rule_id": "VT_SBJ_001",
|
|
653
|
+
"category": "Verb Usage & Tense",
|
|
654
|
+
"subcategory": "Subjunctive Mood",
|
|
655
|
+
"title": "Past subjunctive: 'if I was' → 'if I were'",
|
|
656
|
+
"description": "In hypothetical or contrary-to-fact conditions, use 'were' for all subjects.",
|
|
657
|
+
"severity": "warning",
|
|
658
|
+
"language_register": "formal",
|
|
659
|
+
"pattern_description": "Regex: /\\b(if|as if|as though|wish|wished)\\s+(I|he|she|it)\\s+was\\b/i",
|
|
660
|
+
"examples": {
|
|
661
|
+
"incorrect": [
|
|
662
|
+
"If I was rich, I would travel.",
|
|
663
|
+
"She acts as if she was the boss.",
|
|
664
|
+
"I wish he was here.",
|
|
665
|
+
"If she was taller, she could reach it."
|
|
666
|
+
],
|
|
667
|
+
"correct": [
|
|
668
|
+
"If I were rich, I would travel.",
|
|
669
|
+
"She acts as if she were the boss.",
|
|
670
|
+
"I wish he were here.",
|
|
671
|
+
"If she were taller, she could reach it."
|
|
672
|
+
]
|
|
673
|
+
},
|
|
674
|
+
"exceptions": [
|
|
675
|
+
"'If I was wrong, I apologize' — indicative mood (real possibility), not subjunctive."
|
|
676
|
+
],
|
|
677
|
+
"fix_hint": "Replace 'was' with 'were' in hypothetical conditions.",
|
|
678
|
+
"british_variant": "'If I was' is increasingly accepted in informal British English."
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"rule_id": "VT_SBJ_002",
|
|
682
|
+
"category": "Verb Usage & Tense",
|
|
683
|
+
"subcategory": "Subjunctive Mood",
|
|
684
|
+
"title": "Present subjunctive after demand/recommend verbs",
|
|
685
|
+
"description": "After verbs of demand, recommendation, or suggestion, use the base form of the verb (no -s, no 'to').",
|
|
686
|
+
"severity": "warning",
|
|
687
|
+
"language_register": "formal",
|
|
688
|
+
"pattern_description": "Match (recommend|suggest|demand|insist|request|require|propose|urge|ask|advise|command|order) + that + subject + non-base-form verb.",
|
|
689
|
+
"examples": {
|
|
690
|
+
"incorrect": [
|
|
691
|
+
"I recommend that he goes.",
|
|
692
|
+
"She insisted that he was on time.",
|
|
693
|
+
"They demanded that she leaves.",
|
|
694
|
+
"The doctor suggests that he takes medicine."
|
|
695
|
+
],
|
|
696
|
+
"correct": [
|
|
697
|
+
"I recommend that he go.",
|
|
698
|
+
"She insisted that he be on time.",
|
|
699
|
+
"They demanded that she leave.",
|
|
700
|
+
"The doctor suggests that he take medicine."
|
|
701
|
+
]
|
|
702
|
+
},
|
|
703
|
+
"exceptions": [
|
|
704
|
+
"British English often uses 'should' instead: 'I recommend that he should go.'"
|
|
705
|
+
],
|
|
706
|
+
"fix_hint": "Use the base form of the verb after 'that' in subjunctive constructions.",
|
|
707
|
+
"british_variant": "British English often substitutes 'should + base form': 'I suggest that he should go.'"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"rule_id": "VT_STV_001",
|
|
711
|
+
"category": "Verb Usage & Tense",
|
|
712
|
+
"subcategory": "Stative Verbs in Progressive",
|
|
713
|
+
"title": "Stative verb used in progressive form",
|
|
714
|
+
"description": "Stative verbs (describing states, not actions) should generally not be used in progressive/continuous tenses.",
|
|
715
|
+
"severity": "warning",
|
|
716
|
+
"language_register": "both",
|
|
717
|
+
"pattern_description": "Match (am|is|are|was|were) + (knowing|believing|containing|owning|belonging|consisting|depending|needing|preferring|understanding|loving|hating|wanting|seeming|appearing|meaning|existing|possessing|deserving|resembling|involving|supposing|realizing|recognizing|doubting).",
|
|
718
|
+
"examples": {
|
|
719
|
+
"incorrect": [
|
|
720
|
+
"I am knowing the answer.",
|
|
721
|
+
"She is having a car.",
|
|
722
|
+
"He is seeming tired.",
|
|
723
|
+
"They are believing in ghosts.",
|
|
724
|
+
"We are owning this house."
|
|
725
|
+
],
|
|
726
|
+
"correct": [
|
|
727
|
+
"I know the answer.",
|
|
728
|
+
"She has a car.",
|
|
729
|
+
"He seems tired.",
|
|
730
|
+
"They believe in ghosts.",
|
|
731
|
+
"We own this house."
|
|
732
|
+
]
|
|
733
|
+
},
|
|
734
|
+
"exceptions": [
|
|
735
|
+
"'I'm loving it' (McDonald's — informal/idiomatic).",
|
|
736
|
+
"'She's having dinner' — 'have' as action verb (eat) is OK.",
|
|
737
|
+
"'I'm thinking about it' — 'think' as mental process (action) is OK."
|
|
738
|
+
],
|
|
739
|
+
"fix_hint": "Use simple tense instead of progressive for stative verbs.",
|
|
740
|
+
"british_variant": "No significant difference."
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"rule_id": "VT_GER_001",
|
|
744
|
+
"category": "Verb Usage & Tense",
|
|
745
|
+
"subcategory": "Verb + Gerund vs Infinitive",
|
|
746
|
+
"title": "Verb requiring gerund used with infinitive",
|
|
747
|
+
"description": "Certain verbs must be followed by a gerund (-ing form), not an infinitive.",
|
|
748
|
+
"severity": "error",
|
|
749
|
+
"language_register": "both",
|
|
750
|
+
"pattern_description": "Match (enjoy|avoid|finish|mind|consider|suggest|practice|keep|deny|risk|imagine|appreciate|miss|postpone|delay|resist|tolerate|involve|recall|admit|anticipate|detest|dislike|mention|quit|recommend|understand) + 'to' + verb.",
|
|
751
|
+
"examples": {
|
|
752
|
+
"incorrect": [
|
|
753
|
+
"I enjoy to swim.",
|
|
754
|
+
"She avoids to eat sugar.",
|
|
755
|
+
"He finished to write the report.",
|
|
756
|
+
"Do you mind to wait?",
|
|
757
|
+
"They considered to move."
|
|
758
|
+
],
|
|
759
|
+
"correct": [
|
|
760
|
+
"I enjoy swimming.",
|
|
761
|
+
"She avoids eating sugar.",
|
|
762
|
+
"He finished writing the report.",
|
|
763
|
+
"Do you mind waiting?",
|
|
764
|
+
"They considered moving."
|
|
765
|
+
]
|
|
766
|
+
},
|
|
767
|
+
"exceptions": [],
|
|
768
|
+
"fix_hint": "Replace 'to + verb' with the '-ing' form after these verbs.",
|
|
769
|
+
"british_variant": "No significant difference."
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"rule_id": "VT_GER_002",
|
|
773
|
+
"category": "Verb Usage & Tense",
|
|
774
|
+
"subcategory": "Verb + Gerund vs Infinitive",
|
|
775
|
+
"title": "Verb requiring infinitive used with gerund",
|
|
776
|
+
"description": "Certain verbs must be followed by an infinitive (to + verb), not a gerund.",
|
|
777
|
+
"severity": "error",
|
|
778
|
+
"language_register": "both",
|
|
779
|
+
"pattern_description": "Match (want|decide|plan|hope|expect|agree|refuse|manage|offer|fail|promise|learn|appear|seem|pretend|claim|demand|deserve|afford|choose|need|wish|attempt|tend|threaten|volunteer) + gerund.",
|
|
780
|
+
"examples": {
|
|
781
|
+
"incorrect": [
|
|
782
|
+
"I want swimming.",
|
|
783
|
+
"She decided leaving.",
|
|
784
|
+
"He hopes winning.",
|
|
785
|
+
"They agreed helping.",
|
|
786
|
+
"We plan going tomorrow."
|
|
787
|
+
],
|
|
788
|
+
"correct": [
|
|
789
|
+
"I want to swim.",
|
|
790
|
+
"She decided to leave.",
|
|
791
|
+
"He hopes to win.",
|
|
792
|
+
"They agreed to help.",
|
|
793
|
+
"We plan to go tomorrow."
|
|
794
|
+
]
|
|
795
|
+
},
|
|
796
|
+
"exceptions": [],
|
|
797
|
+
"fix_hint": "Replace the gerund with 'to + base verb' after these verbs.",
|
|
798
|
+
"british_variant": "No significant difference."
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"rule_id": "VT_COL_001",
|
|
802
|
+
"category": "Verb Usage & Tense",
|
|
803
|
+
"subcategory": "Verb-Preposition Collocations",
|
|
804
|
+
"title": "Wrong preposition after verb",
|
|
805
|
+
"description": "Many verbs require specific prepositions. Using the wrong one is a common error.",
|
|
806
|
+
"severity": "warning",
|
|
807
|
+
"language_register": "both",
|
|
808
|
+
"pattern_description": "Match common errors: 'discuss about' (no about), 'reach to' (no to), 'return back' (redundant), 'enter into' (usually just enter), 'cope up with' (just cope with), 'comprise of' (comprises or is composed of), 'emphasize on' (no on), 'mention about' (no about).",
|
|
809
|
+
"examples": {
|
|
810
|
+
"incorrect": [
|
|
811
|
+
"Let's discuss about the problem.",
|
|
812
|
+
"She reached to the top.",
|
|
813
|
+
"He returned back home.",
|
|
814
|
+
"They entered into the room.",
|
|
815
|
+
"I can't cope up with stress.",
|
|
816
|
+
"The team comprises of 10 members."
|
|
817
|
+
],
|
|
818
|
+
"correct": [
|
|
819
|
+
"Let's discuss the problem.",
|
|
820
|
+
"She reached the top.",
|
|
821
|
+
"He returned home.",
|
|
822
|
+
"They entered the room.",
|
|
823
|
+
"I can't cope with stress.",
|
|
824
|
+
"The team comprises 10 members."
|
|
825
|
+
]
|
|
826
|
+
},
|
|
827
|
+
"exceptions": [
|
|
828
|
+
"'enter into' is correct for agreements/contracts: 'enter into a contract.'"
|
|
829
|
+
],
|
|
830
|
+
"fix_hint": "Remove the incorrect preposition or replace with the correct one.",
|
|
831
|
+
"british_variant": "No significant difference."
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"rule_id": "VT_PAS_001",
|
|
835
|
+
"category": "Verb Usage & Tense",
|
|
836
|
+
"subcategory": "Active vs Passive Voice",
|
|
837
|
+
"title": "Overuse of passive voice",
|
|
838
|
+
"description": "Passive voice can make writing weaker and less direct. Prefer active voice unless passive has a clear purpose.",
|
|
839
|
+
"severity": "suggestion",
|
|
840
|
+
"language_register": "both",
|
|
841
|
+
"pattern_description": "Match (am|is|are|was|were|be|been|being) + past participle. Flag when the agent is present in a 'by' phrase.",
|
|
842
|
+
"examples": {
|
|
843
|
+
"incorrect": [
|
|
844
|
+
"The cake was eaten by the children.",
|
|
845
|
+
"The report was written by the manager.",
|
|
846
|
+
"The ball was kicked by the player."
|
|
847
|
+
],
|
|
848
|
+
"correct": [
|
|
849
|
+
"The children ate the cake.",
|
|
850
|
+
"The manager wrote the report.",
|
|
851
|
+
"The player kicked the ball."
|
|
852
|
+
]
|
|
853
|
+
},
|
|
854
|
+
"exceptions": [
|
|
855
|
+
"When the actor is unknown: 'The window was broken.'",
|
|
856
|
+
"Scientific/academic writing: 'The experiment was conducted.'",
|
|
857
|
+
"When the receiver is more important: 'The president was assassinated.'"
|
|
858
|
+
],
|
|
859
|
+
"fix_hint": "Restructure to place the doer as the subject.",
|
|
860
|
+
"british_variant": "No significant difference."
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"rule_id": "VT_TEN_001",
|
|
864
|
+
"category": "Verb Usage & Tense",
|
|
865
|
+
"subcategory": "Tense Consistency",
|
|
866
|
+
"title": "Unnecessary tense shift within a sentence",
|
|
867
|
+
"description": "Verb tenses should remain consistent within a sentence unless there is a logical reason to shift.",
|
|
868
|
+
"severity": "warning",
|
|
869
|
+
"language_register": "both",
|
|
870
|
+
"pattern_description": "Detect sentences where verb tenses shift between past and present without justification. Requires NLP verb tense tagging across clauses.",
|
|
871
|
+
"examples": {
|
|
872
|
+
"incorrect": [
|
|
873
|
+
"She walked to the store and buys some milk.",
|
|
874
|
+
"He was reading when she comes in.",
|
|
875
|
+
"They decided to go but then they change their minds."
|
|
876
|
+
],
|
|
877
|
+
"correct": [
|
|
878
|
+
"She walked to the store and bought some milk.",
|
|
879
|
+
"He was reading when she came in.",
|
|
880
|
+
"They decided to go but then they changed their minds."
|
|
881
|
+
]
|
|
882
|
+
},
|
|
883
|
+
"exceptions": [
|
|
884
|
+
"Reporting universal truths: 'He said the earth is round.'",
|
|
885
|
+
"Present-tense narration with past-tense backstory."
|
|
886
|
+
],
|
|
887
|
+
"fix_hint": "Make verbs in the same time context use the same tense.",
|
|
888
|
+
"british_variant": "No significant difference."
|
|
889
|
+
}
|
|
890
|
+
]
|
|
891
|
+
}
|
|
892
|
+
],
|
|
893
|
+
"implementation_notes": {
|
|
894
|
+
"SS": {
|
|
895
|
+
"tokenization": "Split text into sentences using /[^.!?]+[.!?]+/g. For clause detection, split on commas, semicolons, and conjunctions.",
|
|
896
|
+
"nlp_requirements": "Subject-verb agreement and fragments benefit heavily from POS tagging via compromise. Use doc.match('#Noun #Verb') patterns for subject-verb pair extraction.",
|
|
897
|
+
"regex_applicability": "SS_SVA rules 001-003 and 007, SS_RUN_001, SS_DBS_001, SS_FPR_001-002 are well-suited for regex. Dangling modifiers and parallel structure require NLP.",
|
|
898
|
+
"performance": "Run sentence-level checks first (fragments, run-ons) before clause-level analysis."
|
|
899
|
+
},
|
|
900
|
+
"VT": {
|
|
901
|
+
"tokenization": "Irregular verb detection is purely regex-based — maintain a Map<wrongForm, correctForm> for O(1) lookup.",
|
|
902
|
+
"nlp_requirements": "Tense consistency checks require POS tagging every verb in a paragraph. Use compromise .verbs().toPastTense() / .toPresentTense() for normalization.",
|
|
903
|
+
"regex_applicability": "VT_IRR_001-002, VT_MOD_001-002, VT_SBJ_001, VT_GER_001-002, VT_COL_001 are all strongly regex-based. Tense consistency and passive voice detection benefit from NLP.",
|
|
904
|
+
"performance": "Irregular verb map should be built once at startup. Modal+have checks are very fast regex patterns."
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|