Grammalecte  Check-in [83fbc36b7a]

Overview
Comment:[fr] lexicographe: clarification de code
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fr | Lexicographe
Files: files | file ages | folders
SHA3-256: 83fbc36b7ab2e23d707c5ce02bea1ac66b90cfcc441738ae7cc5e3def25c60e1
User & Date: olr on 2017-10-30 12:00:46
Other Links: branch diff | manifest | tags
Context
2017-10-30
13:48
[fr] lexicographe: restructuration des données, réduction de l’échantillon de test, élisons dorénavant acceptées check-in: f8019de85c user: olr tags: Lexicographe, fr
12:00
[fr] lexicographe: clarification de code check-in: 83fbc36b7a user: olr tags: Lexicographe, fr
11:27
[fr] lexicographe: clarification de code check-in: ca296fe5b5 user: olr tags: Lexicographe, fr
Changes

Modified gc_lang/fr/modules-js/lexicographe.js from [d4be1a8610] to [57cce4f9d0].

356
357
358
359
360
361
362
363
364
365
366
367

368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391

392
393
394
395
396
397
398

    getListOfTokensReduc (sText, bInfo = true) {
        let aTokenList = this.getListOfTokens(sText.replace("'", "’").trim(), false);
        let iKey = 0;
        let aElem = [];
        do {
            let oToken = aTokenList[iKey];
            let bLocFound = false;
            let iKeyTree = iKey + 1;
            let sTokenTmpKey = '';
            let aTokenTempList = [oToken];
            if (oToken.sType == "WORD" || oToken.sType == "ELPFX"){

                let oLocNode = this.oLocGraph[this._unifyStr(oToken.sValue)];
                while (typeof(oLocNode) !== "undefined") {
                    let oTokenNext = aTokenList[iKeyTree];
                    iKeyTree++;

                    if (typeof(oTokenNext) !== "undefined") {
                        oLocNode = oLocNode[this._unifyStr(oTokenNext.sValue)];
                    } else {
                        oLocNode = "undefined";
                    }

                    if (typeof(oLocNode) !== "undefined" && iKeyTree <= aTokenList.length) {
                        sTokenTmpKey = Object.keys(oLocNode)[0];
                        aTokenTempList.push(oTokenNext);
                    } else {
                        if (sTokenTmpKey.substring(0, 1) == ':') {
                            bLocFound = true;
                        }
                        break;
                    }
                };
            }

            if (bLocFound) {

                let sWord = '';
                for (let oTokenWord of aTokenTempList) {
                    sWord += oTokenWord.sValue+' ';
                }
                iKey = iKey + aTokenTempList.length-1;
                let oTokenLocution = {
                    'nEnd': aTokenTempList[aTokenTempList.length-1].nEnd,







<
<



>

|


<
|

<
<

<
|



|
<
|
<
|
<


<
>







356
357
358
359
360
361
362


363
364
365
366
367
368
369
370

371
372


373

374
375
376
377
378

379

380

381
382

383
384
385
386
387
388
389
390

    getListOfTokensReduc (sText, bInfo = true) {
        let aTokenList = this.getListOfTokens(sText.replace("'", "’").trim(), false);
        let iKey = 0;
        let aElem = [];
        do {
            let oToken = aTokenList[iKey];


            let sTokenTmpKey = '';
            let aTokenTempList = [oToken];
            if (oToken.sType == "WORD" || oToken.sType == "ELPFX"){
                let iKeyTree = iKey + 1;
                let oLocNode = this.oLocGraph[this._unifyStr(oToken.sValue)];
                while (oLocNode) {
                    let oTokenNext = aTokenList[iKeyTree];
                    iKeyTree++;

                    if (oTokenNext) {
                        oLocNode = oLocNode[this._unifyStr(oTokenNext.sValue)];


                    }

                    if (oLocNode && iKeyTree <= aTokenList.length) {
                        sTokenTmpKey = Object.keys(oLocNode)[0];
                        aTokenTempList.push(oTokenNext);
                    } else {
                        break;

                    }

                }

            }


            if (sTokenTmpKey.substring(0, 1) == ':') {
                let sWord = '';
                for (let oTokenWord of aTokenTempList) {
                    sWord += oTokenWord.sValue+' ';
                }
                iKey = iKey + aTokenTempList.length-1;
                let oTokenLocution = {
                    'nEnd': aTokenTempList[aTokenTempList.length-1].nEnd,