Grammalecte  Check-in [4aef5c025d]

Overview
Comment:[core][fr][js] update lexicographer
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fr | core
Files: files | file ages | folders
SHA3-256: 4aef5c025d117aad92843febc42e65fd4513a290f70481812cedb2bd64a9e99e
User & Date: olr on 2019-05-25 09:53:24
Other Links: manifest | tags
Context
2019-05-25
10:08
[core][py] gc engine: full analysis, results with sentences, tokens and errors check-in: 391d4d820a user: olr tags: trunk, core
09:53
[core][fr][js] update lexicographer check-in: 4aef5c025d user: olr tags: trunk, fr, core
09:51
[fx] update lexicographer CSS check-in: af891c805d user: olr tags: trunk, fx
Changes

Modified gc_lang/fr/modules-js/lexicographe.js from [590d96b2b0] to [f01ccf515f].

250
251
252
253
254
255
256
257
258
259
260
261
262
263
264

    getInfoForToken (oToken) {
        // Token: .sType, .sValue, .nStart, .nEnd
        // return a object {sType, sValue, aLabel}
        let m = null;
        try {
            switch (oToken.sType) {
                case 'SEPARATOR':
                case 'SIGN':
                    return {
                        sType: oToken.sType,
                        sValue: oToken.sValue,
                        aLabel: [_dChar.gl_get(oToken.sValue, "caractère indéterminé")]
                    };
                    break;







|







250
251
252
253
254
255
256
257
258
259
260
261
262
263
264

    getInfoForToken (oToken) {
        // Token: .sType, .sValue, .nStart, .nEnd
        // return a object {sType, sValue, aLabel}
        let m = null;
        try {
            switch (oToken.sType) {
                case 'PUNC':
                case 'SIGN':
                    return {
                        sType: oToken.sType,
                        sValue: oToken.sValue,
                        aLabel: [_dChar.gl_get(oToken.sValue, "caractère indéterminé")]
                    };
                    break;
363
364
365
366
367
368
369
370
371
372
373
374
375






376
377
378
379
380
381
382
                        return {
                            sType: oToken.sType,
                            sValue: oToken.sValue,
                            aLabel: this._getMorph(oToken.sValue)
                        };
                    } else {
                        return {
                            sType: "UNKNOWN",
                            sValue: oToken.sValue,
                            aLabel: ["mot inconnu du dictionnaire"]
                        };
                    }
                    break;






            }
        } catch (e) {
            console.error(e);
        }
        return null;
    }








|





>
>
>
>
>
>







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
                        return {
                            sType: oToken.sType,
                            sValue: oToken.sValue,
                            aLabel: this._getMorph(oToken.sValue)
                        };
                    } else {
                        return {
                            sType: "UNKNOWN_WORD",
                            sValue: oToken.sValue,
                            aLabel: ["mot inconnu du dictionnaire"]
                        };
                    }
                    break;
                default:
                    return {
                        sType: "NO_TYPE",
                        sValue: oToken.sValue,
                        aLabel: ["token inconnu"]
                    }
            }
        } catch (e) {
            console.error(e);
        }
        return null;
    }