Grammalecte  Diff

Differences From Artifact [577ebd9866]:

To Artifact [7f3b260c43]:


49
50
51
52
53
54
55













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




















>
>
>
>
>
>
>
>
>
>
>
>
>
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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

def queryNamesPOS(sWord1, sWord2):
    lMorph1 = _oSpellChecker.getMorph(sWord1)
    lMorph2 = _oSpellChecker.getMorph(sWord2)
    if not lMorph1 or not lMorph2:
        return ":N:e:p"
    sGender1 = cr.getGender(lMorph1)
    sGender2 = cr.getGender(lMorph2)
    if sGender1 == ":m" or sGender2 == ":m":
        return ":N:m:p"
    if sGender1 == ":f" or sGender2 == ":f":
        return ":N:f:p"
    return ":N:e:p"