Grammalecte  Check-in [a0d34f762e]

Overview
Comment:[core][fr] suggestions: ne pas suggérer les participes passés si autre chose a été trouvé
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fr | core
Files: files | file ages | folders
SHA3-256: a0d34f762e675ec798ef4a4c85d3a003ed62949ad5bb163607f74c069fc59005
User & Date: olr on 2018-11-09 08:50:20
Other Links: manifest | tags
Context
2018-11-09
08:50
[fr] nr: confusions verbes/substantifs check-in: 581cbebf47 user: olr tags: trunk, fr
08:50
[core][fr] suggestions: ne pas suggérer les participes passés si autre chose a été trouvé check-in: a0d34f762e user: olr tags: trunk, fr, core
2018-11-07
09:04
[fr] nr: confusion date/datte, des/dès/dés check-in: 2528e7df7c user: olr tags: trunk, fr
Changes

Modified gc_lang/fr/modules-js/gce_suggestions.js from [6c462561b6] to [50cd88bd49].

521
522
523
524
525
526
527

528
529
530




531
532
533
534
535
536
537
521
522
523
524
525
526
527
528



529
530
531
532
533
534
535
536
537
538
539







+
-
-
-
+
+
+
+







function suggSimil (sWord, sPattern=null, bSubst=false, bVC=false) {
    // return list of words phonetically similar to sWord and whom POS is matching sPattern
    let sSfx;
    if (bVC) {
        [sWord, sSfx] = splitVerb(sWord);
    }
    let aSugg = phonet.selectSimil(sWord, sPattern);
    if (aSugg.size === 0 || !bSubst) {
    for (let sMorph of _oSpellChecker.getMorph(sWord)) {
        for (let e of conj.getSimil(sWord, sMorph, bSubst)) {
            aSugg.add(e);
        for (let sMorph of _oSpellChecker.getMorph(sWord)) {
            for (let e of conj.getSimil(sWord, sMorph, bSubst)) {
                aSugg.add(e);
            }
        }
    }
    if (aSugg.size > 0) {
        if (bVC) {
            return Array.from(aSugg).map((sSugg) => { return sSugg + sSfx; }).join("|");
        }
        return Array.from(aSugg).join("|");

Modified gc_lang/fr/modules/gce_suggestions.py from [00833488a6] to [6e6f6db1f6].

400
401
402
403
404
405
406

407
408
409



410
411
412
413
414
415
416
400
401
402
403
404
405
406
407



408
409
410
411
412
413
414
415
416
417







+
-
-
-
+
+
+









def suggSimil (sWord, sPattern=None, bSubst=False, bVC=False):
    "return list of words phonetically similar to sWord and whom POS is matching sPattern"
    if bVC:
        sWord, sSfx = splitVerb(sWord)
    aSugg = phonet.selectSimil(sWord, sPattern)
    if not aSugg or not bSubst:
    for sMorph in _oSpellChecker.getMorph(sWord):
        aSugg.update(conj.getSimil(sWord, sMorph, bSubst))
        break
        for sMorph in _oSpellChecker.getMorph(sWord):
            aSugg.update(conj.getSimil(sWord, sMorph, bSubst))
            break
    if aSugg:
        if bVC:
            aSugg = list(map(lambda sSug: sSug + sSfx, aSugg))
        return "|".join(aSugg)
    return ""