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
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
-
-
-
-
-
-
-
-
-
-
-
|
if not lMorph1:
return True
lMorph2 = dToken2["lMorph"] if "lMorph" in dToken2 else _oSpellChecker.getMorph(dToken2["sValue"])
if not lMorph2:
return True
if bNotOnlyNames and not (cr.mbAdj(lMorph2) or cr.mbAdjNb(lMorph1)):
return False
return cr.checkAgreement(lMorph1, lMorph2)
def checkAgreement (sWord1, sWord2):
"check agreement between <sWord1> and <sWord1>"
lMorph2 = _oSpellChecker.getMorph(sWord2)
if not lMorph2:
return True
lMorph1 = _oSpellChecker.getMorph(sWord1)
if not lMorph1:
return True
return cr.checkAgreement(lMorph1, lMorph2)
_zUnitSpecial = re.compile("[µ/⁰¹²³⁴⁵⁶⁷⁸⁹Ωℓ·]")
_zUnitNumbers = re.compile("[0-9]")
def mbUnit (s):
|