Grammalecte  Check-in [4aef5c025d]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

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 2019-05-25 09:53:24
Context
2019-05-25
10:08
[core][py] gc engine: full analysis, results with sentences, tokens and errors check-in: 391d4d820a user: olr tags: core, trunk
09:53
[core][fr][js] update lexicographer check-in: 4aef5c025d user: olr tags: core, fr, trunk
09:51
[fx] update lexicographer CSS check-in: af891c805d user: olr tags: fx, trunk
Changes

Changes to gc_lang/fr/modules-js/lexicographe.js.

250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
...
363
364
365
366
367
368
369
370
371
372
373
374
375






376
377
378
379
380
381
382

    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;
................................................................................
                        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;
    }








|







 







|





>
>
>
>
>
>







250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
...
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

    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;
................................................................................
                        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;
    }