def check_ellipsis(text): """Use an ellipsis instead of three dots.""" err = "butterick.symbols.ellipsis" msg = u"'...' is an approximation, use the ellipsis symbol '…'." regex = "\.\.\." return existence_check(text, [regex], err, msg, max_errors=3, require_padding=False, offset=0)
def check_repeated_exclamations(text): """Check the text.""" err = "inc.corporate_speak" msg = u"Minimize your use of corporate catchphrases like this one." list = [ "at the end of the day", "back to the drawing board", "hit the ground running", "get the ball rolling", "low-hanging fruit", "thrown under the bus", "think outside the box", "let's touch base", "get my manager's blessing", "it's on my radar", "ping me", "i don't have the bandwidth", "no brainer", "par for the course", "bang for your buck", "synergy", "move the goal post", "apples to apples", "win-win", "circle back around", "all hands on deck", "take this offline", "drill-down", "elephant in the room", "on my plate", ] return existence_check(text, list, err, msg, ignore_case=True)
def check(text): """Check the text.""" err = "garner.commercialese" msg = u"'{}' is commercialese." commercialese = [ "acknowledging yours of", "beg to advise", "enclosed herewith", "enclosed please find", "further to yours of", "further to your letter", "in regard to", "inst\.", "in the amount of", "of even date", "pending receipt of", "please be advised that", "please return same", "pleasure of a reply", "prox\.", "pursuant to your request", "regarding the matter", "regret to inform", "thanking you in advance", "the undersigned", "this acknowledges your letter", "ult\." "we are pleased to note", "with regard to", "your favor has come to hand", "yours of even date" ] return existence_check(text, commercialese, err, msg, join=True)
def check_midnight_noon(text): """Check the text.""" err = "garner.am_pm.midnight_noon" msg = (u"12 a.m. and 12 p.m. are wrong and confusing." " Use 'midnight' or 'noon'.") return existence_check(text, ["12 ?[ap]\.?m\.?"], err, msg)
def check_copyright_symbol(text): """Use the copyright symbol instead of (c).""" err = "butterick.symbols.copyright" msg = u"(c) is a goofy alphabetic approximation, use the symbol ©." regex = "\([cC]\)" return existence_check(text, [regex], err, msg, max_errors=1, require_padding=False)
def check_registered_trademark_symbol(text): """Use the registered trademark symbol instead of (R).""" err = "butterick.symbols.trademark" msg = u"(R) is a goofy alphabetic approximation, use the symbol ®." regex = "\([rR]\)" return existence_check(text, [regex], err, msg, max_errors=3, require_padding=False)
def check_sentence_spacing(text): """Use no more than two spaces after a period.""" err = "butterick.symbols.sentence_spacing" msg = u"More than two spaces after the period; use 1 or 2." regex = "\. {3}" return existence_check(text, [regex], err, msg, max_errors=3, require_padding=False)
def check(text): """Check the text.""" err = "garner.oxymorons" msg = u"'{}' is an oxymoron." oxymorons = [ "amateur expert", "increasingly less", "advancing backwards?", "alludes explicitly to", "explicitly alludes to", "totally obsolescent", "completely obsolescent", "generally always", "usually always", "increasingly less", "build down", "conspicuous absence", "exact estimate", "executive secretary", "found missing", "intense apathy", "mandatory choice", "nonworking mother", "organized mess", # "pretty ugly", # "sure bet", ] return existence_check(text, oxymorons, err, msg, offset=1, join=True)
def check(text): """Check the text.""" err = "misc.chatspeak" msg = u"'{}' is chatspeak. Write it out." words = [ "2day", "4U", "AFAIK", "AFK", "AFK", "ASAP", "B4", "brb", "btw", "cya", "GR8", "lol", "LOL", "LUV", "OMG", "rofl", "roftl", "sum1", "SWAK", "THNX", "THX", "TTYL", "XOXO" ] return existence_check(text, words, err, msg)
def check_multiplication_symbol(text): u"""Use the multiplication symbol ×, not the lowercase letter x.""" err = "butterick.symbols.multiplication_symbol" msg = u"Use the multiplication symbol ×, not the letter x." regex = "[0-9]+ ?x ?[0-9]+" return existence_check( text, [regex], err, msg, max_errors=3, require_padding=False)
def check_coin_a_phrase_from(text): """Check the text.""" err = "garner.illogic.coin" msg = "You can't coin an existing phrase. Did you mean 'borrow'?" regex = "to coin a phrase from" return existence_check(text, [regex], err, msg, offset=1)
def check_ellipsis(text): """Use an ellipsis instead of three dots.""" err = "palahniuk.suddenly" msg = u"Suddenly is nondescript, slows the action, and warns your reader." regex = "Suddenly," return existence_check(text, [regex], err, msg, max_errors=3, require_padding=False, offset=-1, ignore_case=False)
def check_ly(text): """Check the text.""" err = "garner.phrasal_adjectives.ly" msg = u"""No hyphen is necessary in phrasal adjectives with an adverb ending in -ly.""" return existence_check(text, ["ly-"], err, msg, require_padding=False, offset=-1)
def check(text): """Check the text.""" err = "write_good.lexical_illusions" msg = u"There's a lexical illusion here: a word is repeated." list = ["the\sthe", "am\sam", "has\shas"] return existence_check(text, list, err, msg)
def check(text): """Suggest the preferred forms.""" err = "pinker.hedging" msg = "Hedging. Just say it." narcisissm = ["I would argue that", ", so to speak", "to a certain degree"] return existence_check(text, narcisissm, err, msg)
def check_without_your_collusion(text): """Check the textself.""" err = "garner.illogic.collusion" msg = "It's impossible to defraud yourself. Try 'aquiescence'." regex = "without your collusion" return existence_check(text, [regex], err, msg, require_padding=False, offset=-1)
def check_very_damn(text): """Use the registered trademark symbol instead of (R).""" err = "twain.damn" msg = ("Substitute 'damn' every time you're " "inclined to write 'very;' your editor will delete it " "and the writing will be just as it should be.") regex = "very" return existence_check(text, [regex], err, msg, max_errors=1)
def check_repeated_exclamations(text): """Check the text.""" err = "leonard.hell" msg = u"Never use the words 'all hell broke loose'." regex = r"all hell broke loose" return existence_check( text, [regex], err, msg, max_errors=1)
def check(text): """Suggest the preferred forms.""" err = "pinker.apologizing" msg = "Excessive apologizing." narcisissm = [ "More research is needed", ] return existence_check(text, narcisissm, err, msg)
def check_et_al(text): """Check the text.""" err = "garner.punctuation" msg = u"Misplaced punctuation. It's 'et al.'" list = [ "et. al", "et. al." ] return existence_check(text, list, err, msg, join=True)
def check(text): """Suggest the preferred forms.""" err = "pinker.scare_quotes" msg = "Misuse of 'scare quotes'. Delete them." narcisissm = [ "the 'take-home message'", ] return existence_check(text, narcisissm, err, msg)
def check_repeated_exclamations(text): """Check the text.""" err = "leonard.exclamation.multiple" msg = u"Stop yelling. Keep your exclamation points under control." regex = r"[^A-Z]\b((\s[A-Z]+){3,})" return existence_check( text, [regex], err, msg, require_padding=False, ignore_case=False, max_errors=1, dotall=True)
def check_repeated_exclamations(text): """Check the text.""" err = "skekely.nword" msg = u"Take responsibility for the shitty words you want to say." list = [ "the n-word", ] return existence_check(text, list, err, msg)
def check(text): """Suggest the preferred forms.""" err = "pinker.narcisissm" msg = "Professional narcisissm. Talk about the subject, not its study." narcisissm = [ "In recent years, an increasing number of [a-zA-Z]{3,}sts have", ] return existence_check(text, narcisissm, err, msg)
def check(text): """Check the text.""" err = "misc.hyperbolic" msg = u"'{}' is hyperbolic." words = [ "[a-z]*[!]{2,}", "[a-z]*\?{2,}" ] return existence_check(text, words, err, msg)
def check(text): """Check the text.""" err = "garner.bureaucratese" msg = u"'{}' is bureaucratese." bureaucratese = [ "meet with your approval", "meets with your approval", ] return existence_check(text, bureaucratese, err, msg, join=True)
def check(text): """Check the text.""" err = "garner.airlinese" msg = u"'{}' is airlinese." airlinese = [ "enplan(?:e|ed|ing|ement)", "deplan(?:e|ed|ing|ement)", "taking off momentarily", ] return existence_check(text, airlinese, err, msg)
def check(text): """Check the text.""" err = "write_good.lexical_illusions" msg = u"There's a lexical illusion here: a word is repeated." list = [ "the\sthe", "am\sam", "has\shas" ] return existence_check(text, list, err, msg)
def check_p_equals_zero(text): """Check for p = 0.000.""" err = "lilienfeld.terms_to_avoid.p_equals_zero" msg = "Unless p really equals zero, you should use more decimal places." list = [ "p = 0.00", "p = 0.000", "p = 0.0000", ] return existence_check(text, list, err, msg, join=True)
def check(text): """Check the text.""" err = "garner.malapropisms" msg = u"'{}' is a malapropism." illogics = [ "the infinitesimal universe", "a serial experience", "attack my voracity", ] return existence_check(text, illogics, err, msg, offset=1)
def check_redundancy(text): """Check the text.""" err = "garner.am_pm.midnight_noon" msg = (u"'a.m.' is always morning; 'p.m.' is always night.") list = [ "\d{1,2} ?a\.?m\.? in the morning", "\d{1,2} ?p\.?m\.? in the evening", "\d{1,2} ?p\.?m\.? at night", "\d{1,2} ?p\.?m\.? in the afternoon", ] return existence_check(text, list, err, msg, join=True)