78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
-
+
+
+
+
|
NPe = re.compile(":(?:M[12P]|T):e")
#### FONCTIONS
def getLemmaOfMorph (s):
"return lemma in morphology <s>"
return Lemma.search(s).group(1)
m = Lemma.search(s)
if m:
return m.group(1)
return ""
def agreement (l1, l2):
"returns True if agreement in gender and number is possible between morphologies <l1> and <l2>"
sGender1, sNumber1 = getGenderNumber(l1)
sGender2, sNumber2 = getGenderNumber(l2)
if sNumber1 != ":i" and sNumber2 != ":i" and sNumber1 != sNumber2:
return False
|