Index: gc_lang/fr/modules-js/conj.js ================================================================== --- gc_lang/fr/modules-js/conj.js +++ gc_lang/fr/modules-js/conj.js @@ -85,18 +85,18 @@ return null; } return _lVtyp[_dVerb[sVerb][0]]; } -function getSimil (sWord, sMorph) { +function getSimil (sWord, sMorph, sFilter=null) { if (!sMorph.includes(":V")) { return new Set(); } let sInfi = sMorph.slice(1, sMorph.indexOf(" ")); let tTags = _getTags(sInfi); let aSugg = new Set(); - if (sMorph.includes(":Q")) { + if (sMorph.includes(":Q") || sMorph.includes(":Y")) { // we suggest conjugated forms if (sMorph.includes(":V1")) { aSugg.add(sInfi); aSugg.add(_getConjWithTags(sInfi, tTags, ":Ip", ":3s")); aSugg.add(_getConjWithTags(sInfi, tTags, ":Ip", ":2p")); @@ -127,10 +127,13 @@ aSugg.add(_getConjWithTags(sInfi, tTags, ":PQ", ":Q4")); aSugg.delete(""); // if there is only one past participle (epi inv), unreliable. if (aSugg.size === 1) { aSugg.clear(); + } + if (sMorph.includes(":V1")) { + aSugg.add(sInfi); } } return aSugg; } 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 @@ -489,11 +489,11 @@ function suggSimil (sWord, sPattern) { // return list of words phonetically similar to sWord and whom POS is matching sPattern let aSugg = phonet.selectSimil(sWord, sPattern); for (let sMorph of _dAnalyses._get(sWord, [])) { - for (let e of conj.getSimil(sWord, sMorph)) { + for (let e of conj.getSimil(sWord, sMorph, sPattern)) { aSugg.add(e); } } if (aSugg.size > 0) { return Array.from(aSugg).join("|"); Index: gc_lang/fr/modules/conj.py ================================================================== --- gc_lang/fr/modules/conj.py +++ gc_lang/fr/modules/conj.py @@ -59,11 +59,11 @@ if ":V" not in sMorph: return set() sInfi = sMorph[1:sMorph.find(" ")] tTags = _getTags(sInfi) aSugg = set() - if ":Q" in sMorph: + if ":Q" in sMorph or ":Y" in sMorph: # we suggest conjugated forms if ":V1" in sMorph: aSugg.add(sInfi) aSugg.add(_getConjWithTags(sInfi, tTags, ":Ip", ":3s")) aSugg.add(_getConjWithTags(sInfi, tTags, ":Ip", ":2p")) @@ -93,10 +93,12 @@ aSugg.add(_getConjWithTags(sInfi, tTags, ":PQ", ":Q4")) aSugg.discard("") # if there is only one past participle (epi inv), unreliable. if len(aSugg) == 1: aSugg.clear() + if ":V1" in sMorph: + aSugg.add(sInfi) return aSugg def getConjSimilInfiV1 (sInfi): if sInfi not in _dVerb: Index: gc_lang/fr/modules/gce_suggestions.py ================================================================== --- gc_lang/fr/modules/gce_suggestions.py +++ gc_lang/fr/modules/gce_suggestions.py @@ -376,11 +376,11 @@ def suggSimil (sWord, sPattern=None): "return list of words phonetically similar to sWord and whom POS is matching sPattern" # we don’t check if word exists in _dAnalyses, for it is assumed it has been done before aSugg = phonet.selectSimil(sWord, sPattern) for sMorph in _dAnalyses.get(sWord, []): - for e in conj.getSimil(sWord, sMorph): + for e in conj.getSimil(sWord, sMorph, sPattern): aSugg.add(e) #aSugg = aSugg.union(conj.getSimil(sWord, sMorph)) if aSugg: return "|".join(aSugg) return ""