71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
def mbUnit (s):
"returns True it can be a measurement unit"
if _zUnitSpecial.search(s):
return True
if 1 < len(s) < 16 and s[0:1].islower() and (not s[1:].islower() or _zUnitNumbers.search(s)):
return True
return False
#### Exceptions
aREGULARPLURAL = frozenset(["abricot", "amarante", "aubergine", "acajou", "anthracite", "brique", "caca", "café", \
"carotte", "cerise", "chataigne", "corail", "citron", "crème", "grave", "groseille", \
"jonquille", "marron", "olive", "pervenche", "prune", "sable"])
|
<
<
<
<
<
<
<
|
71
72
73
74
75
76
77
|
def mbUnit (s):
"returns True it can be a measurement unit"
if _zUnitSpecial.search(s):
return True
if 1 < len(s) < 16 and s[0:1].islower() and (not s[1:].islower() or _zUnitNumbers.search(s)):
return True
return False
|