def check(text): """Suggest the preferred forms.""" err = "sexism.misc" msg = "Gender bias. Use '{}' instead of '{}'." sexism = [ ["anchor", ["anchorman", "anchorwoman"]], ["chair", ["chairman", "chairwoman"]], ["drafter", ["draftman", "draftwoman"]], ["ombuds", ["ombudsman", "ombudswoman"]], ["tribe member", ["tribesman", "tribeswoman"]], ["police officer", ["policeman", "policewoman"]], ["firefighter", ["fireman", "firewoman"]], ["mail carrier", ["mailman", "mailwoman"]], ["history", ["herstory"]], ["women", ["womyn"]], ["poet", ["poetess"]], ["author", ["authoress"]], ["waiter", ["waitress"]], ["lawyer", ["lady lawyer"]], ["doctor", ["woman doctor"]], ["bookseller", ["female booksalesman"]], ["air pilot", ["female airman"]], ["executor", ["executrix"]], ["prosecutor", ["prosecutrix"]], ["testator", ["testatrix"]], ["husband and wife", ["man and wife"]], ["chairs", ["chairmen and chairs"]], ["men and women", ["men and girls"]], ["comedian", ["comedienne"]], ["confidant", ["confidante"]], ["scientist", ["woman scientist"]], ["scientists", ["women scientists"]] # ["hero", ["heroine"]] ] errors = preferred_forms_check(text, sexism, err, msg, ignore_case=False) msg = "Not a preferred form. Use '{}' instead of '{}'." pref = [ ["anchor", ["anchorperson"]], ["chair", ["chairperson"]], ["drafter", ["draftperson"]], ["ombuds", ["ombudsperson"]], ["tribe member", ["tribesperson"]], ["police officer", ["policeperson"]], ["firefighter", ["fireperson"]], ["mail carrier", ["mailperson"]], ] for x in preferred_forms_check(text, pref, err, msg, ignore_case=False): errors.append(x) return errors
def check(text): """Suggest the preferred forms.""" err = "misc.waxed" msg = u"The modifier following 'waxed' must be an adj.: '{}' is correct" waxes = ["wax", "waxes", "waxed", "waxing"] modifiers = [("ebullient", "ebulliently"), ("ecstatic", "ecstatically"), ("eloquent", "eloquently"), ("enthusiastic", "enthusiastically"), ("euphoric", "euphorically"), ("indignant", "indignantly"), ("lyrical", "lyrically"), ("melancholic", "melancholically"), ("metaphorical", "metaphorically"), ("nostalgic", "nostalgically"), ("patriotic", "patriotically"), ("philosophical", "philosophically"), ("poetic", "poetically"), ("rhapsodic", "rhapsodically"), ("romantic", "romantically"), ("sentimental", "sentimentally") ] def pairs(word): return [[word + ' ' + pair[0], [word + ' ' + pair[1]]] for pair in modifiers] preferred = [] for word in waxes: preferred += pairs(word) return preferred_forms_check(text, preferred, err, msg)
def check(text): """-er vs. -or.""" err = "spelling.er_or" msg = "-er vs. -or. '{}' is the preferred spelling." preferences = [ ["abductor", ["abducter"]], ["abettor", ["abbeter"]], ["acquirer", ["acquiror"]], ["adapter", ["adaptor"]], ["collector", ["collecter"]], ["conjurer", ["conjuror"]], ["corrupter", ["corruptor"]], ["digester", ["digestor"]], ["dispenser", ["dispensor"]], ["distributor", ["distributer"]], ["endorser", ["endorsor"]], ["eraser", ["erasor"]], ["idolater", ["idolator"]], ["impostor", ["imposter"]], ["infiltrator", ["infiltrater"]], ["investor", ["invester"]], ["manipulator", ["manipulater"]], ["mortgagor", ["mortgager"]], ["persecutor", ["persecuter"]], ["promoter", ["promotor"]], ["promoter", ["promotor"]], ["purveyor", ["purveyer"]], ["requester", ["requestor"]], ["reviser", ["revisor"]], ["surveyor", ["surveyer"]], ] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "misc.waxed" msg = "The modifier following 'waxed' must be an adj.: '{}' is correct" waxes = ["wax", "waxes", "waxed", "waxing"] modifiers = [ ("ebullient", "ebulliently"), ("ecstatic", "ecstatically"), ("eloquent", "eloquently"), ("enthusiastic", "enthusiastically"), ("euphoric", "euphorically"), ("indignant", "indignantly"), ("lyrical", "lyrically"), ("melancholic", "melancholically"), ("metaphorical", "metaphorically"), ("nostalgic", "nostalgically"), ("patriotic", "patriotically"), ("philosophical", "philosophically"), ("poetic", "poetically"), ("rhapsodic", "rhapsodically"), ("romantic", "romantically"), ("sentimental", "sentimentally") ] def pairs(word): return [[word + ' ' + pair[0], [word + ' ' + pair[1]]] for pair in modifiers] preferred = [] for word in waxes: preferred += pairs(word) return preferred_forms_check(text, preferred, err, msg)
def check_er_or(text): """-er vs. -or.""" err = "spelling.er_or" msg = "-er vs. -or. '{}' is the preferred spelling." preferences = [ ["abductor", ["abducter"]], ["abettor", ["abbeter"]], ["acquirer", ["acquiror"]], ["adapter", ["adaptor"]], ["collector", ["collecter"]], ["conjurer", ["conjuror"]], ["corrupter", ["corruptor"]], ["digester", ["digestor"]], ["dispenser", ["dispensor"]], ["distributor", ["distributer"]], ["endorser", ["endorsor"]], ["eraser", ["erasor"]], ["idolater", ["idolator"]], ["impostor", ["imposter"]], ["infiltrator", ["infiltrater"]], ["investor", ["invester"]], ["manipulator", ["manipulater"]], ["mortgagor", ["mortgager"]], ["persecutor", ["persecuter"]], ["promoter", ["promotor"]], ["promoter", ["promotor"]], ["purveyor", ["purveyer"]], ["requester", ["requestor"]], ["reviser", ["revisor"]], ["surveyor", ["surveyer"]], ] return preferred_forms_check(text, preferences, err, msg)
def check_redundant_acronym_syndrome(text): """Suggest the preferred forms.""" err = "garner.redundancy.ras" msg = "RAS syndrome. Use '{}' instead of '{}'." 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"]], ["RAS", ["RAS syndrome"]], ["RIP", ["RIP in peace"]], ["RSVP", ["please RSVP"]], ["SALT", ["SALT talks"]], ["SAT", ["SAT test"]], ["UPC", ["UPC codes"]], ] return preferred_forms_check(text, redundancies, err, msg)
def check_denizen_labels_norris(text): """Suggest the preferred forms. source: Mary Norris source_url: http://nyr.kr/1rGienj """ err = "terms.denizen_labels.norris" msg = "Would you like '{}'?" preferences = [ ["Mancunian", ["Manchesterian"]], ["Mancunians", ["Manchesterians"]], ["Vallisoletano", ["Valladolidian"]], ["Wulfrunian", ["Wolverhamptonian", "Wolverhamptonite"]], ["Novocastrian", ["Newcastleite", "Newcastlite"]], ["Trifluvian", ["Trois-Rivièrester"]], ["Leodenisian", ["Leedsian"]], ["Minneapolitan", ["Minneapolisian"]], ["Hartlepudlian", ["Hartlepoolian"]], ["Liverpudlian", ["Liverpoolian"]], ["Haligonian", ["Halifaxer"]], ["Varsovian", ["Warsawer", "Warsawian"]], ["Providentian", ["Providencian", "Providencer"]], ["Tridentine", ["Trentian", "Trentonian"]], ] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "wsj.athletes" msg = "Misspelling of athlete's name. '{}' is the preferred form." misspellings = [ ["Dwyane Wade", ["Dwayne Wade"]], ["Miikka Kiprusoff", ["Mikka Kiprusoff"]], ["Mark Buehrle", ["Mark Buerhle"]], ["Skylar Diggins", ["Skyler Diggins"]], ["Agnieszka Radwanska", ["Agnieska Radwanska"]], ["J.J. Redick", ["J.J. Reddick"]], ["Manny Pacquiao", ["Manny Packquaio"]], ["Antawn Jamison", ["Antwan Jamison"]], ["Cal Ripken", ["Cal Ripkin"]], ["Jhonny Peralta", ["Johnny Peralta"]], ["Monta Ellis", ["Monte Ellis"]], ["Alex Rodriguez", ["Alex Rodriquez"]], ["Mark Teixeira", ["Mark Texeira"]], ["Brett Favre", ["Brett Farve"]], ["Torii Hunter", ["Tori Hunter"]], ["Stephen Curry", ["Stephon Curry"]], ["Mike Krzyzewski", ["Mike Kryzewski"]], ] return preferred_forms_check(text, misspellings, err, msg)
def check(text): """Suggest the preferred forms.""" err = "spelling.athletes" msg = "Misspelling of athlete's name. '{}' is the preferred form." misspellings = [ ["Dwyane Wade", ["Dwayne Wade"]], ["Miikka Kiprusoff", ["Mikka Kiprusoff"]], ["Mark Buehrle", ["Mark Buerhle"]], ["Skylar Diggins", ["Skyler Diggins"]], ["Agnieszka Radwanska", ["Agnieska Radwanska"]], ["J.J. Redick", ["J.J. Reddick"]], ["Manny Pacquiao", ["Manny Packquaio"]], ["Antawn Jamison", ["Antwan Jamison"]], ["Cal Ripken", ["Cal Ripkin"]], ["Jhonny Peralta", ["Johnny Peralta"]], ["Monta Ellis", ["Monte Ellis"]], ["Alex Rodriguez", ["Alex Rodriquez"]], ["Mark Teixeira", ["Mark Texeira"]], ["Brett Favre", ["Brett Farve"]], ["Torii Hunter", ["Tori Hunter"]], ["Stephen Curry", ["Stephon Curry"]], ["Mike Krzyzewski", ["Mike Kryzewski"]], ] return preferred_forms_check(text, misspellings, err, msg)
def check_denizen_labels_norris(text): """Suggest the preferred forms. source: Mary Norris source_url: http://nyr.kr/1rGienj """ err = "terms.denizen_labels.norris" msg = "Would you like '{}'?" preferences = [ ["Mancunian", ["Manchesterian"]], ["Mancunians", ["Manchesterians"]], ["Vallisoletano", ["Valladolidian"]], ["Wulfrunian", ["Wolverhamptonian", "Wolverhamptonite"]], ["Novocastrian", ["Newcastleite", "Newcastlite"]], ["Trifluvian", [u"Trois-Rivièrester"]], ["Leodenisian", ["Leedsian"]], ["Minneapolitan", ["Minneapolisian"]], ["Hartlepudlian", ["Hartlepoolian"]], ["Liverpudlian", ["Liverpoolian"]], ["Haligonian", ["Halifaxer"]], ["Varsovian", ["Warsawer", "Warsawian"]], ["Providentian", ["Providencian", "Providencer"]], ["Tridentine", ["Trentian", "Trentonian"]], ] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "garner.redundancy.ras" msg = "RAS syndrome. Use '{}' instead of '{}'." 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"]], ["RAS", ["RAS syndrome"]], ["RIP", ["RIP in peace"]], ["RSVP", ["please RSVP"]], ["SALT", ["SALT talks"]], ["SAT", ["SAT test"]], ["UPC", ["UPC codes"]], ] return preferred_forms_check(text, redundancies, err, msg)
def check(text): """Suggest the preferred forms.""" err = "strunk_white.composition" msg = "Try '{}' instead of '{}'." bad_forms = [ # Put statements in positive form ["dishonest", ["not honest"]], ["trifling", ["not important"]], ["forgot", ["did not remember"]], ["ignored", ["did not pay (any )?attention to"]], ["distrusted", ["did not have much confidence in"]], # Omit needless words ["whether", ["the question as to whether"]], ["no doubt", ["there is no doubt but that"]], ["used for fuel", ["used for fuel purposes"]], ["he", ["he is a man who"]], ["hastily", ["in a hasty manner"]], ["this subject", ["this is a subject that"]], ["Her story is strange.", ["Her story is a strange one."]], ["because", ["the reason why is that"]], ["because / since", ["owing to the fact that"]], ["although / though", ["in spite of the fact that"]], ["remind you / notify you", ["call your attention to the fact that"]], ["I did not know that / I was unaware that", ["I was unaware of the fact that"]], ["his failure", ["the fact that he had not succeeded"]], ["my arrival", ["the fact that i had arrived"]] ] return preferred_forms_check(text, bad_forms, err, msg)
def check_em_vs_em_and_en_vs_in(text): """em- vs. en-, im- vs. in-.""" err = "spelling.em_im_en_in" msg = "em-, im-, en-, and in-. '{}' is the preferred spelling." preferences = [ ["embalm", ["imbalm"]], ["embark", ["imbark"]], ["embed", ["imbed"]], ["embitter", ["imbitter"]], ["emblaze", ["imblaze"]], ["embody", ["imbody"]], ["embolden", ["imbolden"]], ["embosom", ["imbosom"]], ["embower", ["imbower"]], ["embrown", ["imbrown"]], ["empanel", ["impanel"]], ["empower", ["impower"]], ["encage", ["incage"]], ["encapsulate", ["incapsulate"]], ["encase", ["incase"]], ["enclasp", ["inclasp"]], ["encumber", ["incumber"]], ["encumbrance", ["incumbrance"]], ["endow", ["indow"]], ["endowment", ["indowment"]], ["endue", ["indue"]], ["enfold", ["infold"]], ["engraft", ["ingraft"]], ["engulf", ["ingulf"]], ["enlace", ["inlace"]], ["enmesh", ["inmesh"]], ["ensheathe", ["insheathe"]], ["enshrine", ["inshrine"]], ["ensnare", ["insnare"]], ["ensoul", ["insoul"]], ["ensphere", ["insphere"]], ["enthrall", ["inthrall"]], ["enthrone", ["inthrone"]], ["entitle", ["intitle"]], ["entomb", ["intomb"]], ["entreat", ["intreat"]], ["entrench", ["intrench"]], ["entrust", ["intrust"]], ["entwine", ["intwine"]], ["entwist", ["intwist"]], ["enwind", ["inwind"]], ["enwrap", ["inwrap"]], ["enwreathe", ["inwreathe"]], ["imbrue", ["embrue"]], ["impale", ["empale"]], ["impoverish", ["empoverish"]], ["inflame", ["enflame"]], ["ingrain", ["engrain"]], ["inure", ["enure"]], ] return preferred_forms_check(text, preferences, err, msg)
def check_em_vs_em_and_en_vs_in(text): """em- vs. en-, im- vs. in-.""" err = "garner.preferred_forms.em" msg = "em-, im-, en-, and in-. '{}' is the preferred form." preferences = [ ["embalm", ["imbalm"]], ["embark", ["imbark"]], ["embed", ["imbed"]], ["embitter", ["imbitter"]], ["emblaze", ["imblaze"]], ["embody", ["imbody"]], ["embolden", ["imbolden"]], ["embosom", ["imbosom"]], ["embower", ["imbower"]], ["embrown", ["imbrown"]], ["empanel", ["impanel"]], ["empower", ["impower"]], ["encage", ["incage"]], ["encapsulate", ["incapsulate"]], ["encase", ["incase"]], ["enclasp", ["inclasp"]], ["encumber", ["incumber"]], ["encumbrance", ["incumbrance"]], ["endow", ["indow"]], ["endowment", ["indowment"]], ["endue", ["indue"]], ["enfold", ["infold"]], ["engraft", ["ingraft"]], ["engulf", ["ingulf"]], ["enlace", ["inlace"]], ["enmesh", ["inmesh"]], ["ensheathe", ["insheathe"]], ["enshrine", ["inshrine"]], ["ensnare", ["insnare"]], ["ensoul", ["insoul"]], ["ensphere", ["insphere"]], ["enthrall", ["inthrall"]], ["enthrone", ["inthrone"]], ["entitle", ["intitle"]], ["entomb", ["intomb"]], ["entreat", ["intreat"]], ["entrench", ["intrench"]], ["entrust", ["intrust"]], ["entwine", ["intwine"]], ["entwist", ["intwist"]], ["enwind", ["inwind"]], ["enwrap", ["inwrap"]], ["enwreathe", ["inwreathe"]], ["imbrue", ["embrue"]], ["impale", ["empale"]], ["impoverish", ["empoverish"]], ["inflame", ["enflame"]], ["ingrain", ["engrain"]], ["inure", ["enure"]], ] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "misc.inferior_superior" msg = "'Inferior' and 'superior' are not true comparatives. Use '{}'." preferences = [["inferior to", ["inferior than"]], ["superior to", ["superior than"]]] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "misc.false_plurals.examples" msg = "The plural is {}" preferences = [["talismans", ["talismen"]], ["phenomena", ["phenomenons"]]] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "garner.eponymous_adjective" msg = "'{}' is the preferred eponymous adjective." preferences = [["Mephistophelean", ["Mephistophelian"]], ["Shakespearean", ["Shakespearian"]]] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "redundancy.wallace" msg = "Redundancy. Use '{}' instead of '{}'." redundancies = [ ["rectangular", ["rectangular in shape"]], ["audible", ["audible to the ear"]], ] return preferred_forms_check(text, redundancies, err, msg)
def check(text): """Suggest the preferred forms.""" err = "garner.back_formations" msg = "Back-formation. '{}' is the preferred form." list = [ ["improper", ["improprietous"]], ] return preferred_forms_check(text, list, err, msg)
def check(text): """Suggest the preferred forms.""" err = "misc.back_formations" msg = "Back-formation. '{}' is the preferred form." list = [ ["improper", ["improprietous"]], ] return preferred_forms_check(text, list, err, msg)
def check(text): """Suggest the preferred forms.""" err = "spelling.typos" msg = "Probably meant '{}'." misspellings = [ ["still", ["stile"]], ] return preferred_forms_check(text, misspellings, err, msg)
def check_lie_detector_test(text): """Suggest the preferred forms.""" err = "psychology.lie_detector" msg = "Polygraph machines measure arousal, not lying per se. Try {}." list = [ ["polygraph test", ["lie detector test"]], ["polygraph machine", ["lie detector machine"]], ] return preferred_forms_check(text, list, err, msg)
def check(text): """Suggest the preferred forms.""" err = "misc.professions" msg = "'{}' is the name of that job." preferences = [ ["cobbler", ["shoe repair guy"]], ["geometer", ["geometrist"]], ] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "misc.false_plurals.examples" msg = "The plural is {}" preferences = [ ["talismans", ["talismen"]], ["phenomena", ["phenomenons"]], ] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "fowlers.inferior_superior" msg = "'Inferior' and 'superior' are not true comparatives. Use '{}'." preferences = [ ["inferior to", ["inferior than"]], ["superior to", ["superior than"]], ] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "garner.eponymous_adjective" msg = "'{}' is the preferred eponymous adjective." preferences = [ ["Mephistophelean", ["Mephistophelian"]], ["Shakespearean", ["Shakespearian"]], ] return preferred_forms_check(text, preferences, err, msg)
def check_curly_quotes(text): u"""Use curly quotes, not straight quotes.""" err = "typography.symbols.curly_quotes" msg = u'Use curly quotes “”, not straight quotes "".' list = [ [u"“ or ”", ['"']], ] return preferred_forms_check( text, list, err, msg, ignore_case=False, max_errors=2)
def check(text): """Suggest the preferred forms.""" err = "nordquist.redundancy" msg = "Redundancy. Use '{}' instead of '{}'." redundancies = [ ["essential", ["absolutely essential"]], ["necessary", ["absolutely necessary"]], ["a.m.", ["a.m. in the morning"]], ["p.m.", ["p.m. at night"]], ] return preferred_forms_check(text, redundancies, err, msg)
def check(text): """Suggest the preferred forms.""" err = "misc.many_a" msg = "'many a' requires a singular verb." preferences = [ ["is many a", ["are many a"]], ["has been many a", ["have been many a"]], ["was many a", ["were many a"]], ] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "garner.animal_labels" msg = "There's a word for this: '{}'." preferences = [ ["accipitrine", ["hawk-like"]], ["anserine", ["goose-like"]], ["aquiline", ["eagle-like"]], ["avine", ["bird-like"]], ["cancrine", ["crab-like"]], ["hircine", ["goat-like"]], ["damine", ["deer-like"]], ["corvine", ["crow-like", "raven-like"]], ["crocodiline", ["crocodile-like"]], ["crotaline", ["rattlesnake-like"]], ["falconine", ["falcon-like"]], ["ferine", ["wild animal-like"]], ["hippopotamine", ["hippopotamus-like"]], ["hirundine", ["swallow-like"]], ["hystricine", ["porcupine-like"]], ["lacertine", ["lizard-like"]], ["laridine", ["gull-like"]], ["leporine", ["hare-like"]], ["lumbricine", ["earthworm-like"]], ["lupine", ["wolf-like"]], ["murine", ["mouse-like"]], ["ovine", ["sheep-like"]], ["pardine", ["leopard-like", "panther-like"]], ["passerine", ["sparrow-like"]], ["pavonine", ["peacock-like"]], ["picine", ["woodpecker-like"]], ["piscine", ["fish-like"]], ["ranine", ["frog-like"]], ["scolopendrine", ["centipede-like"]], ["soricine", ["shrew-like"]], ["struthionine", ["ostrich-like"]], ["suilline", ["swine-like"]], ["taurine", ["bull-like", "ox-like"]], ["tigrine", ["tiger-like"]], ["vespine", ["wasp-like"]], ["viperine", ["viper-like"]], ["vituline", ["calf-like", "veal-like"]], ["viverrine", ["mongoose-like"]], ["vulpine", ["fox-like"]], ["vulturine", ["vulture-like"]], ["zebrine", ["zebra-like"]], ["zibeline", ["sable-like"]], ] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms.""" err = "pinker.latin" msg = "Use English. '{}' is the preferred form." list = [ ["other things being equal", ["ceteris paribus"]], ["among other things", ["inter alia"]], ["in and of itself", ["simpliciter"]], ["having made the necessary changes", ["mutatis mutandis"]], ] return preferred_forms_check(text, list, err, msg)
def check(text): """Suggest the preferred forms.""" err = "misc.captalization" msg = "Incorrect capitalization. '{}' is the preferred form." list = [ ["Stone Age", ["stone age"]], ["space age", ["Space Age"]], ["the American West", ["the American west"]], ["Mother Nature", ["mother nature"]], ] return preferred_forms_check(text, list, err, msg, ignore_case=False)
def check(text): """in- vs un-.""" err = "spelling.in_un" msg = "in- vs. un-. '{}' is the preferred spelling." preferences = [ ["inadvisable", ["unadvisable"]], ["inalienable", ["unalienable"]], ["inexpressive", ["unexpressive"]], ["infeasible", ["unfeasible"]], ] return preferred_forms_check(text, preferences, err, msg)
def check_denizen_labels_ganer(text): """Suggest the preferred forms. source: Garner's Modern American Usage source_url: http://bit.ly/1T4alrY """ err = "terms.denizen_labels.garner" msg = "'{}' is the preferred denizen label." preferences = [ ["Afrikaner", ["Afrikaaner"]], ["Afrikaner", ["Afrikander"]], ["Alabamian", ["Alabaman"]], ["Albuquerquean", ["Albuquerquian"]], ["Anchorageite", ["Anchoragite"]], ["Angeleno", ["Los Angelean"]], ["Arizonan", ["Arizonian"]], ["Arkansan", ["Arkansawyer"]], ["Belarusian", ["Belarusan"]], ["Caymanian", ["Cayman Islander"]], ["Coloradan", ["Coloradoan"]], ["Fairbanksan", ["Fairbanksian"]], ["Fort Worthian", ["Fort Worther"]], ["Grenadan", ["Grenadian"]], ["Hong Konger", ["Hong Kongite", "Hong Kongian"]], ["Hoosier", ["Indianan", "Indianian"]], ["Illinoisan", ["Illinoisian"]], ["Iowan", ["Iowegian"]], ["Louisianian", ["Louisianan"]], ["Michigander", ["Michiganite", "Michiganian"]], ["Missourian", ["Missouran"]], ["Monegasque", ["Monacan"]], ["Neapolitan", ["Neopolitan"]], ["New Hampshirite", ["New Hampshireite", "New Hampshireman"]], ["New Jerseyan", ["New Jerseyite"]], ["New Orleanian", ["New Orleansian"]], ["Nutmegger", ["Connecticuter"]], ["Oklahoma Cityan", ["Oklahoma Citian"]], ["Oklahoman", ["Oklahomian"]], ["Seattleite", ["Seattlite"]], ["Surinamese", ["Surinamer"]], ["Tallahasseean", ["Tallahassean"]], ["Tennessean", ["Tennesseean"]], ["Tusconan", ["Tusconian", "Tusconite"]], ["Utahn", ["Utahan"]], ["Saudi", ["Saudi Arabian"]], ] return preferred_forms_check(text, preferences, err, msg)
def check(text): """Suggest the preferred forms. source: Garner's Modern American Usage source_url: http://bit.ly/1T4alrY """ err = "terms.denizen_labels.garner" msg = "'{}' is the preferred denizen label." preferences = [ ["Afrikaner", ["Afrikaaner"]], ["Afrikaner", ["Afrikander"]], ["Alabamian", ["Alabaman"]], ["Albuquerquean", ["Albuquerquian"]], ["Anchorageite", ["Anchoragite"]], ["Angeleno", ["Los Angelean"]], ["Arizonan", ["Arizonian"]], ["Arkansan", ["Arkansawyer"]], ["Belarusian", ["Belarusan"]], ["Caymanian", ["Cayman Islander"]], ["Coloradan", ["Coloradoan"]], ["Fairbanksan", ["Fairbanksian"]], ["Fort Worthian", ["Fort Worther"]], ["Grenadan", ["Grenadian"]], ["Hong Konger", ["Hong Kongite", "Hong Kongian"]], ["Hoosier", ["Indianan", "Indianian"]], ["Illinoisan", ["Illinoisian"]], ["Iowan", ["Iowegian"]], ["Louisianian", ["Louisianan"]], ["Michigander", ["Michiganite", "Michiganian"]], ["Missourian", ["Missouran"]], ["Monegasque", ["Monacan"]], ["Neapolitan", ["Neopolitan"]], ["New Hampshirite", ["New Hampshireite", "New Hampshireman"]], ["New Jerseyan", ["New Jerseyite"]], ["New Orleanian", ["New Orleansian"]], ["Nutmegger", ["Connecticuter"]], ["Oklahoma Cityan", ["Oklahoma Citian"]], ["Oklahoman", ["Oklahomian"]], ["Seattleite", ["Seattlite"]], ["Surinamese", ["Surinamer"]], ["Tallahasseean", ["Tallahassean"]], ["Tennessean", ["Tennesseean"]], ["Tusconan", ["Tusconian", "Tusconite"]], ["Utahn", ["Utahan"]], ["Saudi", ["Saudi Arabian"]], ] return preferred_forms_check(text, preferences, err, msg)
def check_vtech(text): """Suggest the correct name. source: Virginia Tech Division of Student Affairs source_url: http://bit.ly/2en1zbv """ err = "institution.vtech" msg = "Incorrect name. Use '{}' instead of '{}'." institution = [ ["Virginia Polytechnic Institute and State University", ["Virginia Polytechnic and State University"]], ] return preferred_forms_check(text, institution, err, msg)
def check(text): """Check the text.""" err = "garner.mixed_metaphors" msg = u"Mixed metaphor. Try '{}'." preferences = [ ["cream rises to the top", ["cream rises to the crop"]], ["fasten your seatbelts", ["button your seatbelts"]], ["a minute to decompress", ["a minute to decompose"]], ["sharpest tool in the shed", ["sharpest marble in the (shed|box)"]], ["not rocket science", ["not rocket surgery"]], ] return preferred_forms_check(text, preferences, err, msg)
def check_curly_quotes(text): u"""Use curly quotes, not straight quotes.""" err = "typography.symbols.curly_quotes" msg = u'Use curly quotes “”, not straight quotes "".' list = [ [u"“ or ”", ['"']], ] return preferred_forms_check(text, list, err, msg, ignore_case=False, max_errors=2)
def check(text): """Suggest preferred forms given the reference document.""" err = "glaad.terms" msg = "Possibly offensive term. Consider using '{}' instead of '{}'." list = [["gay man", ["homosexual man"]], ["gay men", ["homosexual men"]], ["lesbian", ["homosexual woman"]], ["lesbians", ["homosexual women"]], ["gay people", ["homosexual people"]], ["gay couple", ["homosexual couple"]], ["sexual orientation", ["sexual preference"]], ["openly gay", ["admitted homosexual", "avowed homosexual"]], ["equal rights", ["special rights"]]] return preferred_forms_check(text, list, err, msg, ignore_case=False)
def check_nordquist(text): """Suggest the preferred forms. source: Richard Nordquist source_url: http://grammar.about.com/bio/Richard-Nordquist-22176.htm """ err = "redundancy.nordquist" msg = "Redundancy. Use '{}' instead of '{}'." redundancies = [ ["essential", ["absolutely essential"]], ["necessary", ["absolutely necessary"]], ["a.m.", ["a.m. in the morning"]], ["p.m.", ["p.m. at night"]], ] return preferred_forms_check(text, redundancies, err, msg)
def check_days(text): """Suggest the preferred forms.""" err = "MAU102" msg = "Days of the week should be capitalized. '{}' is the preferred form." list = [ ["Monday", ["monday"]], ["Tuesday", ["tuesday"]], ["Wednesday", ["wednesday"]], ["Thursday", ["thursday"]], ["Friday", ["friday"]], ["Saturday", ["saturday"]], ["Sunday", ["sunday"]], ] return preferred_forms_check(text, list, err, msg, ignore_case=False)
def check_vtech(text): """Suggest the correct name. source: Virginia Tech Division of Student Affairs source_url: http://bit.ly/2en1zbv """ err = "institution.vtech" msg = "Incorrect name. Use '{}' instead of '{}'." institution = [ [ "Virginia Polytechnic Institute and State University", ["Virginia Polytechnic and State University"] ], ] return preferred_forms_check(text, institution, err, msg)
def check(text): """Suggest the preferred forms.""" err = "garner.mondegreens" msg = "'{}' is the preferred form." list = [ ["a girl with kaleidascope eyes", ["a girl with colitis goes by"]], ["a partridge in a pear tree", ["a part-red gingerbread tree"]], ["attorney and not a republic", ["attorney and notary public"]], ["beck and call", ["beckon call"]], ["for all intents and purposes", ["for all intensive purposes"]], ["laid him on the green", ["Lady Mondegreen"]], ["Olive, the other reindeer", ["all of the other reindeer"]], ["to the manner born", ["to the manor born"]], ] return preferred_forms_check(text, list, err, msg)
def check(text): """Suggest the preferred forms.""" err = "misc.mondegreens" msg = "'{}' is the preferred form." list = [ ["a girl with kaleidoscope eyes", ["a girl with colitis goes by"]], ["a partridge in a pear tree", ["a part-red gingerbread tree"]], ["attorney and notary public", ["attorney and not a republic"]], ["beck and call", ["beckon call"]], ["for all intents and purposes", ["for all intensive purposes"]], ["laid him on the green", ["Lady Mondegreen"]], ["all of the other reindeer", ["Olive, the other reindeer"]], ["to the manner born", ["to the manor born"]], ] return preferred_forms_check(text, list, err, msg)
def check(text): """Suggest preferred forms given the reference document.""" err = "glaad.terms" msg = "Possibly offensive term. Consider using '{}' instead of '{}'." list = [ ["gay man", ["homosexual man"]], ["gay men", ["homosexual men"]], ["lesbian", ["homosexual woman"]], ["lesbians", ["homosexual women"]], ["gay people", ["homosexual people"]], ["gay couple", ["homosexual couple"]], ["sexual orientation", ["sexual preference"]], ["openly gay", ["admitted homosexual", "avowed homosexual"]], ["equal rights", ["special rights"]] ] return preferred_forms_check(text, list, err, msg, ignore_case=False)
def check_misc(text): """Avoid mixing metaphors. source: Garner's Modern American Usage source_url: http://bit.ly/1T4alrY """ err = "mixed_metaphors.misc.misc" msg = "Mixed metaphor. Try '{}'." preferences = [ ["cream rises to the top", ["cream rises to the crop"]], ["fasten your seatbelts", ["button your seatbelts"]], ["a minute to decompress", ["a minute to decompose"]], ["sharpest tool in the shed", ["sharpest marble in the (shed|box)"]], ["not rocket science", ["not rocket surgery"]], ] return preferred_forms_check(text, preferences, err, msg)