Debian Codegraph @

proselint/checks/redundancy/misc.py

raw
1 """Redundancy."""
2
3 from proselint.tools import memoize, preferred_forms_check
4
5
6 @memoize
7 def check(text):
8 """Suggest the preferred forms."""
9 err = "redundancy.wallace"
10 msg = "Redundancy. Use '{}' instead of '{}'."
11
12 redundancies = [
13 ["rectangular", ["rectangular in shape"]],
14 ["audible", ["audible to the ear"]],
15 ]
16 return preferred_forms_check(text, redundancies, err, msg)
17
18
19 @memoize
20 def check_garner(text):
21 """Suggest the preferred forms.
22
23 source: Garner's Modern American Usage
24 source_url: http://bit.ly/1T4alrY
25 """
26 err = "redundancy.garner"
27 msg = "Redundancy. Use '{}' instead of '{}'."
28
29 redundancies = [
30 ["adequate", ["adequate enough"]],
31 ["admitted", ["self-admitted"]],
32 ["affidavit", ["sworn affidavit"]],
33 ["agreement", ["mutual agreement"]],
34 ["alumnus", ["former alumnus"]],
35 ["antithetical", ["directly antithetical"]],
36 ["approximately", ["approximately about"]],
37 ["associate", ["associate together(?: in groups)?"]],
38 ["bivouac", ["temporary bivouac", "bivouac camp"]],
39 ["blend", ["blend together"]],
40 ["but", ["but nevertheless"]],
41 ["charged with...", ["accused of a charge"]],
42 ["circumstances of", ["circumstances surrounding"]],
43 ["circumstances", ["surrounding circumstances"]],
44 ["close", ["close proximity"]],
45 ["collaborate", ["collaborate together"]],
46 ["collaborator", ["fellow collaborator"]],
47 ["collaborators", ["fellow collaborators"]],
48 ["collocated", ["collocated together"]],
49 ["colleagues", ["fellow colleagues"]],
50 ["combine", ["combine together"]],
51 ["complacent", ["self-complacent"]],
52 ["confessed", ["self-confessed"]],
53 ["connect", ["connect together"]],
54 ["consensus", ["(?:general )?consensus of opinion"]],
55 ["consolidate", ["consolidate together"]],
56 ["continues to", ["still continues to"]],
57 ["contradictory", ["mutually contradictory"]],
58 ["cooperation", ["mutual cooperation"]],
59 ["couple", ["couple together"]],
60 ["crisis", ["serious crisis"]],
61 ["eliminate", ["entirely eliminate"]],
62 ["especially", ["most especially"]],
63 ["fact", ["actual fact"]],
64 ["facts", ["true facts"]],
65 ["forecast", ["future forecast"]],
66 ["founding fathers", ["founding forefathers"]],
67 ["free", ["free and gratis"]],
68 ["free", ["free gratis"]],
69 ["full", ["completely full"]],
70 ["fundamentals", ["basic fundamentals"]],
71 ["gift", ["free gift"]],
72 ["innovation", ["new innovation"]],
73 ["interact", ["interact with each other"]],
74 ["large", ["large-size"]],
75 ["meld", ["meld together"]],
76 ["merge", ["merge together"]],
77 ["mingle", ["mingle together"]],
78 ["mix", ["mix together"]],
79 ["mutual feelings", ["mutual feelings for eachother"]],
80 ["mutual respect", ["mutual respect for each other"]],
81 ["native citizen", ["native-born citizen"]],
82 ["necessity", ["absolute necessity"]],
83 ["obvious", ["blatantly obvious"]],
84 ["pause", ["pause for a moment"]],
85 ["planning", ["advance planning"]],
86 ["plans", ["future plans"]],
87 ["pooled", ["pooled together"]],
88 ["potable water", ["potable drinking water"]],
89 ["potable water", ["potable drinking water"]],
90 ["recruit", ["new recruit"]],
91 ["reelected", ["reelected for another term"]],
92 ["refer", ["refer back"]],
93 ["regress", ["regress back"]],
94 ["repay them", ["repay them back"]],
95 ["repay", ["repay back"]],
96 ["repeat", ["repeat again"]],
97 ["repeat", ["repeat back"]],
98 ["repeat", ["repeat the same"]],
99 ["repeated", ["repeated the same"]],
100 ["reprieve", ["temporary reprieve"]],
101 ["respite", ["brief respite"]],
102 ["retirement", ["retiral", "retiracy"]],
103 ["retreat", ["retreat back"]],
104 ["return", ["return back"]],
105 ["scrutinize", ["closely scrutinize"]],
106 ["software", ["software program"]],
107 ["surrounded", ["surrounded on all sides"]],
108 ["the nation", ["the whole entire nation"]],
109 ["throughout the", ["throughout the entire"]],
110 ["timpani", ["timpani drum"]],
111 ["twins", ["pair of twins"]],
112 ["vacancy", ["unfilled vacancy"]],
113 ["various", ["various different"]],
114 ["veteran", ["former veteran"]],
115 ["visible", ["visible to the eye"]],
116 ["vocation", ["professional vocation"]],
117 ["while", ["while at the same time"]],
118 ]
119
120 return preferred_forms_check(text, redundancies, err, msg)
121
122
123 @memoize
124 def check_nordquist(text):
125 """Suggest the preferred forms.
126
127 source: Richard Nordquist
128 source_url: http://grammar.about.com/bio/Richard-Nordquist-22176.htm
129 """
130 err = "redundancy.nordquist"
131 msg = "Redundancy. Use '{}' instead of '{}'."
132
133 redundancies = [
134 ["essential", ["absolutely essential"]],
135 ["necessary", ["absolutely necessary"]],
136 ["a.m.", ["a.m. in the morning"]],
137 ["p.m.", ["p.m. at night"]],
138 ]
139 return preferred_forms_check(text, redundancies, err, msg)
140
141
142 @memoize
143 def check_atd(text):
144 """Check for redundancies from After the Deadline."""
145 err = "after_the_deadline.redundancy"
146 msg = "Redundancy. Use '{}' instead of '{}'."
147
148 redundancies = [
149 ["Bō", ["Bo Staff"]],
150 ["Challah", ["Challah bread"]],
151 ["Hallah", ["Hallah bread"]],
152 ["Challah", ["Challah bread"]],
153 ["I", ["I myself", "I personally"]],
154 ["Mount Fuji", ["Mount Fujiyama"]],
155 ["Milky Way", ["Milky Way galaxy"]],
156 ["Rio Grande", ["Rio Grande river"]],
157 ["adage", ["old adage"]],
158 ["add", ["add a further", "add an additional"]],
159 ["advance", ["advance forward"]],
160 ["alternative", ["alternative choice"]],
161 ["amaretto", ["amaretto almond"]],
162 ["annihilate", ["completely annihilate"]],
163 ["anniversary", ["annual anniversary"]],
164 ["anonymous", ["unnamed anonymous"]],
165 ["as", ["equally as"]],
166 ["ascend", ["ascend up"]],
167 ["ask", ["ask the question"]],
168 ["assemble", ["assemble together"]],
169 ["at present the", ["at the present time the"]],
170 ["at this point", ["at this point in time"]],
171 ["attach", ["attach together"]],
172 ["autumn", ["autumn season"]],
173 ["bald", ["bald-headed"]],
174 ["balsa", ["balsa wood"]],
175 ["belongings", ["personal belongings"]],
176 ["benefits", ["desirable benefits"]],
177 ["bento", ["bento box"]],
178 ["best", ["best ever"]],
179 ["bit", ["tiny bit"]],
180 ["blend", ["blend together"]],
181 ["bond", ["common bond"]],
182 ["bonus", ["added bonus", "extra bonus"]],
183 ["bouquet", ["bouquet of flowers"]],
184 ["breakthrough", ["major breakthrough"]],
185 ["bride", ["new bride"]],
186 ["brief", ["brief in duration"]],
187 ["bruin", ["bruin bear"]],
188 ["hot", ["burning hot"]],
189 ["cacophony", ["cacophony of sound"]],
190 ["cameo", ["brief cameo", "cameo appearance"]],
191 ["cancel", ["cancel out"]],
192 ["cash", ["cash money"]],
193 ["chai", ["chai tea"]],
194 ["chance", ["random chance"]],
195 ["charm", ["personal charm"]],
196 ["circle", ["circle around", "round circle"]],
197 ["circulate", ["circulate around"]],
198 ["classify", ["classify into groups"]],
199 ["classmates", ["fellow classmates"]],
200 ["cliche", ["old cliche", "overused cliche"]],
201 ["climb", ["climb up"]],
202 ["clock", ["time clock"]],
203 ["collaborate", ["collaborate together"]],
204 ["collaboration", ["joint collaboration"]],
205 ["colleague", ["fellow colleague"]],
206 ["combine", ["combine together"]],
207 ["commute", ["commute back and forth"]],
208 ["compete", ["compete with each other"]],
209 ["comprise", ["comprise of"]],
210 ["comprises", ["comprises of"]],
211 ["conceived", ["first conceived"]],
212 ["conclusion", ["final conclusion"]],
213 ["confer", ["confer together"]],
214 ["confrontation", ["direct confrontation"]],
215 # ["confused", ["confused state"]],
216 ["connect", ["connect together", "connect up"]],
217 ["consensus", ["consensus of opinion", "general consensus"]],
218 ["consult", ["consult with"]],
219 ["conversation", ["oral conversation"]],
220 ["cool", ["cool down"]],
221 ["cooperate", ["cooperate together"]],
222 ["cooperation", ["mutual cooperation"]],
223 ["copy", ["duplicate copy"]],
224 ["core", ["inner core"]],
225 ["cost", ["cost the sum of"]],
226 ["could", ["could possibly"]],
227 ["coupon", ["money-saving coupon"]],
228 ["created", ["originally created"]],
229 ["crisis", ["crisis situation"]],
230 ["crouch", ["crouch down"]],
231 ["currently", ["now currently"]],
232 ["custom", ["old custom", "usual custom"]],
233 ["danger", ["serious danger"]],
234 ["dates", ["dates back"]],
235 ["decision", ["definite decision"]],
236 ["depreciate", ["depreciate in value"]],
237 ["descend", ["descend down"]],
238 ["destroy", ["totally destroy"]],
239 ["destroyed", ["completely destroyed"]],
240 ["destruction", ["total destruction"]],
241 ["details", ["specific details"]],
242 ["dilemma", ["difficult dilemma"]],
243 ["disappear", ["disappear from sight"]],
244 ["discovered", ["originally discovered"]],
245 ["dive", ["dive down"]],
246 ["done", ["over and done with"]],
247 ["drawing", ["illustrated drawing"]],
248 ["drop", ["drop down"]],
249 ["dune", ["sand dune"]],
250 ["during", ["during the course of"]],
251 ["dwindle", ["dwindle down"]],
252 ["dwindled", ["dwindled down"]],
253 ["every", ["each and every"]],
254 ["earlier", ["earlier in time"]],
255 ["eliminate", ["completely eliminate", "eliminate altogether",
256 "entirely eliminate"]],
257 ["ember", ["glowing ember"]],
258 ["embers", ["burning embers"]],
259 ["emergency", ["emergency situation", "unexpected emergency"]],
260 ["empty", ["empty out"]],
261 ["enclosed", ["enclosed herein"]],
262 ["end", ["final end"]],
263 ["engulfed", ["completely engulfed"]],
264 ["enter", ["enter in", "enter into"]],
265 ["equal", ["equal to one another"]],
266 ["eradicate", ["eradicate completely"]],
267 ["essential", ["absolutely essential"]],
268 ["estimated at", ["estimated at about",
269 "estimated at approximately",
270 "estimated at around"]],
271 ["etc.", ["and etc."]],
272 ["evolve", ["evolve over time"]],
273 ["exaggerate", ["over exaggerate"]],
274 ["exited", ["exited from"]],
275 ["experience", ["actual experience", "past experience"]],
276 ["experts", ["knowledgeable experts"]],
277 ["extradite", ["extradite back"]],
278 ["face the consequences", ["face up to the consequences"]],
279 ["face the fact", ["face up to the fact"]],
280 ["face the challenge", ["face up to the challenge"]],
281 ["face the problem", ["face up to the problem"]],
282 ["facilitate", ["facilitate easier"]],
283 ["fact", ["established fact"]],
284 ["facts", ["actual facts", "hard facts", "true facts"]],
285 ["fad", ["passing fad"]],
286 ["fall", ["fall down"]],
287 ["fall", ["fall season"]],
288 ["feat", ["major feat"]],
289 ["feel", ["feel inside"]],
290 ["feelings", ["inner feelings"]],
291 ["few", ["few in number"]],
292 ["filled", ["completely filled", "filled to capacity"]],
293 ["first", ["first of all"]],
294 ["first time", ["first time ever"]],
295 ["fist", ["closed fist"]],
296 ["fly", ["fly through the air"]],
297 ["focus", ["focus in", "main focus"]],
298 ["follow", ["follow after"]],
299 ["for example", ["as for example"]],
300 # ["foremost", ["first and foremost"]],
301 ["forever", ["forever and ever"]],
302 ["free", ["for free"]],
303 ["friend", ["personal friend"]],
304 ["friendship", ["personal friendship"]],
305 ["full", ["full to capacity"]],
306 ["fundamentals", ["basic fundamentals"]],
307 ["fuse", ["fuse together"]],
308 ["gather", ["gather together", "gather up"]],
309 ["get up", ["get up on his feet", "get up on your feet"]],
310 ["gift", ["free gift"]],
311 ["gifts", ["free gifts"]],
312 ["goal", ["ultimate goal"]],
313 # ["graduate", ["former graduate"]],
314 ["grow", ["grow in size"]],
315 ["guarantee", ["absolute guarantee"]],
316 ["gunman", ["armed gunman"]],
317 ["gunmen", ["armed gunmen"]],
318 ["habitat", ["native habitat"]],
319 ["had done", ["had done previously"]],
320 ["halves", ["two equal halves"]],
321 # ["has", ["has got"]],
322 # ["have", ["have got"]],
323 ["haven", ["safe haven"]],
324 # ["he", ["he himself"]],
325 ["heat", ["heat up"]],
326 ["history", ["past history"]],
327 ["hoist", ["hoist up"]],
328 ["hole", ["empty hole"]],
329 ["honcho", ["head honcho"]],
330 ["ice", ["frozen ice"]],
331 ["ideal", ["perfect ideal"]],
332 ["identical", ["same identical"]],
333 ["identification", ["positive identification"]],
334 ["imports", ["foreign imports"]],
335 ["impulse", ["sudden impulse"]],
336 ["in fact", ["in actual fact"]],
337 ["in the yard", ["outside in the yard"]],
338 ["inclusive", ["all inclusive"]],
339 ["incredible", ["incredible to believe"]],
340 ["incumbent", ["present incumbent"]],
341 # ["indicted", ["indicted on a charge"]],
342 ["industry", ["private industry"]],
343 ["injuries", ["harmful injuries"]],
344 ["innovation", ["new innovation"]],
345 ["innovative", ["innovative new", "new innovative"]],
346 # ["input", ["input into"]],
347 ["instinct", ["natural instinct", "naturally instinct"]],
348 ["integrate", ["integrate together",
349 "integrate with each other"]],
350 ["interdependent", ["interdependent on each other",
351 "mutually interdependent"]],
352 ["introduced", ["introduced for the first time"]],
353 ["invention", ["new invention"]],
354 ["kneel", ["kneel down"]],
355 ["knots", ["knots per hour"]],
356 # ["last", ["last of all"]],
357 # ["later", ["later time"]],
358 ["lift", ["lift up"]],
359 ["lingers", ["still lingers"]],
360 ["look to the future", ["look ahead to the future"]],
361 ["love triangle", ["three-way love triangle"]],
362 ["maintained", ["constantly maintained"]],
363 ["manually", ["manually by hand"]],
364 ["marina", ["boat marina"]],
365 ["may", ["may possibly"]],
366 ["meet", ["meet together", "meet with each other"]],
367 ["memories", ["past memories"]],
368 ["merge", ["merge together"]],
369 ["merged", ["merged together"]],
370 ["meshed", ["meshed together"]],
371 ["midnight", ["twelve midnight"]],
372 ["migraine", ["migraine headache"]],
373 ["minestrone", ["minestrone soup"]],
374 ["mix", ["mix together"]],
375 ["moment", ["brief moment", "moment in time"]],
376 ["monopoly", ["complete monopoly"]],
377 ["mural", ["wall mural"]],
378 ["mutual respect", ["mutual respect for each other"]],
379 ["mutually dependent", ["mutually dependent on each other"]],
380 ["mystery", ["unsolved mystery"]],
381 # ["naked", ["bare naked"]],
382 ["nape", ["nape of her neck"]],
383 ["necessary", ["absolutely necessary"]],
384 ["never", ["never at any time"]],
385 ["noon", ["12 noon", "12 o'clock noon", "high noon",
386 "twelve noon"]],
387 ["nostalgia", ["nostalgia for the past"]],
388 ["number of", ["number of different"]],
389 ["opening", ["exposed opening"]],
390 ["my opinion", ["my personal opinion"]],
391 ["opposites", ["exact opposites", "polar opposites"]],
392 ["opposite", ["exact opposite", "polar opposite"]],
393 ["orbits", ["orbits around"]],
394 ["outcome", ["final outcome"]],
395 ["panacea", ["universal panacea"]],
396 ["pending", ["now pending"]],
397 ["penetrate", ["penetrate through"]],
398 ["persists", ["still persists"]],
399 ["pioneer", ["old pioneer"]],
400 ["plan", ["plan ahead", "plan in advance",
401 "proposed plan"]],
402 ["planning", ["advance planning", "forward planning"]],
403 ["plans", ["future plans"]],
404 ["plan", ["future plan"]],
405 ["point", ["point in time"]],
406 ["point", ["sharp point"]],
407 ["postpone", ["postpone until later"]],
408 ["pouring rain", ["pouring down rain"]],
409 ["preview", ["advance preview"]],
410 ["previously listed", ["previously listed above"]],
411 ["probed", ["probed into"]],
412 ["proceed", ["proceed ahead"]],
413 ["prosthesis", ["artificial prosthesis"]],
414 # ["protrude", ["protrude out"]],
415 ["proverb", ["old proverb"]],
416 # ["proximity", ["close proximity"]],
417 ["put off", ["put off until later"]],
418 # ["raise", ["raise up"]],
419 ["re-elect", ["re-elect for another term"]],
420 ["reason is", ["reason is because"]],
421 ["recur", ["recur again"]],
422 ["recurrence", ["future recurrence"]],
423 ["refer", ["refer back"]],
424 ["reflect", ["reflect back"]],
425 # ["relevant", ["highly relevant"]],
426 ["remain", ["continue to remain"]],
427 ["remains", ["still remains"]],
428 ["replica", ["exact replica"]],
429 ["reply", ["reply back"]],
430 # ["requirements", ["necessary requirements"]],
431 ["reservations", ["advance reservations"]],
432 ["retreat", ["retreat back"]],
433 ["revert", ["revert back"]],
434 ["round", ["round in shape"]],
435 ["rule of thumb", ["rough rule of thumb"]],
436 ["rumor", ["unconfirmed rumor"]],
437 ["rustic", ["rustic country"]],
438 ["same", ["exact same", "precise same", "same exact"]],
439 ["sanctuary", ["safe sanctuary"]],
440 ["satisfaction", ["full satisfaction"]],
441 ["scrutinize", ["scrutinize in detail"]],
442 ["scrutiny", ["careful scrutiny", "close scrutiny"]],
443 ["secret", ["secret that cannot be told"]],
444 ["seek", ["seek to find"]],
445 ["separated", ["separated apart from each other"]],
446 ["share", ["share together"]],
447 ["shiny", ["shiny in appearance"]],
448 ["sincere", ["truly sincere"]],
449 ["sink", ["sink down"]],
450 ["skipped", ["skipped over"]],
451 # ["slow", ["slow speed"]],
452 # ["small", ["small size"]],
453 ["soft", ["soft in texture", "soft to the touch"]],
454 ["sole", ["sole of the foot"]],
455 ["some time", ["some time to come"]],
456 ["speck", ["small speck"]],
457 ["speed", ["rate of speed"]],
458 ["spell out", ["spell out in detail"]],
459 ["spiked", ["spiked upward", "spiked upwards"]],
460 ["spring", ["spring season"]],
461 ["stranger", ["anonymous stranger"]],
462 ["studio audience", ["live studio audience"]],
463 ["subway", ["underground subway"]],
464 ["sufficient", ["sufficient enough"]],
465 ["summer", ["summer season"]],
466 ["sure", ["absolutely sure"]],
467 ["surprise", ["unexpected surprise"]],
468 ["surround", ["completely surround"]],
469 ["surrounded", ["surrounded on all sides"]],
470 ["tall", ["tall in height", "tall in stature"]],
471 ["telepathy", ["mental telepathy"]],
472 ["ten", ["ten in number"]],
473 ["these", ["these ones"]],
474 # ["they", ["they themselves"]],
475 ["those", ["those ones"]],
476 ["trench", ["open trench"]],
477 ["truth", ["honest truth"]],
478 ["tundra", ["frozen tundra"]],
479 ["ultimatum", ["final ultimatum"]],
480 # ["undeniable", ["undeniable truth"]],
481 ["undergraduate", ["undergraduate student"]],
482 # ["unintentional", ["unintentional mistake"]],
483 ["vacillate", ["vacillate back and forth"]],
484 ["veteran", ["former veteran"]],
485 ["visible", ["visible to the eye"]],
486 ["warn", ["warn in advance"]],
487 ["warning", ["advance warning"]],
488 ["water heater", ["hot water heater"]],
489 ["in which we live", ["in which we live in"]],
490 ["winter", ["winter season"]],
491 ["witness", ["live witness"]],
492 ["yakitori", ["yakitori chicken"]],
493 ["yerba mate", ["yerba mate tea"]],
494 ["yes", ["affirmative yes"]],
495 ]
496
497 return preferred_forms_check(text, redundancies, err, msg)