Index: doc/API.txt ================================================================== --- doc/API.txt +++ doc/API.txt @@ -47,11 +47,12 @@ .getConj(verb, tense, who) Returns conjugation of verb with subject who at tense (can be an empty string) tense has to be: :Y infinitif - :PQ participes passés et présent + :P participe présent + :Q participes passés :Ip indicatif présent :Iq imparfait :Is passé simple :If futur :K conditionnel @@ -59,16 +60,16 @@ :Sq subjonctif imparfait :E impératif who has to be: :P participe présent - :Q1 participe passé masculin singulier ou invariable - :Q2 participe passé masculin pluriel - :Q3 participe passé féminin singulier - :Q4 participe passé féminin pluriel + :m:s participe passé masculin singulier ou invariable + :m:p participe passé masculin pluriel + :f:s participe passé féminin singulier + :f:p participe passé féminin pluriel - :1s première personne au singulier + :1s première personne au singulier (1ś pour une éventuelle forme interrogative spécifique) :2s deuxième personne au singulier :3s troisième personne au singulier :1p première personne au pluriel :2p deuxième personne au pluriel Index: gc_lang/fr/build_data.py ================================================================== --- gc_lang/fr/build_data.py +++ gc_lang/fr/build_data.py @@ -8,18 +8,17 @@ import json import os import itertools import traceback import platform +import importlib import graphspell.ibdawg as ibdawg from graphspell.echo import echo from graphspell.str_transform import defineSuffixCode import graphspell.tokenizer as tkz -import gc_lang.fr.modules.conj as conj - oDict = None class cd: @@ -72,19 +71,19 @@ lVinfo = []; dVinfo = {}; nVinfo = 0 lTags = []; dTags = {}; nTags = 0 dVerbNames = {} dPatternList = { - ":PQ": [], ":Ip": [], ":Iq": [], ":Is": [], ":If": [], ":K": [], ":Sp": [], ":Sq": [], ":E": [] + ":P": [], ":Q": [], ":Ip": [], ":Iq": [], ":Is": [], ":If": [], ":K": [], ":Sp": [], ":Sq": [], ":E": [] } dTrad = { - "infi": ":Y", "ppre": ":PQ", "ppas": ":PQ", + "infi": ":Y", "ppre": ":P", "ppas": ":Q", "ipre": ":Ip", "iimp": ":Iq", "ipsi": ":Is", "ifut": ":If", "spre": ":Sp", "simp": ":Sq", "cond": ":K", "impe": ":E", "1sg": ":1s", "2sg": ":2s", "3sg": ":3s", "1pl": ":1p", "2pl": ":2p", "3pl": ":3p", "1isg": ":1ś", - "mas sg": ":Q1", "mas pl": ":Q2", "mas inv": ":Q1", "fem sg": ":Q3", "fem pl": ":Q4", "epi inv": ":Q1" + "mas sg": ":m:s", "mas pl": ":m:p", "mas inv": ":m:s", "fem sg": ":f:s", "fem pl": ":f:p", "epi inv": ":m:s" } loadDictionary() # read lexicon @@ -92,11 +91,12 @@ for n, sLine in enumerate(readFile(sp+"/data/dictConj.txt")): nTab = sLine.count("\t") if nTab == 1: # new entry sLemma, sVinfo = sLine.split("\t") - dConj = { ":PQ": { ":P": "", ":Q1": "", ":Q2": "", ":Q3": "", ":Q4": ""}, + dConj = { ":P": { ":P": "" }, + ":Q": { ":m:s": "", ":f:s": "", ":m:p": "", ":f:p": "" }, ":Ip": { ":1s": "", ":2s": "", ":3s": "", ":1p": "", ":2p": "", ":3p": "", ":1ś": "" }, ":Iq": { ":1s": "", ":2s": "", ":3s": "", ":1p": "", ":2p": "", ":3p": "" }, ":Is": { ":1s": "", ":2s": "", ":3s": "", ":1p": "", ":2p": "", ":3p": "" }, ":If": { ":1s": "", ":2s": "", ":3s": "", ":1p": "", ":2p": "", ":3p": "" }, ":K": { ":1s": "", ":2s": "", ":3s": "", ":1p": "", ":2p": "", ":3p": "" }, @@ -116,11 +116,11 @@ elif nTab == 2: # flexion _, sTag, sFlex = sLine.split("\t") if sTag.count(" ") == 0: if sTag == "ppre": - dConj[":PQ"][":P"] = defineSuffixCode(sLemma, sFlex) + dConj[":P"][":P"] = defineSuffixCode(sLemma, sFlex) else: try: mode, g = sTag.split(maxsplit=1) mode = dTrad[mode] g = dTrad[g] @@ -144,11 +144,11 @@ if dConj[":Ip"][":1ś"] == "2è": dConj[":Ip"][":1ś"] = "2é" elif sLemma == "pouvoir": dConj[":Ip"][":1ś"] = "6uis" lConjTags = [] - for sTense in [":PQ", ":Ip", ":Iq", ":Is", ":If", ":K", ":Sp", ":Sq", ":E"]: + for sTense in [":P", ":Q", ":Ip", ":Iq", ":Is", ":If", ":K", ":Sp", ":Sq", ":E"]: bFound = False for i, d in enumerate(dPatternList[sTense]): if dConj[sTense] == d: bFound = True lConjTags.append(i) @@ -287,10 +287,12 @@ print("> Correspondances phonétiques ", end="") print("(Python et JavaScript)" if bJS else "(Python seulement)") loadDictionary() + conj = importlib.import_module("gc_lang.fr.modules.conj") + # set of homophonic words lSet = [] for sLine in readFile(sp+"/data/phonet_simil.txt"): lWord = sLine.split() for sWord in lWord: @@ -378,8 +380,8 @@ def after (spLaunch, dVars, bJS=False): print("========== Build French data ==========") makeMfsp(spLaunch, bJS) - makePhonetTable(spLaunch, bJS) makeConj(spLaunch, bJS) + makePhonetTable(spLaunch, bJS) #makeLocutions(spLaunch, bJS) Index: gc_lang/fr/modules-js/conj.js ================================================================== --- gc_lang/fr/modules-js/conj.js +++ gc_lang/fr/modules-js/conj.js @@ -50,11 +50,11 @@ _dImpeProEn: new Map ([ [":2s", "-t’en"], [":1p", "-nous-en"], [":2p", "-vous-en"] ]), _dImpeProNegEn: new Map ([ [":2s", "ne t’en "], [":1p", "ne nous en "], [":2p", "ne vous en "] ]), _dGroup: new Map ([ ["0", "auxiliaire"], ["1", "1ᵉʳ groupe"], ["2", "2ᵉ groupe"], ["3", "3ᵉ groupe"] ]), - _dTenseIdx: new Map ([ [":PQ", 0], [":Ip", 1], [":Iq", 2], [":Is", 3], [":If", 4], [":K", 5], [":Sp", 6], [":Sq", 7], [":E", 8] ]), + _dTenseIdx: new Map ([ [":P", 0], [":Q", 1], [":Ip", 2], [":Iq", 3], [":Is", 4], [":If", 5], [":K", 6], [":Sp", 7], [":Sq", 8], [":E", 9] ]), isVerb: function (sVerb) { return this._dVerb.hasOwnProperty(sVerb); }, @@ -102,19 +102,19 @@ return this._dVerbNames[sVerb]; } else { // we suggest past participles let tTags = this._getTags(sVerb); if (tTags) { - let aSugg = [ this._getConjWithTags(sVerb, tTags, ":PQ", ":Q1") ]; - if (this._hasConjWithTags(tTags, ":PQ", ":Q2")) { - aSugg.push(this._getConjWithTags(sVerb, tTags, ":PQ", ":Q2")); - } - if (this._hasConjWithTags(tTags, ":PQ", ":Q3")) { - aSugg.push(this._getConjWithTags(sVerb, tTags, ":PQ", ":Q3")); - } - if (this._hasConjWithTags(tTags, ":PQ", ":Q4")) { - aSugg.push(this._getConjWithTags(sVerb, tTags, ":PQ", ":Q4")); + let aSugg = [ this._getConjWithTags(sVerb, tTags, ":Q", ":m:s") ]; + if (this._hasConjWithTags(tTags, ":Q", ":f:s")) { + aSugg.push(this._getConjWithTags(sVerb, tTags, ":Q", ":f:s")); + } + if (this._hasConjWithTags(tTags, ":Q", ":m:p")) { + aSugg.push(this._getConjWithTags(sVerb, tTags, ":Q", ":m:p")); + } + if (this._hasConjWithTags(tTags, ":Q", ":f:p")) { + aSugg.push(this._getConjWithTags(sVerb, tTags, ":Q", ":f:p")); } // if there is only one past participle (epi inv), unreliable. return (aSugg.length > 1) ? aSugg : []; } return []; @@ -212,22 +212,22 @@ this.nPronominable = -1; } this.dConj = new Map ([ [":Y", new Map ([ ["label", "Infinitif"], - [":", sVerb] + [":Y", sVerb] ])], [":P", new Map ([ ["label", "Participe présent"], - [":", conj._getConjWithTags(sVerb, this._tTags, ":PQ", ":P")] + [":P", conj._getConjWithTags(sVerb, this._tTags, ":P", ":P")] ])], [":Q", new Map ([ ["label", "Participes passés"], - [":Q1", conj._getConjWithTags(sVerb, this._tTags, ":PQ", ":Q1")], - [":Q2", conj._getConjWithTags(sVerb, this._tTags, ":PQ", ":Q2")], - [":Q3", conj._getConjWithTags(sVerb, this._tTags, ":PQ", ":Q3")], - [":Q4", conj._getConjWithTags(sVerb, this._tTags, ":PQ", ":Q4")], + [":m:s", conj._getConjWithTags(sVerb, this._tTags, ":Q", ":m:s")], + [":f:s", conj._getConjWithTags(sVerb, this._tTags, ":Q", ":f:s")], + [":m:p", conj._getConjWithTags(sVerb, this._tTags, ":Q", ":m:p")], + [":f:p", conj._getConjWithTags(sVerb, this._tTags, ":Q", ":f:p")], ])], [":Ip", new Map ([ ["label", "Présent"], [":1s", conj._getConjWithTags(sVerb, this._tTags, ":Ip", ":1s")], [":1ś", conj._getConjWithTags(sVerb, this._tTags, ":Ip", ":1ś")], @@ -359,18 +359,18 @@ participePasse (sWho) { return this.dConj.get(":Q").get(sWho); } participePresent (bPro, bNeg, bTpsCo, bInt, bFem) { - if (!this.dConj.get(":P").get(":")) { + if (!this.dConj.get(":P").get(":P")) { return ""; } let sPartPre; if (bTpsCo) { - sPartPre = (!bPro) ? conj._getConjWithTags(this.sVerbAux, this._tTagsAux, ":PQ", ":P") : conj.getConj("être", ":PQ", ":P"); + sPartPre = (!bPro) ? conj._getConjWithTags(this.sVerbAux, this._tTagsAux, ":P", ":P") : conj.getConj("être", ":P", ":P"); } else { - sPartPre = this.dConj.get(":P").get(":"); + sPartPre = this.dConj.get(":P").get(":P"); } if (sPartPre === "") { return ""; } let bEli = conj._zStartVoy.test(sPartPre); @@ -490,32 +490,32 @@ return sImpe; } _seekPpas (bPro, bFem, bPlur) { if (!bPro && this.sVerbAux == "avoir") { - return this.dConj.get(":Q").get(":Q1"); + return this.dConj.get(":Q").get(":m:s"); } if (!bFem) { - return (bPlur && this.dConj.get(":Q").get(":Q2")) ? this.dConj.get(":Q").get(":Q2") : this.dConj.get(":Q").get(":Q1"); + return (bPlur && this.dConj.get(":Q").get(":f:s")) ? this.dConj.get(":Q").get(":f:s") : this.dConj.get(":Q").get(":m:s"); } if (!bPlur) { - return (this.dConj.get(":Q").get(":Q3")) ? this.dConj.get(":Q").get(":Q3") : this.dConj.get(":Q").get(":Q1"); + return (this.dConj.get(":Q").get(":m:p")) ? this.dConj.get(":Q").get(":m:p") : this.dConj.get(":Q").get(":m:s"); } - return (this.dConj.get(":Q").get(":Q4")) ? this.dConj.get(":Q").get(":Q4") : this.dConj.get(":Q").get(":Q1"); + return (this.dConj.get(":Q").get(":f:p")) ? this.dConj.get(":Q").get(":f:p") : this.dConj.get(":Q").get(":m:s"); } createConjTable (bPro=false, bNeg=false, bTpsCo=false, bInt=false, bFem=false) { let oConjTable = { "t_infi": "Infinitif", "infi": this.infinitif(bPro, bNeg, bTpsCo, bInt, bFem), "t_ppre": "Participe présent", "ppre": this.participePresent(bPro, bNeg, bTpsCo, bInt, bFem), "t_ppas": "Participes passés", - "ppas1": this.participePasse(":Q1"), - "ppas2": this.participePasse(":Q2"), - "ppas3": this.participePasse(":Q3"), - "ppas4": this.participePasse(":Q4"), + "ppas1": this.participePasse(":m:s"), + "ppas2": this.participePasse(":f:s"), + "ppas3": this.participePasse(":m:p"), + "ppas4": this.participePasse(":f:p"), "t_imp": "Impératif", "t_impe": (bInt) ? "" : ((!bTpsCo) ? "Présent" : "Passé"), "impe1": (!bInt) ? this.imperatif(":2s", bPro, bNeg, bTpsCo, bFem) : "", "impe2": (!bInt) ? this.imperatif(":1p", bPro, bNeg, bTpsCo, bFem) : "", "impe3": (!bInt) ? this.imperatif(":2p", bPro, bNeg, bTpsCo, bFem) : "", Index: gc_lang/fr/modules-js/conj_data.json ================================================================== --- gc_lang/fr/modules-js/conj_data.json +++ gc_lang/fr/modules-js/conj_data.json cannot compute difference between binary files Index: gc_lang/fr/modules-js/gce_suggestions.js ================================================================== --- gc_lang/fr/modules-js/gce_suggestions.js +++ gc_lang/fr/modules-js/gce_suggestions.js @@ -99,45 +99,45 @@ let aSugg = new Set(); for (let sStem of gc_engine.oSpellChecker.getLemma(sFlex)) { let tTags = conj._getTags(sStem); if (tTags) { if (!sWhat) { - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")); - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q2")); - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q3")); - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q4")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":m:p")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":f:s")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":f:p")); aSugg.delete(""); } else if (sWhat === ":m:s") { - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")); } else if (sWhat === ":m:p") { - if (conj._hasConjWithTags(tTags, ":PQ", ":Q2")) { - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q2")); + if (conj._hasConjWithTags(tTags, ":Q", ":m:p")) { + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":m:p")); } else { - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")); } } else if (sWhat === ":f:s") { - if (conj._hasConjWithTags(tTags, ":PQ", ":Q3")) { - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q3")); + if (conj._hasConjWithTags(tTags, ":Q", ":f:s")) { + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":f:s")); } else { - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")); } } else if (sWhat === ":f:p") { - if (conj._hasConjWithTags(tTags, ":PQ", ":Q4")) { - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q4")); + if (conj._hasConjWithTags(tTags, ":Q", ":f:p")) { + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":f:p")); } else { - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")); } } else if (sWhat === ":s") { - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")); - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q3")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":f:s")); aSugg.delete(""); } else if (sWhat === ":p") { - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q2")); - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q4")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":m:p")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":f:p")); aSugg.delete(""); } else { - aSugg.add(conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")); + aSugg.add(conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")); } } } if (aSugg.size > 0) { return Array.from(aSugg).join("|"); @@ -170,11 +170,11 @@ } } } else { for (let [sTense, ] of lTenses) { - for (let [sWho, ] of [ ...sMorph.matchAll(/:[123][sp]/g) ]) { + for (let [sWho, ] of [ ...sMorph.matchAll(/:(?:[123][sp]|P|Y)/g) ]) { if (conj.hasConj(sStem, sTense, sWho)) { aSugg.add(conj.getConj(sStem, sTense, sWho)); } } } @@ -356,14 +356,14 @@ } } } else { // a verb let sVerb = cregex.getLemmaOfMorph(sMorph); - if (conj.hasConj(sVerb, ":PQ", ":Q1") && conj.hasConj(sVerb, ":PQ", ":Q3")) { + if (conj.hasConj(sVerb, ":Q", ":m:s") && conj.hasConj(sVerb, ":Q", ":f:s")) { // We also check if the verb has a feminine form. // If not, we consider it’s better to not suggest the masculine one, as it can be considered invariable. - aSugg.add(conj.getConj(sVerb, ":PQ", ":Q1")); + aSugg.add(conj.getConj(sVerb, ":Q", ":m:s")); } } } if (bSuggSimil) { for (let e of phonet.selectSimil(sFlex, ":m:[si]")) { @@ -392,14 +392,14 @@ } } } else { // a verb let sVerb = cregex.getLemmaOfMorph(sMorph); - if (conj.hasConj(sVerb, ":PQ", ":Q2")) { - aSugg.add(conj.getConj(sVerb, ":PQ", ":Q2")); - } else if (conj.hasConj(sVerb, ":PQ", ":Q1")) { - let sSugg = conj.getConj(sVerb, ":PQ", ":Q1"); + if (conj.hasConj(sVerb, ":Q", ":m:p")) { + aSugg.add(conj.getConj(sVerb, ":Q", ":m:p")); + } else if (conj.hasConj(sVerb, ":Q", ":m:s")) { + let sSugg = conj.getConj(sVerb, ":Q", ":m:s"); // it is necessary to filter these flexions, like “succédé” or “agi” that are not masculine plural if (sSugg.endsWith("s")) { aSugg.add(sSugg); } } @@ -433,12 +433,12 @@ } } } else { // a verb let sVerb = cregex.getLemmaOfMorph(sMorph); - if (conj.hasConj(sVerb, ":PQ", ":Q3")) { - aSugg.add(conj.getConj(sVerb, ":PQ", ":Q3")); + if (conj.hasConj(sVerb, ":Q", ":f:s")) { + aSugg.add(conj.getConj(sVerb, ":Q", ":f:s")); } } } if (bSuggSimil) { for (let e of phonet.selectSimil(sFlex, ":f:[si]")) { @@ -467,12 +467,12 @@ } } } else { // a verb let sVerb = cregex.getLemmaOfMorph(sMorph); - if (conj.hasConj(sVerb, ":PQ", ":Q4")) { - aSugg.add(conj.getConj(sVerb, ":PQ", ":Q4")); + if (conj.hasConj(sVerb, ":Q", ":f:p")) { + aSugg.add(conj.getConj(sVerb, ":Q", ":f:p")); } } } if (bSuggSimil) { for (let e of phonet.selectSimil(sFlex, ":f:[pi]")) { @@ -560,11 +560,11 @@ return ""; } function hasFemForm (sFlex) { for (let sStem of gc_engine.oSpellChecker.getLemma(sFlex)) { - if (mfsp.isMasForm(sStem) || conj.hasConj(sStem, ":PQ", ":Q3")) { + if (mfsp.isMasForm(sStem) || conj.hasConj(sStem, ":Q", ":f:s")) { return true; } } if (phonet.hasSimil(sFlex, ":f")) { return true; @@ -572,11 +572,11 @@ return false; } function hasMasForm (sFlex) { for (let sStem of gc_engine.oSpellChecker.getLemma(sFlex)) { - if (mfsp.isMasForm(sStem) || conj.hasConj(sStem, ":PQ", ":Q1")) { + if (mfsp.isMasForm(sStem) || conj.hasConj(sStem, ":Q", ":m:s")) { // what has a feminine form also has a masculine form return true; } } if (phonet.hasSimil(sFlex, ":m")) { Index: gc_lang/fr/modules-js/phonet_data.json ================================================================== --- gc_lang/fr/modules-js/phonet_data.json +++ gc_lang/fr/modules-js/phonet_data.json cannot compute difference between binary files Index: gc_lang/fr/modules/conj.py ================================================================== --- gc_lang/fr/modules/conj.py +++ gc_lang/fr/modules/conj.py @@ -26,11 +26,11 @@ _dImpeProEn = { ":2s": "-t’en", ":1p": "-nous-en", ":2p": "-vous-en" } _dImpeProNegEn = { ":2s": "ne t’en ", ":1p": "ne nous en ", ":2p": "ne vous en " } _dGroup = { "0": "auxiliaire", "1": "1ᵉʳ groupe", "2": "2ᵉ groupe", "3": "3ᵉ groupe" } -_dTenseIdx = { ":PQ": 0, ":Ip": 1, ":Iq": 2, ":Is": 3, ":If": 4, ":K": 5, ":Sp": 6, ":Sq": 7, ":E": 8 } +_dTenseIdx = { ":P": 0, ":Q": 1, ":Ip": 2, ":Iq": 3, ":Is": 4, ":If": 5, ":K": 6, ":Sp": 7, ":Sq": 8, ":E": 9 } def isVerb (sVerb): "return True if it’s a existing verb" @@ -69,17 +69,17 @@ return list(_dVerbNames[sVerb]) else: # we suggest past participles tTags = _getTags(sVerb) if tTags: - aSugg = [ _getConjWithTags(sVerb, tTags, ":PQ", ":Q1") ] - if _hasConjWithTags(tTags, ":PQ", ":Q2"): - aSugg.append(_getConjWithTags(sVerb, tTags, ":PQ", ":Q2")) - if _hasConjWithTags(tTags, ":PQ", ":Q3"): - aSugg.append(_getConjWithTags(sVerb, tTags, ":PQ", ":Q3")) - if _hasConjWithTags(tTags, ":PQ", ":Q4"): - aSugg.append(_getConjWithTags(sVerb, tTags, ":PQ", ":Q4")) + aSugg = [ _getConjWithTags(sVerb, tTags, ":Q", ":m:s") ] + if _hasConjWithTags(tTags, ":Q", ":f:s"): + aSugg.append(_getConjWithTags(sVerb, tTags, ":Q", ":f:s")) + if _hasConjWithTags(tTags, ":Q", ":m:p"): + aSugg.append(_getConjWithTags(sVerb, tTags, ":Q", ":m:p")) + if _hasConjWithTags(tTags, ":Q", ":f:p"): + aSugg.append(_getConjWithTags(sVerb, tTags, ":Q", ":f:p")) # if there is only one past participle (epi inv), unreliable. return aSugg if len(aSugg) > 1 else [] return [] @@ -178,22 +178,22 @@ self.sProLabel = "# erreur #" self.nPronominable = -1 self.dConj = { ":Y": { "label": "Infinitif", - ":": sVerb, + ":Y": sVerb, }, ":P": { "label": "Participe présent", - ":": _getConjWithTags(sVerb, self._tTags, ":PQ", ":P"), + ":P": _getConjWithTags(sVerb, self._tTags, ":P", ":P"), }, ":Q": { "label": "Participes passés", - ":Q1": _getConjWithTags(sVerb, self._tTags, ":PQ", ":Q1"), - ":Q2": _getConjWithTags(sVerb, self._tTags, ":PQ", ":Q2"), - ":Q3": _getConjWithTags(sVerb, self._tTags, ":PQ", ":Q3"), - ":Q4": _getConjWithTags(sVerb, self._tTags, ":PQ", ":Q4"), + ":m:s": _getConjWithTags(sVerb, self._tTags, ":Q", ":m:s"), + ":f:s": _getConjWithTags(sVerb, self._tTags, ":Q", ":f:s"), + ":m:p": _getConjWithTags(sVerb, self._tTags, ":Q", ":m:p"), + ":f:p": _getConjWithTags(sVerb, self._tTags, ":Q", ":f:p"), }, ":Ip": { "label": "Présent", ":1s": _getConjWithTags(sVerb, self._tTags, ":Ip", ":1s"), ":1ś": _getConjWithTags(sVerb, self._tTags, ":Ip", ":1ś"), @@ -331,16 +331,16 @@ return "# erreur" def participePresent (self, bPro, bNeg, bTpsCo, bInt, bFem): "returns string (conjugaison du participe présent)" try: - if not self.dConj[":P"][":"]: + if not self.dConj[":P"][":P"]: return "" if bTpsCo: - sPartPre = _getConjWithTags(self.sVerbAux, self._tTagsAux, ":PQ", ":P") if not bPro else getConj("être", ":PQ", ":P") + sPartPre = _getConjWithTags(self.sVerbAux, self._tTagsAux, ":P", ":P") if not bPro else getConj("être", ":P", ":P") else: - sPartPre = self.dConj[":P"][":"] + sPartPre = self.dConj[":P"][":P"] if not sPartPre: return "" bEli = bool(_zStartVoy.search(sPartPre)) if bPro: if self.bProWithEn: @@ -449,16 +449,16 @@ return "# erreur" def _seekPpas (self, bPro, bFem, bPlur): try: if not bPro and self.sVerbAux == "avoir": - return self.dConj[":Q"][":Q1"] + return self.dConj[":Q"][":m:s"] if not bFem: - return self.dConj[":Q"][":Q2"] if bPlur and self.dConj[":Q"][":Q2"] else self.dConj[":Q"][":Q1"] + return self.dConj[":Q"][":f:s"] if bPlur and self.dConj[":Q"][":f:s"] else self.dConj[":Q"][":m:s"] if not bPlur: - return self.dConj[":Q"][":Q3"] if self.dConj[":Q"][":Q3"] else self.dConj[":Q"][":Q1"] - return self.dConj[":Q"][":Q4"] if self.dConj[":Q"][":Q4"] else self.dConj[":Q"][":Q1"] + return self.dConj[":Q"][":m:p"] if self.dConj[":Q"][":m:p"] else self.dConj[":Q"][":m:s"] + return self.dConj[":Q"][":f:p"] if self.dConj[":Q"][":f:p"] else self.dConj[":Q"][":m:s"] except KeyError: traceback.print_exc() return "# erreur" def createConjTable (self, bPro=False, bNeg=False, bTpsCo=False, bInt=False, bFem=False): @@ -467,14 +467,14 @@ "t_infi": "Infinitif", "infi": self.infinitif(bPro, bNeg, bTpsCo, bInt, bFem), "t_ppre": "Participe présent", "ppre": self.participePresent(bPro, bNeg, bTpsCo, bInt, bFem), "t_ppas": "Participes passés", - "ppas1": self.participePasse(":Q1"), - "ppas2": self.participePasse(":Q2"), - "ppas3": self.participePasse(":Q3"), - "ppas4": self.participePasse(":Q4"), + "ppas1": self.participePasse(":m:s"), + "ppas2": self.participePasse(":f:s"), + "ppas3": self.participePasse(":m:p"), + "ppas4": self.participePasse(":f:p"), "t_imp": "Impératif", "t_impe": "" if bInt else "Présent" if not bTpsCo else "Passé", "impe1": self.imperatif(":2s", bPro, bNeg, bTpsCo, bFem) if not bInt else "", "impe2": self.imperatif(":1p", bPro, bNeg, bTpsCo, bFem) if not bInt else "", "impe3": self.imperatif(":2p", bPro, bNeg, bTpsCo, bFem) if not bInt else "", Index: gc_lang/fr/modules/conj_data.py ================================================================== --- gc_lang/fr/modules/conj_data.py +++ gc_lang/fr/modules/conj_data.py cannot compute difference between binary files Index: gc_lang/fr/modules/gce_suggestions.py ================================================================== --- gc_lang/fr/modules/gce_suggestions.py +++ gc_lang/fr/modules/gce_suggestions.py @@ -73,42 +73,42 @@ dSugg = {} for sStem in _oSpellChecker.getLemma(sFlex): tTags = conj._getTags(sStem) if tTags: if not sPattern: - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")] = "" - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q2")] = "" - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q3")] = "" - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q4")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":m:p")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":f:s")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":f:p")] = "" elif sPattern == ":m:s": - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")] = "" elif sPattern == ":m:p": - if conj._hasConjWithTags(tTags, ":PQ", ":Q2"): - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q2")] = "" + if conj._hasConjWithTags(tTags, ":Q", ":m:p"): + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":m:p")] = "" else: - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")] = "" elif sPattern == ":f:s": - if conj._hasConjWithTags(tTags, ":PQ", ":Q3"): - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q3")] = "" + if conj._hasConjWithTags(tTags, ":Q", ":f:s"): + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":f:s")] = "" else: - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")] = "" elif sPattern == ":f:p": - if conj._hasConjWithTags(tTags, ":PQ", ":Q4"): - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q4")] = "" + if conj._hasConjWithTags(tTags, ":Q", ":f:p"): + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":f:p")] = "" else: - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")] = "" elif sPattern == ":s": - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")] = "" - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q3")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":f:s")] = "" elif sPattern == ":p": - if conj._hasConjWithTags(tTags, ":PQ", ":Q2"): - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q2")] = "" + if conj._hasConjWithTags(tTags, ":Q", ":m:p"): + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":m:p")] = "" else: - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")] = "" - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q4")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":f:p")] = "" else: - dSugg[conj._getConjWithTags(sStem, tTags, ":PQ", ":Q1")] = "" + dSugg[conj._getConjWithTags(sStem, tTags, ":Q", ":m:s")] = "" if "" in dSugg: del dSugg[""] if dSugg: return "|".join(dSugg.keys()) return "" @@ -134,11 +134,11 @@ for sTense in lTenses: if conj.hasConj(sStem, sTense, sWho): dSugg[conj.getConj(sStem, sTense, sWho)] = "" else: for sTense in lTenses: - for sWho in [ m.group(0) for m in re.finditer(":[123][sp]", sMorph) ]: + for sWho in [ m.group(0) for m in re.finditer(":(?:[123][sp]|P|Y)", sMorph) ]: if conj.hasConj(sStem, sTense, sWho): dSugg[conj.getConj(sStem, sTense, sWho)] = "" if dSugg: return "|".join(dSugg.keys()) return "" @@ -269,14 +269,14 @@ if mfsp.isMasForm(sStem): dSugg[sStem] = "" else: # a verb sVerb = cr.getLemmaOfMorph(sMorph) - if conj.hasConj(sVerb, ":PQ", ":Q1") and conj.hasConj(sVerb, ":PQ", ":Q3"): + if conj.hasConj(sVerb, ":Q", ":m:s") and conj.hasConj(sVerb, ":Q", ":f:s"): # We also check if the verb has a feminine form. # If not, we consider it’s better to not suggest the masculine one, as it can be considered invariable. - dSugg[conj.getConj(sVerb, ":PQ", ":Q1")] = "" + dSugg[conj.getConj(sVerb, ":Q", ":m:s")] = "" if bSuggSimil: for e in phonet.selectSimil(sFlex, ":m:[si]"): dSugg[e] = "" if dSugg: return "|".join(dSugg.keys()) @@ -296,14 +296,14 @@ if mfsp.isMasForm(sStem): dSugg[suggPlur(sStem, True)] = "" else: # a verb sVerb = cr.getLemmaOfMorph(sMorph) - if conj.hasConj(sVerb, ":PQ", ":Q2"): - dSugg[conj.getConj(sVerb, ":PQ", ":Q2")] = "" - elif conj.hasConj(sVerb, ":PQ", ":Q1"): - sSugg = conj.getConj(sVerb, ":PQ", ":Q1") + if conj.hasConj(sVerb, ":Q", ":m:p"): + dSugg[conj.getConj(sVerb, ":Q", ":m:p")] = "" + elif conj.hasConj(sVerb, ":Q", ":m:s"): + sSugg = conj.getConj(sVerb, ":Q", ":m:s") # it is necessary to filter these flexions, like “succédé” or “agi” that are not masculine plural. if sSugg.endswith("s"): dSugg[sSugg] = "" if bSuggSimil: for e in phonet.selectSimil(sFlex, ":m:[pi]"): @@ -326,12 +326,12 @@ if mfsp.isMasForm(sStem): dSugg.update(dict.fromkeys(mfsp.getFemForm(sStem, False), "")) else: # a verb sVerb = cr.getLemmaOfMorph(sMorph) - if conj.hasConj(sVerb, ":PQ", ":Q3"): - dSugg[conj.getConj(sVerb, ":PQ", ":Q3")] = "" + if conj.hasConj(sVerb, ":Q", ":f:s"): + dSugg[conj.getConj(sVerb, ":Q", ":f:s")] = "" if bSuggSimil: for e in phonet.selectSimil(sFlex, ":f:[si]"): dSugg[e] = "" if dSugg: return "|".join(dSugg.keys()) @@ -351,12 +351,12 @@ if mfsp.isMasForm(sStem): dSugg.update(dict.fromkeys(mfsp.getFemForm(sStem, True))) else: # a verb sVerb = cr.getLemmaOfMorph(sMorph) - if conj.hasConj(sVerb, ":PQ", ":Q4"): - dSugg[conj.getConj(sVerb, ":PQ", ":Q4")] = "" + if conj.hasConj(sVerb, ":Q", ":f:p"): + dSugg[conj.getConj(sVerb, ":Q", ":f:p")] = "" if bSuggSimil: for e in phonet.selectSimil(sFlex, ":f:[pi]"): dSugg[e] = "" if dSugg: return "|".join(dSugg) @@ -418,21 +418,21 @@ def hasFemForm (sFlex): "return True if there is a feminine form of " for sStem in _oSpellChecker.getLemma(sFlex): - if mfsp.isMasForm(sStem) or conj.hasConj(sStem, ":PQ", ":Q3"): + if mfsp.isMasForm(sStem) or conj.hasConj(sStem, ":Q", ":f:s"): return True if phonet.hasSimil(sFlex, ":f"): return True return False def hasMasForm (sFlex): "return True if there is a masculine form of " for sStem in _oSpellChecker.getLemma(sFlex): - if mfsp.isMasForm(sStem) or conj.hasConj(sStem, ":PQ", ":Q1"): + if mfsp.isMasForm(sStem) or conj.hasConj(sStem, ":Q", ":m:s"): # what has a feminine form also has a masculine form return True if phonet.hasSimil(sFlex, ":m"): return True return False Index: gc_lang/fr/modules/phonet_data.py ================================================================== --- gc_lang/fr/modules/phonet_data.py +++ gc_lang/fr/modules/phonet_data.py cannot compute difference between binary files Index: gc_lang/fr/oxt/DictOptions/LexiconEditor.py ================================================================== --- gc_lang/fr/oxt/DictOptions/LexiconEditor.py +++ gc_lang/fr/oxt/DictOptions/LexiconEditor.py @@ -558,20 +558,20 @@ for sTag2, sConj in dFlex.items(): if sTag2.startswith(":") and sConj: self.lGeneratedFlex.append((sConj, ":V" + oVerb.cGroup + "_" + sVerbTag + sTag1 + sTag2)) else: # participes passés - if dFlex[":Q3"]: - if dFlex[":Q2"]: - self.lGeneratedFlex.append((dFlex[":Q1"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:s/*")) - self.lGeneratedFlex.append((dFlex[":Q2"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:p/*")) - else: - self.lGeneratedFlex.append((dFlex[":Q1"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:i/*")) - self.lGeneratedFlex.append((dFlex[":Q3"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:f:s/*")) - self.lGeneratedFlex.append((dFlex[":Q4"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:f:p/*")) - else: - self.lGeneratedFlex.append((dFlex[":Q1"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:e:i/*")) + if dFlex[":f:s"]: + if dFlex[":m:p"]: + self.lGeneratedFlex.append((dFlex[":m:s"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:s/*")) + self.lGeneratedFlex.append((dFlex[":m:p"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:p/*")) + else: + self.lGeneratedFlex.append((dFlex[":m:s"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:i/*")) + self.lGeneratedFlex.append((dFlex[":f:s"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:f:s/*")) + self.lGeneratedFlex.append((dFlex[":f:p"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:f:p/*")) + else: + self.lGeneratedFlex.append((dFlex[":m:s"], ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:e:i/*")) elif self.xW.State: # Adverbe self.sLemma = self.sLemma.lower(); self.lGeneratedFlex.append((self.sLemma, ":W/*")) elif self.xX.State: Index: gc_lang/fr/oxt/Dictionnaires/dictionaries/README_dict_fr.txt ================================================================== --- gc_lang/fr/oxt/Dictionnaires/dictionaries/README_dict_fr.txt +++ gc_lang/fr/oxt/Dictionnaires/dictionaries/README_dict_fr.txt @@ -1,9 +1,9 @@ _______________________________________________________________________________ DICTIONNAIRES ORTHOGRAPHIQUES FRANÇAIS - version 7.4 + version 7.5 Olivier R. https://grammalecte.net/ Licence : Index: gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-classique.aff ================================================================== --- gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-classique.aff +++ gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-classique.aff @@ -1,10 +1,10 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -# AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “CLASSIQUE” v7.4 +# AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “CLASSIQUE” v7.5 # par Olivier R. -- licence MPL 2.0 # Pour améliorer le dictionnaire, allez sur https://grammalecte.net/ Index: gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-reforme1990.aff ================================================================== --- gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-reforme1990.aff +++ gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-reforme1990.aff @@ -1,10 +1,10 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -# AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “RÉFORME 1990” v7.4 +# AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “RÉFORME 1990” v7.5 # par Olivier R. -- licence MPL 2.0 # Pour améliorer le dictionnaire, allez sur https://grammalecte.net/ Index: gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-toutesvariantes.aff ================================================================== --- gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-toutesvariantes.aff +++ gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-toutesvariantes.aff @@ -1,10 +1,10 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -# AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “TOUTES VARIANTES” v7.4 +# AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “TOUTES VARIANTES” v7.5 # par Olivier R. -- licence MPL 2.0 # Pour améliorer le dictionnaire, allez sur https://grammalecte.net/ Index: gc_lang/fr/rules.grx ================================================================== --- gc_lang/fr/rules.grx +++ gc_lang/fr/rules.grx @@ -7121,11 +7121,11 @@ TEST: s’avérer {{vrai}} ->> exact TEST: {{contraint malgré lui}} ->> contraint TEST: {{contraindre malgré eux}} ->> contraindre TEST: {{applaudir des deux mains}} ->> applaudir TEST: {{Avancer en avant}}, pas le choix ->> Avancer -TEST: vas-y, {{choisis}} un choix ->> fais +TEST: vas-y, {{choisis}} un choix ->> fais|fis TEST: {{dessiner un dessin}} ->> dessiner TEST: nous {{joignons ensemble}} ->> joignons TEST: {{collaborer ensemble}} ->> collaborer TEST: {{comparer entre eux}} ->> comparer TEST: {{monter en haut}} ->> monter @@ -8407,22 +8407,22 @@ __conf_en_participes_présents__ en [ne|me|m’|te|t’|s’] @:[123][sp]¬:[PY] <<- /conf/ not \1.isupper() >>> - <<- /conf/ morph(\3, ":3p") -3>> =suggVerbTense(\3, ":PQ", ":P") && Incohérence : « en \1 \2 »… Vouliez-vous écrire le verbe au participe présent ? + <<- /conf/ morph(\3, ":3p") -3>> =suggVerbTense(\3, ":P", ":P") && Incohérence : « en \1 \2 »… Vouliez-vous écrire le verbe au participe présent ? <<- /conf/ value(\2, "|m’|t’|s’|") -1:2>> "\2en " && Incohérence : vouliez-vous écrire « \2en » ? <<- /conf/ __else__ -1:2>> =\2[0:1] + "’en" && Incohérence. en se @:[123][sp]¬:[PY] <<- /conf/ not \1.isupper() >>> - <<- /conf/ morph(\3, ":3p") -3>> =suggVerbTense(\3, ":PQ", ":P") && Incohérence : « en \1 \2 »… Vouliez-vous écrire le verbe au participe présent ? + <<- /conf/ morph(\3, ":3p") -3>> =suggVerbTense(\3, ":P", ":P") && Incohérence : « en \1 \2 »… Vouliez-vous écrire le verbe au participe présent ? <<- /conf/ not morph(\3, ":[NA]") -1:2>> "s’en" && Incohérence : vouliez-vous écrire « s’en » ? en n’ @:[123][sp]¬:[PY] <<- /conf/ not \1.isupper() and not value(\3, "|importe|") >>> - <<- /conf/ morph(\3, ":3p") -3>> =suggVerbTense(\3, ":PQ", ":P") && Incohérence : « en \1 \2 »… Vouliez-vous écrire le verbe au participe présent ? + <<- /conf/ morph(\3, ":3p") -3>> =suggVerbTense(\3, ":P", ":P") && Incohérence : « en \1 \2 »… Vouliez-vous écrire le verbe au participe présent ? <<- /conf/ not value(<1, "|n’|") -1:2>> "n’en " && Incohérence : vouliez-vous écrire « n’en » ? <<- /conf/ __else__ -1:2>> "en " && Double négation : “n’” est une graphie élidée de “ne”. Il est inutile de la mettre deux fois. L’accord euphonique se fait en prononçant le “n” de “en” avec la première voyelle de “\3”. TEST: {{en t’}}ait donné tant. ->> "t’en " TEST: il {{en me}} donne beaucoup. ->> m’en Index: gc_lang/fr/webext/panel/lex_editor.js ================================================================== --- gc_lang/fr/webext/panel/lex_editor.js +++ gc_lang/fr/webext/panel/lex_editor.js @@ -431,21 +431,21 @@ this.lFlexion.push([sConj, ":V" + oVerb.cGroup + "_" + sVerbTag + sTag1 + sTag2]); } } } else { // participes passés - if (dFlex.get(":Q3") !== "") { - if (dFlex.get(":Q2") !== "") { - this.lFlexion.push([dFlex.get(":Q1"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:s/*"]); - this.lFlexion.push([dFlex.get(":Q2"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:p/*"]); - } else { - this.lFlexion.push([dFlex.get(":Q1"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:i/*"]); - } - this.lFlexion.push([dFlex.get(":Q3"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:f:s/*"]); - this.lFlexion.push([dFlex.get(":Q4"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:f:p/*"]); - } else { - this.lFlexion.push([dFlex.get(":Q1"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:e:i/*"]); + if (dFlex.get(":f:s") !== "") { + if (dFlex.get(":m:p") !== "") { + this.lFlexion.push([dFlex.get(":m:s"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:s/*"]); + this.lFlexion.push([dFlex.get(":m:p"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:p/*"]); + } else { + this.lFlexion.push([dFlex.get(":m:s"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:m:i/*"]); + } + this.lFlexion.push([dFlex.get(":f:s"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:f:s/*"]); + this.lFlexion.push([dFlex.get(":f:p"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:A:f:p/*"]); + } else { + this.lFlexion.push([dFlex.get(":m:s"), ":V" + oVerb.cGroup + "_" + sVerbTag + ":Q:e:i/*"]); } } } } } Index: lexicons/French.lex ================================================================== --- lexicons/French.lex +++ lexicons/French.lex @@ -1,10 +1,10 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -# Lexique simplifié pour Grammalecte v7.4 +# Lexique simplifié pour Grammalecte v7.5 # Licence : MPL v2.0 # :POS ;LEX ~SEM =FQ /DIC de de :G:D:e:i/* de de :G:R:Rv/*