Comment: | [js] All Grammalecte work in node |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | njs | nodejs |
Files: | files | file ages | folders |
SHA3-256: |
2d5c0dce59b2e3ebe062719a553a0652 |
User & Date: | IllusionPerdu on 2018-10-10 12:08:41 |
Other Links: | branch diff | manifest | tags |
2018-10-10
| ||
12:23 | [js] Minimal file to use in node check-in: a43e8d10eb user: IllusionPerdu tags: njs, nodejs | |
12:08 | [js] All Grammalecte work in node check-in: 2d5c0dce59 user: IllusionPerdu tags: njs, nodejs | |
09:36 | Minimal file to use in node check-in: b79bb889b9 user: IllusionPerdu tags: graphspell, njs, nodejs | |
Modified gc_core/js/lang_core/gc_engine.js from [e6dde271f2] to [47ef94b478].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + - - + + - - - + + + - - - - - - + + + + + + + + + + + + | // Grammar checker engine /* jshint esversion:6, -W097 */ |
︙ | |||
49 50 51 52 53 54 55 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - - + + + + + | version: "${version}", author: "${author}", //// Initialization load: function (sContext="JavaScript", sColorType="aRGB", sPath="") { try { |
︙ | |||
177 178 179 180 181 182 183 | 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | - + | this.dTokenPos = new Map(); this.dTags = new Map(); this.dError = new Map(); this.dErrorPriority = new Map(); // Key = position; value = priority } asString () { |
︙ | |||
1385 1386 1387 1388 1389 1390 1391 | 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 | - + | ${callablesJS} // callables for graph rules ${graph_callablesJS} } |
︙ |
Modified gc_core/js/lang_core/gc_options.js from [aa3f5d62cd] to [a80ff5a6ee].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 | + + - - + + | // Options for Grammalecte /* jshint esversion:6 */ |
︙ | |||
21 22 23 24 25 26 27 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + - + - + - + - - - + + + | for (let [sOpt, sColor] of Object.entries(dOptColor)) { dColor[sOpt] = dColorType[sColor]; } return dColor; } catch (e) { console.error(e); |
Modified gc_core/js/lang_core/gc_rules.js from [cdb121423e] to [c719e5aff6].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | + + - + - + - + | // Grammar checker rules /* jshint esversion:6, -W097 */ |
Modified gc_core/js/lang_core/gc_rules_graph.js from [7405261f29] to [41e4864e6c].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | + + - + - + - + - + | // Grammar checker graph rules /* jshint esversion:6, -W097 */ |
Modified gc_core/js/tests.js from [1eda44faf6] to [2455a96fb4].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | + + - - + + - - + + + + + + + + - + + | // JavaScript /* jshint esversion:6, -W097 */ |
︙ | |||
149 150 151 152 153 154 155 | 158 159 160 161 162 163 164 165 166 167 | - + | } return [" ".repeat(sLine.length), ""]; } } |
Modified gc_core/js/text.js from [c9e7670db8] to [2540b2b127].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 | + + - - + + | // JavaScript /* jshint esversion:6, -W097 */ |
︙ | |||
55 56 57 58 59 60 61 | 57 58 59 60 61 62 63 64 65 66 67 68 | - + | console.error(e); return "\n# Error. Data: " + oErr.toString(); } } }; |
Modified gc_lang/fr/modules-js/conj.js from [8124143953] to [9586582de9].
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | + + - - + + - + - - + + + + | // Grammalecte - Conjugueur // License: GPL 3 /* jshint esversion:6, -W097 */ |
︙ | |||
492 493 494 495 496 497 498 | 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | + + + - + - - + + - - + + - - + + - + - + - + - + | } return (this.dConj.get(":Q").get(":Q4")) ? this.dConj.get(":Q").get(":Q4") : this.dConj.get(":Q").get(":Q1"); } } // Initialization if(!conj.bInit && typeof process !== 'undefined') { // Work with nodejs conj.init(helpers.loadFile(__dirname+'/conj_data.json')); |
︙ |
Modified gc_lang/fr/modules-js/conj_generator.js from [058e3de2f7] to [5e8295b732].
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | - - - - + + + + + + | // JavaScript |
︙ | |||
135 136 137 138 139 140 141 | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | - + | [2, "isses", ":Sp:Sq:2s/*", false], [2, "isse", ":Sp:3s/*", false], [2, "ît", ":Sq:3s/*", false], [2, "is", ":E:2s/*", false], [2, "issons", ":E:1p/*", false], [2, "issez", ":E:2p/*", false] ], |
︙ |
Modified gc_lang/fr/modules-js/cregex.js from [97d67d03aa] to [9727baa3eb].
| 1 2 3 4 5 6 7 8 9 10 11 | - - + + + + |
|
︙ | |||
263 264 265 266 267 268 269 | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | - + | return false; } return lMorph.some(s => this._zNPm.test(s)); } }; |
︙ |
Modified gc_lang/fr/modules-js/gce_analyseur.js from [427ee71140] to [09241345b5].
| 1 2 3 4 5 6 7 8 9 10 11 | - - + + + + |
|
︙ | |||
126 127 128 129 130 131 132 | 128 129 130 131 132 133 134 135 136 137 138 139 140 | - + | if (s.length > 1 && s.length < 16 && s.slice(0, 1).gl_isLowerCase() && (!s.slice(1).gl_isLowerCase() || /[0-9]/.test(s))) { return true; } return false; } |
Modified gc_lang/fr/modules-js/gce_date_verif.js from [f30dbe242e] to [8555f52be9].
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + - + - + + |
|
︙ |
Modified gc_lang/fr/modules-js/gce_suggestions.js from [ae7eaca80b] to [b2f66a0847].
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - - - + + + + + - - - - + + + + + + + + |
|
︙ |
Modified gc_lang/fr/modules-js/lexicographe.js from [3f0da2f1ff] to [50f4dc02f6].
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | + + - - + + | // Grammalecte - Lexicographe // License: MPL 2 /* jshint esversion:6, -W097 */ |
︙ |
Modified gc_lang/fr/modules-js/mfsp.js from [9d6124ec70] to [d93c273b71].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | + + - - + + - - + + + + | // Grammalecte /* jshint esversion:6, -W097 */ |
︙ | |||
100 101 102 103 104 105 106 | 104 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 | + + + - + - + - + - + - + - + | return "## erreur, code : " + sSfx + " ##"; } } }; // Initialization if(!mfsp.bInit && typeof process !== 'undefined') { //Nodejs mfsp.init(helpers.loadFile(__dirname+'/mfsp_data.json')); |
Modified gc_lang/fr/modules-js/phonet.js from [07bba03053] to [fb94b7fe43].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | + + - + + - + + + | // Grammalecte - Suggestion phonétique /* jshint esversion:6 */ |
︙ | |||
80 81 82 83 84 85 86 | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - + + + + - - + + - + - + - + - + | } return aSelect; } }; // Initialization |
Modified gc_lang/fr/modules-js/textformatter.js from [a9dd9e148e] to [526f0b2382].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 | + + - - + + | // Grammalecte - text formatter /* jshint esversion:6, -W097 */ |
︙ | |||
81 82 83 84 85 86 87 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - + | "erase_non_breaking_hyphens": [ [//g, ""] ], //// typographic signs "ts_apostrophe": [ [/\b([ldnjmtscç])['´‘′`](?=[a-zA-Zà-ö0-9À-Öø-ÿØ-ßĀ-ʯ])/ig, "$1’"], [/\b(qu|jusqu|lorsqu|puisqu|quoiqu|quelqu|presqu|entr|aujourd|prud)['´‘′`]/ig, "$1’"] ], "ts_ellipsis": [ [/\.\.\./g, "…"], [/…\.\./g, "……"], [/…\.(?!\.)/g, "…"] ], |
︙ | |||
283 284 285 286 287 288 289 | 285 286 287 288 289 290 291 292 293 294 295 | - + | getDefaultOptions () { return dTFDefaultOptions; } } |
Modified graphspell-js/ibdawg.js from [ad47fc175d] to [3da9a9daaf].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 | - + | // IBDAWG /* jshint esversion:6, -W097 */ /* jslint esversion:6 */ |
︙ | |||
97 98 99 100 101 102 103 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | + + + + - + + | // INDEXABLE BINARY DIRECT ACYCLIC WORD GRAPH constructor (param1, sPath="") { // param1 can be a filename or a object with all the necessary data. try { let oData = null; if (typeof(param1) == "string") { let sURL; if(typeof process !== 'undefined') { sURL = (sPath !== "") ? sPath + "/" + param1 : __dirname + "/_dictionaries/"+param1; } else { |
︙ |