103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
"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
#### Syntagmes
_zNextIsVerb1 = re.compile(" +[nmts](?:e |’)")
_zNextIsVerb2 = re.compile(r" +(\w[\w-]+)")
def isNextVerb (dDA, s, iOffset):
"returns True if next word is a verb"
if _zNextIsVerb1.match(s):
return True
m = _zNextIsVerb2.match(s)
if m and morph(dDA, (iOffset+m.start(1), m.group(1)), ":[123][sp]", False):
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"])
aSHOULDBEVERB = frozenset(["aller", "manger"])
|