Overview
Comment: | [fx] update: lexicon editor |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | fx |
Files: | files | file ages | folders |
SHA3-256: |
301791430305d4c6b01e747bad212ff5 |
User & Date: | olr on 2018-02-03 17:21:37 |
Other Links: | manifest | tags |
Context
2018-02-03
| ||
20:02 | [fr] faux positif: avoir été +Vinf check-in: 526eb32d7c user: olr tags: trunk, fr | |
17:21 | [fx] update: lexicon editor check-in: 3017914303 user: olr tags: trunk, fx | |
10:36 | [fr] faux positif: x fois par mois check-in: 7a50bf6290 user: olr tags: trunk, fr | |
Changes
Modified gc_lang/fr/webext/panel/lex_editor.css from [4856554058] to [d5d2b73a16].
︙ | |||
212 213 214 215 216 217 218 | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | + + + + + + - + + + + + + + + + + + | } #no_elem_line { display: none; } .button_block { margin: 5px 0px; background-color: hsl(210, 10%, 90%); border-radius: 5px; padding: 15px; } |
︙ |
Modified gc_lang/fr/webext/panel/lex_editor.html from [37748d26f5] to [13b3afd3c6].
︙ | |||
263 264 265 266 267 268 269 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | + + + + - - - - + + + + + + + + + + + + + + + + + + + - + + | <div id="buttonline"> <div id="add_to_lexicon">Ajouter au dictionnaire</div> </div> </div> </div> <div id="lexicon_page"> <h2>Votre lexique</h2> <div class="button_block"> |
Modified gc_lang/fr/webext/panel/lex_editor.js from [a0448c9bfb] to [6855918a57].
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + | document.getElementById("lexicon_button").addEventListener("click", () => { oWidgets.showPage("lexicon"); }, false); document.getElementById("add_word_button").addEventListener("click", () => { oWidgets.showPage("lemma"); }, false); document.getElementById("table").addEventListener("click", (xEvent) => { oWidgets.onTableClick(xEvent); }, false); document.getElementById("save_button").addEventListener("click", () => { oLexicon.save(); }, false); document.getElementById("export_button").addEventListener("click", () => { oLexicon.export(); }, false); document.getElementById("editor").addEventListener("click", (xEvent) => { oWidgets.onSelectionClick(xEvent); }, false); document.getElementById("lemma").addEventListener("keyup", () => { oWidgets.onWrite(); }, false); document.getElementById("lemma2").addEventListener("keyup", () => { oWidgets.onWrite2(); }, false); document.getElementById("verb_pattern").addEventListener("keyup", () => { oFlexGen.update(); }, false); document.getElementById("flexion").addEventListener("keyup", () => { oFlexGen.update(); }, false); document.getElementById("tags").addEventListener("keyup", () => { oFlexGen.update(); }, false); |
︙ | |||
511 512 513 514 515 516 517 | 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | - + - + - - + + + - + + + + + + - - - + + + + + | this.lFlexion = dResult.lexicon_list; } oWidgets.displayTable(this.lFlexion); }, save: function () { oWidgets.hideElement("save_button"); |
Modified graphspell-js/dawg.js from [cd7995de2e] to [b32ed20eaa].
︙ | |||
25 26 27 28 29 30 31 | 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 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + + - - - + + + - + | We store suffix/affix codes and tags within the graph after the “real” word. A word is a list of numbers [ c1, c2, c3 . . . cN, iAffix, iTags] Each arc is an index in this.lArcVal, where are stored characters, suffix/affix codes for stemming and tags. Important: As usual, the last node (after ‘iTags’) is tagged final, AND the node after ‘cN’ is ALSO tagged final. */ constructor (lEntrySrc, sLangName, cStemming, xProgressBarNode=null) { |
︙ |
Modified graphspell-js/str_transform.js from [aaa0b82c6b] to [e440be0f51].
︙ | |||
87 88 89 90 91 92 93 94 95 96 97 98 99 100 | 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 117 118 119 120 121 122 123 124 125 | + + + + + + + + + + + + + + + + + + + + + + + + + | helpers.logerror(e); } }, showDistance (s1, s2) { console.log(`Distance: ${s1} / ${s2} = ${this.distanceDamerauLevenshtein(s1, s2)})`); }, // Suffix only defineSuffixCode: function (sFlex, sStem) { /* Returns a string defining how to get stem from flexion "n(sfx)" with n: a char with numeric meaning, "0" = 0, "1" = 1, ... ":" = 10, etc. (See ASCII table.) Says how many letters to strip from flexion. sfx [optional]: string to add on flexion Examples: "0": strips nothing, adds nothing "1er": strips 1 letter, adds "er" "2": strips 2 letters, adds nothing */ if (sFlex == sStem) { return "0"; } let jSfx = 0; for (let i = 0; i < Math.min(sFlex.length, sStem.length); i++) { if (sFlex[i] !== sStem[i]) { break; } jSfx += 1; } return String.fromCharCode(sFlex.length-jSfx+48) + sStem.slice(jSfx); }, getStemFromSuffixCode: function (sFlex, sSfxCode) { // Suffix only if (sSfxCode == "0") { return sFlex; } return sSfxCode[0] == '0' ? sFlex + sSfxCode.slice(1) : sFlex.slice(0, -(sSfxCode.charCodeAt(0)-48)) + sSfxCode.slice(1); |
︙ |