Grammalecte  Diff

Differences From Artifact [1edcbef032]:

To Artifact [13a42a7dc2]:


54
55
56
57
58
59
60

















        return true;
    }
    if (s.length > 1 && s.length < 16 && s.slice(0, 1).gl_isLowerCase() && (!s.slice(1).gl_isLowerCase() || /[0-9]/.test(s))) {
        return true;
    }
    return false;
}
























>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
        return true;
    }
    if (s.length > 1 && s.length < 16 && s.slice(0, 1).gl_isLowerCase() && (!s.slice(1).gl_isLowerCase() || /[0-9]/.test(s))) {
        return true;
    }
    return false;
}

function queryNamesPOS (sWord1, sWord2) {
    let lMorph1 = _oSpellChecker.getMorph(sWord1);
    let lMorph2 = _oSpellChecker.getMorph(sWord2);
    if (lMorph1.length == 0 || lMorph2.length == 0) {
        return ":N:e:p";
    }
    let sGender1 = cregex.getGender(lMorph1);
    let sGender2 = cregex.getGender(lMorph2);
    if (sGender1 == ":m" || sGender2 == ":m") {
        return ":N:m:p";
    }
    if (sGender1 == ":f" || sGender2 == ":f") {
        return ":N:f:p";
    }
    return ":N:e:p";
}