Overview
Comment: | [fr] lexicographe: renommage de variables |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | fr | Lexicographe |
Files: | files | file ages | folders |
SHA3-256: |
54bbf1385feb12f5967655ac8f04d68b |
User & Date: | olr on 2017-11-02 09:13:57 |
Other Links: | branch diff | manifest | tags |
Context
2017-11-02
| ||
10:47 | [fr] lexicographe: gestion des locutions occasionnelles check-in: 34d80cabfa user: olr tags: fr, Lexicographe | |
09:13 | [fr] lexicographe: renommage de variables check-in: 54bbf1385f user: olr tags: fr, Lexicographe | |
07:38 | [fr][bug] lexicographe: analyse des formes interrogatives check-in: fc24898855 user: olr tags: fr, Lexicographe | |
Changes
Modified gc_lang/fr/modules-js/lexicographe.js from [214e1814b2] to [52d42ccc04].
︙ | ︙ | |||
9 10 11 12 13 14 15 | ${map} if (typeof (require) !== 'undefined') { var helpers = require("resource://grammalecte/helpers.js"); } | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ${map} if (typeof (require) !== 'undefined') { var helpers = require("resource://grammalecte/helpers.js"); } const _dTag = new Map([ [':G', "[mot grammatical]"], [':N', " nom,"], [':A', " adjectif,"], [':M1', " prénom,"], [':M2', " patronyme,"], [':MP', " nom propre,"], [':W', " adverbe,"], |
︙ | ︙ | |||
105 106 107 108 109 110 111 | ['/C', " {classique}"], ['/M', ""], ['/R', " {réforme}"], ['/A', ""], ['/X', ""] ]); | | | | | | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | ['/C', " {classique}"], ['/M', ""], ['/R', " {réforme}"], ['/A', ""], ['/X', ""] ]); const _dLocTag = new Map([ [':L', "locution"], [':LN', "locution nominale"], [':LA', "locution adjectivale"], [':LV', "locution verbale"], [':LW', "locution adverbiale"], [':LR', "locution prépositive"], [':LO', "locution pronominale"], [':LC', "locution conjonctive"], [':LJ', "locution interjective"], [':B', " cardinale"], [':e', " épicène"], [':m', " masculine"], [':f', " féminine"], [':s', " singulière"], [':p', " plurielle"], [':i', " invariable"], ['/L', " {latin}"] ]); const _dLocVerb = new Map([ ['i', " intransitive"], ['n', " transitive indirecte"], ['t', " transitive directe"], ['p', " pronominale"], ['m', " impersonnelle"], ]); const _dElidedPrefix = new Map([ ['d', "(de), déterminant épicène invariable"], ['l', "(le/la), déterminant masculin/féminin singulier"], ['j', "(je), pronom personnel sujet, 1ʳᵉ pers., épicène singulier"], ['m', "(me), pronom personnel objet, 1ʳᵉ pers., épicène singulier"], ['t', "(te), pronom personnel objet, 2ᵉ pers., épicène singulier"], ['s', "(se), pronom personnel objet, 3ᵉ pers., épicène singulier/pluriel"], ['n', "(ne), adverbe de négation"], ['c', "(ce), pronom démonstratif, masculin singulier/pluriel"], ['ç', "(ça), pronom démonstratif, masculin singulier"], ['qu', "(que), conjonction de subordination"], ['lorsqu', "(lorsque), conjonction de subordination"], ['quoiqu', "(quoique), conjonction de subordination"], ['jusqu', "(jusque), préposition"] ]); const _dPronoms = new Map([ ['je', " pronom personnel sujet, 1ʳᵉ pers. sing."], ['tu', " pronom personnel sujet, 2ᵉ pers. sing."], ['il', " pronom personnel sujet, 3ᵉ pers. masc. sing."], ['on', " pronom personnel sujet, 3ᵉ pers. sing. ou plur."], ['elle', " pronom personnel sujet, 3ᵉ pers. fém. sing."], ['nous', " pronom personnel sujet/objet, 1ʳᵉ pers. plur."], ['vous', " pronom personnel sujet/objet, 2ᵉ pers. plur."], |
︙ | ︙ | |||
262 263 264 265 266 267 268 | }; break; case 'ELPFX': let sTemp = oToken.sValue.replace("’", "").replace("'", "").replace("`", "").toLowerCase(); return { sType: oToken.sType, sValue: oToken.sValue, | | | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | }; break; case 'ELPFX': let sTemp = oToken.sValue.replace("’", "").replace("'", "").replace("`", "").toLowerCase(); return { sType: oToken.sType, sValue: oToken.sValue, aLabel: [_dElidedPrefix.gl_get(sTemp, "préfixe élidé inconnu")] }; break; case 'FOLDER': return { sType: oToken.sType, sValue: oToken.sValue.slice(0, 40) + "…", aLabel: ["dossier"] |
︙ | ︙ | |||
323 324 325 326 327 328 329 | } _formatTags (sTags) { let sRes = ""; sTags = sTags.replace(/V([0-3][ea]?)[itpqnmr_eaxz]+/, "V$1"); let m; while ((m = this._zTag.exec(sTags)) !== null) { | | | | | | | | | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | } _formatTags (sTags) { let sRes = ""; sTags = sTags.replace(/V([0-3][ea]?)[itpqnmr_eaxz]+/, "V$1"); let m; while ((m = this._zTag.exec(sTags)) !== null) { sRes += _dTag.get(m[0]); } if (sRes.startsWith(" verbe") && !sRes.includes("infinitif")) { sRes += " [" + sTags.slice(1, sTags.indexOf(" ")) + "]"; } if (!sRes) { return "#Erreur. Étiquette inconnue : [" + sTags + "]"; } return sRes.gl_trimRight(","); } _formatTagsLoc (sTags) { let sRes = ""; let m; while ((m = this._zTag.exec(sTags)) !== null) { if (m[0].startsWith(":LV")) { sRes += _dLocTag.get(":LV"); for (let c of m[0].slice(3)) { sRes += _dLocVerb.get(c); } } else { sRes += _dLocTag.get(m[0]); } } if (!sRes) { return "#Erreur. Étiquette inconnue : [" + sTags + "]"; } return sRes.gl_trimRight(","); } _formatSuffix (s) { if (s.startsWith("t-")) { return "“t” euphonique +" + _dPronoms.get(s.slice(2)); } if (!s.includes("-")) { return _dPronoms.get(s.replace("’", "'")); } if (s.endsWith("ous")) { s += '2'; } let nPos = s.indexOf("-"); return _dPronoms.get(s.slice(0, nPos)) + " +" + _dPronoms.get(s.slice(nPos + 1)); } getListOfTokens (sText, bInfo=true) { let aElem = []; if (sText !== "") { for (let oToken of this.oTokenizer.genTokens(sText)) { if (bInfo) { |
︙ | ︙ |
Modified gc_lang/fr/webext/content_scripts/panel_lxg.js from [524fe4ff4b] to [6b9d622aa0].
1 2 3 4 5 6 7 8 9 10 | // JavaScript "use strict"; class GrammalecteLexicographer extends GrammalectePanel { constructor (...args) { super(...args); this._nCount = 0; this._xContentNode = oGrammalecte.createNode("div", {id: "grammalecte_lxg_panel_content"}); | > | 1 2 3 4 5 6 7 8 9 10 11 | // JavaScript "use strict"; class GrammalecteLexicographer extends GrammalectePanel { constructor (...args) { super(...args); this._nCount = 0; this._xContentNode = oGrammalecte.createNode("div", {id: "grammalecte_lxg_panel_content"}); |
︙ | ︙ |