Grammalecte  Diff

Differences From Artifact [88e5c8321b]:

To Artifact [21f2cf4731]:


568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592

593
594
595
596
597
598
599
600
        if (!this.bOpened || this.bWorking) {
            return;
        }
        this.startWaitIcon();
        this.clearLexicographer();
        let sText = this.xLxgInput.innerText.replace(/\n/g, " ");
        //console.log(sText);
        this.addMessageToLexicographer("Analyse grammaticale : les mots sont analysés autant que possible en fonction du contexte (cette fonctionnalité est expérimentale).");
        oGrammalecteBackgroundPort.parseFull(sText, "__GrammalectePanel__");
    }

    showParagraphAnalysis (oResult) {
        if (!this.bOpened || oResult === null) {
            return;
        }
        try {
            for (let oSentence of oResult.lSentences) {
                this.nLxgCount += 1;
                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._createTokenBlock(oToken));
                        }
                    }
                    xSentenceBlock.appendChild(xTokenList);
                    this.xLxgResultZone.appendChild(xSentenceBlock);







|

















>
|







568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
        if (!this.bOpened || this.bWorking) {
            return;
        }
        this.startWaitIcon();
        this.clearLexicographer();
        let sText = this.xLxgInput.innerText.replace(/\n/g, " ");
        //console.log(sText);
        this.addMessageToLexicographer("Analyse grammaticale : les mots sont analysés autant que possible en fonction du contexte. (Cette fonctionnalité n’est pas terminée et demeure EXPÉRIMENTALE).");
        oGrammalecteBackgroundPort.parseFull(sText, "__GrammalectePanel__");
    }

    showParagraphAnalysis (oResult) {
        if (!this.bOpened || oResult === null) {
            return;
        }
        try {
            for (let oSentence of oResult.lSentences) {
                this.nLxgCount += 1;
                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")) {
                            //console.log(">", oToken["sValue"], oToken["sType"], oToken["bValidToken"]);
                            if (oToken["sType"].startsWith("WORD") && !oToken["bValidToken"]) {
                                oToken["sType"] = "UNKNOWN_WORD";
                            }
                            xTokenList.appendChild(this._createTokenBlock(oToken));
                        }
                    }
                    xSentenceBlock.appendChild(xTokenList);
                    this.xLxgResultZone.appendChild(xSentenceBlock);