Debian Codegraph @

proselint/checks/misc/preferred_forms.py

raw
1 """Preferred forms.
2
3 ---
4 layout: post
5 source: Garner's Modern American Usage
6 source_url: http://bit.ly/1T4alrY
7 title: preferred forms
8 date: 2014-06-10 12:31:19
9 categories: writing
10 ---
11
12 Points out preferred forms.
13
14 """
15 from proselint.tools import memoize, preferred_forms_check
16
17
18 @memoize
19 def check(text):
20 """Suggest the preferred forms."""
21 err = "garner.preferred_forms"
22 msg = "'{}' is the preferred form."
23
24 preferences = [
25
26 # Obsolete words
27 ["imprimatur", ["imprimature"]],
28
29 # Proper nouns
30 ["Halloween", ["haloween", "hallowe'en"]],
31 ["Khrushchev", ["Khruschev", "Kruschev"]],
32 ["Ku Klux Klan", ["Klu Klux Klan"]],
33 ["Pontius Pilate", ["Pontius Pilot"]],
34
35 # Plurals
36 ["hippopotamuses", ["hippopotami"]],
37 ["manifestos", ["manifesti"]],
38 # ["matrixes", ["matrices"]],
39 ["mongooses", ["mongeese"]],
40 ["narcissi", ["narcissuses"]],
41 ["retinas", ["retinae"]],
42 ["sopranos", ["soprani"]],
43 ["titmice", ["titmouses"]],
44
45 # Hyphenated words
46 ["long-standing", ["longstanding"]],
47 ["sans serif", ["sans-serif", "sanserif"]],
48 ["tortfeasor", ["tort feasor", "tort-feasor"]],
49 ["transship", ["tranship", "trans-ship"]],
50 ["transshipped", ["transhipped", "trans-shipped"]],
51 ["transshipping", ["transhipping", "trans-shipping"]],
52 ["non sequitur", ["non-sequitur"]],
53
54 # Misc
55 ["attitude", ["mental attitude"]],
56 ["Chief Justice of the United States",
57 ["Chief Justice of the United States Supreme Court",
58 "Chief Justice of the Supreme Court of the United States."]],
59 ["chitterlings", ["chitlings", "chitlins"]],
60 ["combustion engine", ["combustible engine"]],
61 ["during / throughout", ["for the duration of"]],
62 ["foreclose on", ["foreclose againt"]],
63 ["friend in common", ["mutual friend"]],
64 ["in regard to", ["in regards to"]],
65 ["infectious", ["infectuous"]],
66 ["inferable", ["inferrable", "inferrible"]],
67 ["knowing that", ["in light of the fact that"]],
68 ["lanyard", ["laniard"]],
69 ["largess", ["largesse"]],
70 ["lasagna", ["lasagne"]],
71 ["leery", ["leary"]],
72 ["lend me her", ["loan me her"]],
73 ["lend me his", ["loan me his"]],
74 ["lend me their", ["loan me their"]],
75 ["lend me your", ["loan me your"]],
76 ["lent me her", ["loaned me her"]],
77 ["lent me his", ["loaned me his"]],
78 ["lent me their", ["loaned me their"]],
79 ["lent me your", ["loaned me your"]],
80 ["linguist", ["linguistician"]],
81 ["matzo-ball", ["matzoh-ball",
82 "matza-ball",
83 "matzah-ball",
84 "matsah-ball"]],
85 ["mayoralty", ["mayorality"]],
86 ["mealy-mouthed", ["mealymouthed"]],
87 ["mean-spirited", ["meanspirited"]],
88 ["midwifed", ["midwived"]],
89 ["moniker", ["monicker"]],
90 ["musical revue", ["musical review"]],
91 ["mustache", ["moustache"]],
92 ["nonplussed", ["nonplused"]],
93 ["nonplussing", ["nonplusing"]],
94 ["non sequitur", ["nonsequitur"]],
95 ["not nearly as", ["nowhere near as"]],
96 ["off", ["off of"]],
97 ["podiatrist", ["chiropodist"]],
98 ["podiatry", ["chiropody"]],
99 ["shoo-in", ["shoe-in"]],
100 ["suicide", ["suicide victim"]],
101 ["the highway median", ["the highway medium"]],
102 ["vaipidity", ["vapidness"]],
103 ["weather vane", ["weather vein", "weather vain"]],
104 ["with regard to", ["with regards to"]],
105
106 # Idioms
107 ["a couple of people", ["a couple people"]],
108 ["all the time", ["all of the time"]],
109 ["as follows", ["as follow"]],
110 ["bulk large", ["bulk largely"]],
111 ["burying the lede", ["burying the lead"]],
112 ["came to naught", ["came to nought"]],
113 ["come off it", ["come off of it"]],
114 ["corroborating evidence", ["corroborative evidence"]],
115 ["dear departed", ["dearly departed"]],
116 ["default on a loan", ["default to a loan"]],
117 ["draw an inference", ["make an inference"]],
118 ["in the meantime", ["in the meanwhile"]],
119 ["long distances", ["lengthy distances"]],
120 ["madding crowd", ["maddening crowd"]],
121 ["Magna Carta", ["Magna Charta"]],
122 ["marriage of convenience", ["mariage de convenance"]],
123 ["Meanwhile,", ["Meantime,"]],
124 ["Midwest", ["Middle West"]],
125 ["Midwestern", ["Middle Western"]],
126 ["modi operandi", ["modes of operandi"]],
127 ["modus operandi", ["mode of operandi"]],
128 ["motion seconded", ["notion seconded"]],
129 ["mucous membranes", ["mucus membranes"]],
130 ["must pass muster", ["must past muster"]],
131 ["neck-and-neck", ["neck-in-neck"]],
132 ["no-holds-barred", ["no-holes-barred"]],
133 ["oil magnate", ["oil magnet"]],
134 ["punch up the lede", ["punch up the lead"]],
135 ["railroad magnate", ["railroad magnet"]],
136 ["seconded the motion", ["seconded the notion"]],
137 ["statute of limitationas", ["statute of limits"]],
138 ["take precedence over", ["take prescience over"]],
139 ["the last two", ["both of the last two"]],
140 ["the last two", ["both of the last"]],
141 ["unorganic food", ["inorganic food"]],
142 ["vale of tears", ["veil of tears"]],
143 ["Venus flytrap", ["Venus's flytrap", "Venus' flytrap"]],
144 ["was accused of", ["was accused with"]],
145
146 # Verbosity
147 ["try to", ["make an attempt to"]],
148 ["try to", ["make attempts to"]],
149 ["try to", ["make efforts to"]],
150 ["tried to", ["made an attempt to"]],
151 ["tried to", ["made attempts to"]],
152 ["tried to", ["made efforts to"]],
153 ["modern", ["modern-day"]],
154
155 # Grammar
156 ["be misled", ["be mislead"]],
157 ["was misled", ["was mislead"]],
158 ["were misled", ["were mislead"]],
159
160 # Euphemisms
161 ["a search-and-destroy mission", ["armed reconnaissance"]],
162 ["abortion", ["pregnancy termination"]],
163 ["bisexual", ["sexually ambidextrous"]],
164 ["exterminator", ["extermination engineer"]],
165 ["firing", ["permanent layoff"]],
166 ["rat-catcher", ["rodent operative"]],
167
168 # Tenses
169 ["mistook", ["mistaked"]],
170
171 # Accents
172 ["né", ["ne"]],
173 ["née", ["nee"]],
174 ]
175
176 return preferred_forms_check(text, preferences, err, msg)