Grammalecte  Check-in [f614419de2]

Overview
Comment:[graphspell][fx] lexicographer: update
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fx | graphspell | salxg
Files: files | file ages | folders
SHA3-256: f614419de2d7f96e8f34c7944a9aa6d010f7cf2d5d264deeedd535f019b16688
User & Date: olr on 2020-09-07 09:48:27
Other Links: branch diff | manifest | tags
Context
2020-09-10
12:17
[core][graphspell][fx][cli] lexicographer: update check-in: e0ce6b10d7 user: olr tags: cli, core, fx, graphspell, salxg
2020-09-07
09:48
[graphspell][fx] lexicographer: update check-in: f614419de2 user: olr tags: fx, graphspell, salxg
2020-08-31
10:44
[graphspell] ibdawg: fix lexicographer import check-in: c88bf29423 user: olr tags: graphspell, salxg
Changes

Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [b1e5b16e34] to [cb02a4a038].

579
580
581
582
583
584
585



586
587
588
589
590
591
592
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595







+
+
+







                if (oSentence.sSentence.trim() !== "") {
                    let xSentenceBlock = oGrammalecte.createNode("div", {className: "grammalecte_lxg_paragraph_sentence_block"});
                    xSentenceBlock.appendChild(oGrammalecte.createNode("div", {className: "grammalecte_lxg_list_num", textContent: this.nLxgCount}));
                    xSentenceBlock.appendChild(oGrammalecte.createNode("p", {className: "grammalecte_lxg_paragraph_sentence", textContent: oSentence.sSentence}));
                    let xTokenList = oGrammalecte.createNode("div", {className: "grammalecte_lxg_list_of_tokens"});
                    for (let oToken of oSentence.lTokens) {
                        if (oToken["sType"] != "INFO" && !oToken.hasOwnProperty("bMerged")) {
                            if (oToken["sType"] == "WORD" && !oToken["bValidToken"]) {
                                oToken["sType"] = "UNKNOWN_WORD";
                            }
                            xTokenList.appendChild(this._createTokenBlock2(oToken));
                        }
                    }
                    xSentenceBlock.appendChild(xTokenList);
                    this.xLxgResultZone.appendChild(xSentenceBlock);
                }
            }

Modified graphspell-js/lexgraph_fr.js from [b51968eac2] to [94bb3a1779].

464
465
466
467
468
469
470
471

472
473
474
475
476
477
478
464
465
466
467
468
469
470

471
472
473
474
475
476
477
478







-
+







    setLabelsOnToken (oToken) {
        // Token: .sType, .sValue, .nStart, .nEnd, .lMorph
        let m = null;
        try {
            switch (oToken.sType) {
                case 'PUNC':
                case 'SIGN':
                    oToken["aLabels"] = [this.dValues.gl_get(oToken.sValue, "signe de ponctuation divers")];
                    oToken["aLabels"] = [this.dValues.gl_get(oToken["sValue"], "signe de ponctuation divers")];
                    break;
                case 'NUM':
                    oToken["aLabels"] = ["nombre"];
                    break;
                case 'LINK':
                    oToken["aLabels"] = ["hyperlien"];
                    break;
488
489
490
491
492
493
494
495

496
497
498
499
500
501
502
488
489
490
491
492
493
494

495
496
497
498
499
500
501
502







-
+







                case 'HTMLENTITY':
                    oToken["aLabels"] = ["entité caractère XML/HTML"];
                    break;
                case 'HOUR':
                    oToken["aLabels"] = ["heure"];
                    break;
                case 'WORD_ELIDED':
                    oToken["aLabels"] = [this.dValues.gl_get(oToken.sValue, "préfixe élidé inconnu")];
                    oToken["aLabels"] = [this.dValues.gl_get(oToken["sValue"].toLowerCase(), "préfixe élidé inconnu")];
                    break;
                case 'WORD_ORDINAL':
                    oToken["aLabels"] = ["nombre ordinal"];
                    break;
                case 'FOLDERUNIX':
                    oToken["aLabels"] = ["dossier UNIX (et dérivés)"];
                    break;
522
523
524
525
526
527
528
529

530
531
532

533
534
535
536

537
538
539
540

541
542
543



544
545
546
547
548
549
550
522
523
524
525
526
527
528

529
530
531

532
533
534
535

536
537
538
539

540
541
542
543
544
545
546
547
548
549
550
551
552
553







-
+


-
+



-
+



-
+



+
+
+







                            }
                            if (aTags.length > 0) {
                                oToken["aOtherLabels"] = aTags;
                            }
                        }
                    } else {
                        // no morphology, guessing
                        if (oToken.sValue.gl_count("-") > 4) {
                        if (oToken["sValue"].gl_count("-") > 4) {
                            oToken["aLabels"] = ["élément complexe indéterminé"];
                        }
                        else if (m = this._zPartDemForm.exec(oToken.sValue)) {
                        else if (m = this._zPartDemForm.exec(oToken["sValue"])) {
                            // mots avec particules démonstratives
                            oToken["aLabels"] = ["mot avec particule démonstrative"];
                        }
                        else if (m = this._zImperatifVerb.exec(oToken.sValue)) {
                        else if (m = this._zImperatifVerb.exec(oToken["sValue"])) {
                            // formes interrogatives
                            oToken["aLabels"] = ["forme verbale impérative"];
                        }
                        else if (m = this._zInterroVerb.exec(oToken.sValue)) {
                        else if (m = this._zInterroVerb.exec(oToken["sValue"])) {
                            // formes interrogatives
                            oToken["aLabels"] = ["forme verbale interrogative"];
                        }
                        else {
                            oToken["aLabels"] = ["mot inconnu du dictionnaire"];
                        }
                    }
                    break;
                default:
                    oToken["aLabels"] = ["token de nature inconnue"];
            }
        } catch (e) {
            console.error(e);