Grammalecte  Check-in [c45f0c51d4]

Overview
Comment:[fr] update apposition()
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fr
Files: files | file ages | folders
SHA3-256: c45f0c51d426d685f8db41ce737ac04fb15fa5e06282baebbedbdf9c18178e04
User & Date: olr on 2020-11-17 16:07:30
Other Links: manifest | tags
Context
2020-11-17
18:56
[fr] ajustements check-in: 4cde0da287 user: olr tags: trunk, fr
16:07
[fr] update apposition() check-in: c45f0c51d4 user: olr tags: trunk, fr
16:07
[fr] ajustements check-in: e1a58f3564 user: olr tags: trunk, fr
Changes

Modified gc_lang/fr/modules-js/cregex.js from [53af2cbc4f] to [e477cb5ed7].

96
97
98
99
100
101
102
103

104
105
106

107
108
109
110
111
112
113
96
97
98
99
100
101
102

103
104
105

106
107
108
109
110
111
112
113







-
+


-
+







                return false;
            }
        }
        // check gender agreement
        if (this.mbEpi(l1) || this.mbEpi(l2)) {
            return true;
        }
        if (this.mbMas(l1) && !this.mbMas(l2)) {
        if (this.isMas(l1) && !this.mbMas(l2)) {
            return false;
        }
        if (this.mbFem(l1) && !this.mbFem(l2)) {
        if (this.isFem(l1) && !this.mbFem(l2)) {
            return false;
        }
        return true;
    },

    checkConjVerb: function (lMorph, sReqConj) {
        return lMorph.some(s  =>  s.includes(sReqConj));

Modified gc_lang/fr/modules/cregex.py from [4b9e99ff72] to [297fc71806].

92
93
94
95
96
97
98
99

100
101

102
103
104
105
106
107
108
92
93
94
95
96
97
98

99
100

101
102
103
104
105
106
107
108







-
+

-
+







        if mbSg(l1) and not mbSg(l2):
            return False
        if mbPl(l1) and not mbPl(l2):
            return False
    # check gender agreement
    if mbEpi(l1) or mbEpi(l2):
        return True
    if mbMas(l1) and not mbMas(l2):
    if isMas(l1) and not mbMas(l2):
        return False
    if mbFem(l1) and not mbFem(l2):
    if isFem(l1) and not mbFem(l2):
        return False
    return True

def checkConjVerb (lMorph, sReqConj):
    "returns True if <sReqConj> in <lMorph>"
    return any(sReqConj in s  for s in lMorph)