Skip to content

Commit

Permalink
Merge pull request #500 from amperser/pr/376
Browse files Browse the repository at this point in the history
Pr/376
  • Loading branch information
suchow authored Jun 28, 2016
2 parents 7e0b237 + f37d162 commit 248e3e0
Show file tree
Hide file tree
Showing 2 changed files with 361 additions and 0 deletions.
358 changes: 358 additions & 0 deletions proselint/checks/redundancy/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,361 @@ def check_nordquist(text):
["p.m.", ["p.m. at night"]],
]
return preferred_forms_check(text, redundancies, err, msg)


@memoize
def check_atd(text):
"""Check for redundancies from After the Deadline."""
err = "after_the_deadline.redundancy"
msg = "Redundancy. Use '{}' instead of '{}'."

redundancies = [
[u"Bō", ["Bo Staff"]],
["Challah", ["Challah bread"]],
["Hallah", ["Hallah bread"]],
["Challah", ["Challah bread"]],
["I", ["I myself", "I personally"]],
["Mount Fuji", ["Mount Fujiyama"]],
["Milky Way", ["Milky Way galaxy"]],
["Rio Grande", ["Rio Grande river"]],
["adage", ["old adage"]],
["add", ["add a further", "add an additional"]],
["advance", ["advance forward"]],
["alternative", ["alternative choice"]],
["amaretto", ["amaretto almond"]],
["annihilate", ["completely annihilate"]],
["anniversary", ["annual anniversary"]],
["anonymous", ["unnamed anonymous"]],
["as", ["equally as"]],
["ascend", ["ascend up"]],
["ask", ["ask the question"]],
["assemble", ["assemble together"]],
["at present the", ["at the present time the"]],
["at this point", ["at this point in time"]],
["attach", ["attach together"]],
["autumn", ["autumn season"]],
["bald", ["bald-headed"]],
["balsa", ["balsa wood"]],
["belongings", ["personal belongings"]],
["benefits", ["desirable benefits"]],
["bento", ["bento box"]],
["best", ["best ever"]],
["bit", ["tiny bit"]],
["blend", ["blend together"]],
["bond", ["common bond"]],
["bonus", ["added bonus", "extra bonus"]],
["bouquet", ["bouquet of flowers"]],
["breakthrough", ["major breakthrough"]],
["bride", ["new bride"]],
["brief", ["brief in duration"]],
["bruin", ["bruin bear"]],
["hot", ["burning hot"]],
["cacophony", ["cacophony of sound"]],
["cameo", ["brief cameo", "cameo appearance"]],
["cancel", ["cancel out"]],
["cash", ["cash money"]],
["chai", ["chai tea"]],
["chance", ["random chance"]],
["charm", ["personal charm"]],
["circle", ["circle around", "round circle"]],
["circulate", ["circulate around"]],
["classify", ["classify into groups"]],
["classmates", ["fellow classmates"]],
["cliche", ["old cliche", "overused cliche"]],
["climb", ["climb up"]],
["clock", ["time clock"]],
["collaborate", ["collaborate together"]],
["collaboration", ["joint collaboration"]],
["colleague", ["fellow colleague"]],
["combine", ["combine together"]],
["commute", ["commute back and forth"]],
["compete", ["compete with each other"]],
["comprise", ["comprise of"]],
["comprises", ["comprises of"]],
["conceived", ["first conceived"]],
["conclusion", ["final conclusion"]],
["confer", ["confer together"]],
["confrontation", ["direct confrontation"]],
# ["confused", ["confused state"]],
["connect", ["connect together", "connect up"]],
["consensus", ["consensus of opinion", "general consensus"]],
["consult", ["consult with"]],
["conversation", ["oral conversation"]],
["cool", ["cool down"]],
["cooperate", ["cooperate together"]],
["cooperation", ["mutual cooperation"]],
["copy", ["duplicate copy"]],
["core", ["inner core"]],
["cost", ["cost the sum of"]],
["could", ["could possibly"]],
["coupon", ["money-saving coupon"]],
["created", ["originally created"]],
["crisis", ["crisis situation"]],
["crouch", ["crouch down"]],
["currently", ["now currently"]],
["custom", ["old custom", "usual custom"]],
["danger", ["serious danger"]],
["dates", ["dates back"]],
["decision", ["definite decision"]],
["depreciate", ["depreciate in value"]],
["descend", ["descend down"]],
["destroy", ["totally destroy"]],
["destroyed", ["completely destroyed"]],
["destruction", ["total destruction"]],
["details", ["specific details"]],
["dilemma", ["difficult dilemma"]],
["disappear", ["disappear from sight"]],
["discovered", ["originally discovered"]],
["dive", ["dive down"]],
["done", ["over and done with"]],
["drawing", ["illustrated drawing"]],
["drop", ["drop down"]],
["dune", ["sand dune"]],
["during", ["during the course of"]],
["dwindle", ["dwindle down"]],
["dwindled", ["dwindled down"]],
["every", ["each and every"]],
["earlier", ["earlier in time"]],
["eliminate", ["completely eliminate", "eliminate altogether",
"entirely eliminate"]],
["ember", ["glowing ember"]],
["embers", ["burning embers"]],
["emergency", ["emergency situation", "unexpected emergency"]],
["empty", ["empty out"]],
["enclosed", ["enclosed herein"]],
["end", ["final end"]],
["engulfed", ["completely engulfed"]],
["enter", ["enter in", "enter into"]],
["equal", ["equal to one another"]],
["eradicate", ["eradicate completely"]],
["essential", ["absolutely essential"]],
["estimated at", ["estimated at about",
"estimated at approximately",
"estimated at around"]],
["etc.", ["and etc."]],
["evolve", ["evolve over time"]],
["exaggerate", ["over exaggerate"]],
["exited", ["exited from"]],
["experience", ["actual experience", "past experience"]],
["experts", ["knowledgeable experts"]],
["extradite", ["extradite back"]],
["face the consequences", ["face up to the consequences"]],
["face the fact", ["face up to the fact"]],
["face the challenge", ["face up to the challenge"]],
["face the problem", ["face up to the problem"]],
["facilitate", ["facilitate easier"]],
["fact", ["established fact"]],
["facts", ["actual facts", "hard facts", "true facts"]],
["fad", ["passing fad"]],
["fall", ["fall down"]],
["fall", ["fall season"]],
["feat", ["major feat"]],
["feel", ["feel inside"]],
["feelings", ["inner feelings"]],
["few", ["few in number"]],
["filled", ["completely filled", "filled to capacity"]],
["first", ["first of all"]],
["first time", ["first time ever"]],
["fist", ["closed fist"]],
["fly", ["fly through the air"]],
["focus", ["focus in", "main focus"]],
["follow", ["follow after"]],
["for example", ["as for example"]],
# ["foremost", ["first and foremost"]],
["forever", ["forever and ever"]],
["free", ["for free"]],
["friend", ["personal friend"]],
["friendship", ["personal friendship"]],
["full", ["full to capacity"]],
["fundamentals", ["basic fundamentals"]],
["fuse", ["fuse together"]],
["gather", ["gather together", "gather up"]],
["get up", ["get up on his feet", "get up on your feet"]],
["gift", ["free gift"]],
["gifts", ["free gifts"]],
["goal", ["ultimate goal"]],
# ["graduate", ["former graduate"]],
["grow", ["grow in size"]],
["guarantee", ["absolute guarantee"]],
["gunman", ["armed gunman"]],
["gunmen", ["armed gunmen"]],
["habitat", ["native habitat"]],
["had done", ["had done previously"]],
["halves", ["two equal halves"]],
# ["has", ["has got"]],
# ["have", ["have got"]],
["haven", ["safe haven"]],
# ["he", ["he himself"]],
["heat", ["heat up"]],
["history", ["past history"]],
["hoist", ["hoist up"]],
["hole", ["empty hole"]],
["honcho", ["head honcho"]],
["ice", ["frozen ice"]],
["ideal", ["perfect ideal"]],
["identical", ["same identical"]],
["identification", ["positive identification"]],
["imports", ["foreign imports"]],
["impulse", ["sudden impulse"]],
["in fact", ["in actual fact"]],
["in the yard", ["outside in the yard"]],
["inclusive", ["all inclusive"]],
["incredible", ["incredible to believe"]],
["incumbent", ["present incumbent"]],
# ["indicted", ["indicted on a charge"]],
["industry", ["private industry"]],
["injuries", ["harmful injuries"]],
["innovation", ["new innovation"]],
["innovative", ["innovative new", "new innovative"]],
# ["input", ["input into"]],
["instinct", ["natural instinct", "naturally instinct"]],
["integrate", ["integrate together",
"integrate with each other"]],
["interdependent", ["interdependent on each other",
"mutually interdependent"]],
["introduced", ["introduced for the first time"]],
["invention", ["new invention"]],
["kneel", ["kneel down"]],
["knots", ["knots per hour"]],
# ["last", ["last of all"]],
# ["later", ["later time"]],
["lift", ["lift up"]],
["lingers", ["still lingers"]],
["look to the future", ["look ahead to the future"]],
["love triangle", ["three-way love triangle"]],
["maintained", ["constantly maintained"]],
["manually", ["manually by hand"]],
["marina", ["boat marina"]],
["may", ["may possibly"]],
["meet", ["meet together", "meet with each other"]],
["memories", ["past memories"]],
["merge", ["merge together"]],
["merged", ["merged together"]],
["meshed", ["meshed together"]],
["midnight", ["twelve midnight"]],
["migraine", ["migraine headache"]],
["minestrone", ["minestrone soup"]],
["mix", ["mix together"]],
["moment", ["brief moment", "moment in time"]],
["monopoly", ["complete monopoly"]],
["mural", ["wall mural"]],
["mutual respect", ["mutual respect for each other"]],
["mutually dependent", ["mutually dependent on each other"]],
["mystery", ["unsolved mystery"]],
# ["naked", ["bare naked"]],
["nape", ["nape of her neck"]],
["necessary", ["absolutely necessary"]],
["never", ["never at any time"]],
["noon", ["12 noon", "12 o'clock noon", "high noon",
"twelve noon"]],
["nostalgia", ["nostalgia for the past"]],
["number of", ["number of different"]],
["opening", ["exposed opening"]],
["my opinion", ["my personal opinion"]],
["opposites", ["exact opposites", "polar opposites"]],
["opposite", ["exact opposite", "polar opposite"]],
["orbits", ["orbits around"]],
["outcome", ["final outcome"]],
["panacea", ["universal panacea"]],
["pending", ["now pending"]],
["penetrate", ["penetrate through"]],
["persists", ["still persists"]],
["pioneer", ["old pioneer"]],
["plan", ["plan ahead", "plan in advance",
"proposed plan"]],
["planning", ["advance planning", "forward planning"]],
["plans", ["future plans"]],
["plan", ["future plan"]],
["point", ["point in time"]],
["point", ["sharp point"]],
["postpone", ["postpone until later"]],
["pouring rain", ["pouring down rain"]],
["preview", ["advance preview"]],
["previously listed", ["previously listed above"]],
["probed", ["probed into"]],
["proceed", ["proceed ahead"]],
["prosthesis", ["artificial prosthesis"]],
# ["protrude", ["protrude out"]],
["proverb", ["old proverb"]],
# ["proximity", ["close proximity"]],
["put off", ["put off until later"]],
# ["raise", ["raise up"]],
["re-elect", ["re-elect for another term"]],
["reason is", ["reason is because"]],
["recur", ["recur again"]],
["recurrence", ["future recurrence"]],
["refer", ["refer back"]],
["reflect", ["reflect back"]],
# ["relevant", ["highly relevant"]],
["remain", ["continue to remain"]],
["remains", ["still remains"]],
["replica", ["exact replica"]],
["reply", ["reply back"]],
# ["requirements", ["necessary requirements"]],
["reservations", ["advance reservations"]],
["retreat", ["retreat back"]],
["revert", ["revert back"]],
["round", ["round in shape"]],
["rule of thumb", ["rough rule of thumb"]],
["rumor", ["unconfirmed rumor"]],
["rustic", ["rustic country"]],
["same", ["exact same", "precise same", "same exact"]],
["sanctuary", ["safe sanctuary"]],
["satisfaction", ["full satisfaction"]],
["scrutinize", ["scrutinize in detail"]],
["scrutiny", ["careful scrutiny", "close scrutiny"]],
["secret", ["secret that cannot be told"]],
["seek", ["seek to find"]],
["separated", ["separated apart from each other"]],
["share", ["share together"]],
["shiny", ["shiny in appearance"]],
["sincere", ["truly sincere"]],
["sink", ["sink down"]],
["skipped", ["skipped over"]],
# ["slow", ["slow speed"]],
# ["small", ["small size"]],
["soft", ["soft in texture", "soft to the touch"]],
["sole", ["sole of the foot"]],
["some time", ["some time to come"]],
["speck", ["small speck"]],
["speed", ["rate of speed"]],
["spell out", ["spell out in detail"]],
["spiked", ["spiked upward", "spiked upwards"]],
["spring", ["spring season"]],
["stranger", ["anonymous stranger"]],
["studio audience", ["live studio audience"]],
["subway", ["underground subway"]],
["sufficient", ["sufficient enough"]],
["summer", ["summer season"]],
["sure", ["absolutely sure"]],
["surprise", ["unexpected surprise"]],
["surround", ["completely surround"]],
["surrounded", ["surrounded on all sides"]],
["tall", ["tall in height", "tall in stature"]],
["telepathy", ["mental telepathy"]],
["ten", ["ten in number"]],
["these", ["these ones"]],
# ["they", ["they themselves"]],
["those", ["those ones"]],
["trench", ["open trench"]],
["truth", ["honest truth"]],
["tundra", ["frozen tundra"]],
["ultimatum", ["final ultimatum"]],
# ["undeniable", ["undeniable truth"]],
["undergraduate", ["undergraduate student"]],
# ["unintentional", ["unintentional mistake"]],
["vacillate", ["vacillate back and forth"]],
["veteran", ["former veteran"]],
["visible", ["visible to the eye"]],
["warn", ["warn in advance"]],
["warning", ["advance warning"]],
["water heater", ["hot water heater"]],
["in which we live", ["in which we live in"]],
["winter", ["winter season"]],
["witness", ["live witness"]],
["yakitori", ["yakitori chicken"]],
["yerba mate", ["yerba mate tea"]],
["yes", ["affirmative yes"]],
]

return preferred_forms_check(text, redundancies, err, msg)
3 changes: 3 additions & 0 deletions proselint/checks/redundancy/ras_syndrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ def check_redundant_acronym_syndrome(text):

redundancies = [
["ABM", ["ABM missile"]],
["ACT", ["ACT test"]],
["ABMs", ["ABM missiles"]],
["ABS", ["ABS braking system"]],
["ATM", ["ATM machine"]],
["CD", ["CD disc"]],
["CPI", ["CPI Index"]],
["GPS", ["GPS system"]],
["GUI", ["GUI interface"]],
["HIV", ["HIV virus"]],
["ISBN", ["ISBN number"]],
["LCD", ["LCD display"]],
["PDF", ["PDF format"]],
["PIN", ["PIN number"]],
Expand Down

0 comments on commit 248e3e0

Please sign in to comment.