Grammalecte  Check-in [b7741f0eec]

Overview
Comment:[fr] apposition: mot d’une lettre OK
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fr | rg
Files: files | file ages | folders
SHA3-256: b7741f0eecb4c17932f42a3598eeadc74310022aa51671eac2f1d3c8b0b19dba
User & Date: olr on 2018-07-28 13:55:54
Other Links: branch diff | manifest | tags
Context
2018-07-28
13:59
[fr] apposition: mot d’une lettre OK (correction) check-in: 9de2cb2d9f user: olr tags: fr, rg
13:55
[fr] apposition: mot d’une lettre OK check-in: b7741f0eec user: olr tags: fr, rg
13:52
[fr] conversion: regex rules -> graph rules check-in: 80a447ed74 user: olr tags: fr, rg
Changes

Modified gc_lang/fr/modules-js/gce_analyseur.js from [bdc2b54804] to [93476a1043].

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
        return "elles";
    }
    return s1 + " et " + s2;
}

function apposition (sWord1, sWord2) {
    // returns true if nom + nom (no agreement required)
    return cregex.mbNomNotAdj(_oSpellChecker.getMorph(sWord2)) && cregex.mbPpasNomNotAdj(_oSpellChecker.getMorph(sWord1));
}

function isAmbiguousNAV (sWord) {
    // words which are nom|adj and verb are ambiguous (except être and avoir)
    let lMorph = _oSpellChecker.getMorph(sWord);
    if (lMorph.length === 0) {
        return false;







|







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
        return "elles";
    }
    return s1 + " et " + s2;
}

function apposition (sWord1, sWord2) {
    // returns true if nom + nom (no agreement required)
    return sWord2.length < 2 && cregex.mbNomNotAdj(_oSpellChecker.getMorph(sWord2)) && cregex.mbPpasNomNotAdj(_oSpellChecker.getMorph(sWord1));
}

function isAmbiguousNAV (sWord) {
    // words which are nom|adj and verb are ambiguous (except être and avoir)
    let lMorph = _oSpellChecker.getMorph(sWord);
    if (lMorph.length === 0) {
        return false;

Modified gc_lang/fr/modules/gce_analyseur.py from [b96ac7c29b] to [45c2e61476].

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
        # si épicène, indéterminable, mais OSEF, le féminin l’emporte
        return "elles"
    return s1 + " et " + s2


def apposition (sWord1, sWord2):
    "returns True if nom + nom (no agreement required)"
    return cr.mbNomNotAdj(_oSpellChecker.getMorph(sWord2)) and cr.mbPpasNomNotAdj(_oSpellChecker.getMorph(sWord1))


def isAmbiguousNAV (sWord):
    "words which are nom|adj and verb are ambiguous (except être and avoir)"
    lMorph = _oSpellChecker.getMorph(sWord)
    if not cr.mbNomAdj(lMorph) or sWord == "est":
        return False







|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
        # si épicène, indéterminable, mais OSEF, le féminin l’emporte
        return "elles"
    return s1 + " et " + s2


def apposition (sWord1, sWord2):
    "returns True if nom + nom (no agreement required)"
    return len(sWord2) < 2 and cr.mbNomNotAdj(_oSpellChecker.getMorph(sWord2)) and cr.mbPpasNomNotAdj(_oSpellChecker.getMorph(sWord1))


def isAmbiguousNAV (sWord):
    "words which are nom|adj and verb are ambiguous (except être and avoir)"
    lMorph = _oSpellChecker.getMorph(sWord)
    if not cr.mbNomAdj(lMorph) or sWord == "est":
        return False