Grammalecte  Diff

Differences From Artifact [5701f141a0]:

To Artifact [72c426fe26]:


535
536
537
538
539
540
541














535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555







+
+
+
+
+
+
+
+
+
+
+
+
+
+
    '/': '_'
})


def normalizeInclusiveWriting (sToken):
    "typography: replace word separators used in inclusive writing by underscore (_)"
    return sToken.translate(_xNormalizedCharsForInclusiveWriting)


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"