-
Notifications
You must be signed in to change notification settings - Fork 177
/
em_im_en_in.py
67 lines (60 loc) · 2.18 KB
/
em_im_en_in.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# -*- coding: utf-8 -*-
"""Em vs. im, en vs. in."""
from proselint.tools import memoize, preferred_forms_check
@memoize
def check(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)