Overview
Comment: | [core][fx][fr] merge Lexicographe: detection of most common locutions |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | fr | core | new_feature | fx |
Files: | files | file ages | folders |
SHA3-256: |
c60b5384300a1452c32a2060f3090c99 |
User & Date: | olr on 2017-11-25 16:17:44 |
Other Links: | manifest | tags |
Context
2017-11-25
| ||
16:23 | [build] version 0.6.1 check-in: 451ce75ada user: olr tags: trunk, build | |
16:17 | [core][fx][fr] merge Lexicographe: detection of most common locutions check-in: c60b538430 user: olr tags: trunk, fr, core, new_feature, fx | |
14:51 | [fx] add font Yanone Kaffeesatz check-in: edae0de03d user: olr tags: trunk, fx | |
2017-11-22
| ||
23:50 | [fr] màj: locutions adverbiales Closed-Leaf check-in: d9c2fd3783 user: olr tags: fr, Lexicographe | |
Changes
Modified gc_core/js/text.js from [9bf91b3594] to [abcdad5f85].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 | - + - + | // JavaScript /*jslint esversion: 6*/ /*global require,exports*/ "use strict"; if (typeof(require) !== 'undefined') { var helpers = require("resource://grammalecte/helpers.js"); } var text = { |
︙ | |||
41 42 43 44 45 46 47 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - + | } yield sText; }, getReadableError: function (oErr) { // Returns an error oErr as a readable error try { |
︙ |
Modified gc_core/js/tokenizer.js from [9bb6ea03fb] to [a34a81c6e5].
︙ | |||
12 13 14 15 16 17 18 | 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 40 41 42 43 44 45 | - - + + + - - + + + | const aTkzPatterns = { // All regexps must start with ^. "default": [ [/^[ \t]+/, 'SPACE'], |
︙ | |||
64 65 66 67 68 69 70 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - + - + | while (sText) { let nCut = 1; for (let [zRegex, sType] of this.aRules) { try { if ((m = zRegex.exec(sText)) !== null) { if (sType == 'SEPARATOR') { for (let c of m[0]) { |
︙ |
Modified gc_core/py/tokenizer.py from [5a9c0c9105] to [17f452887e].
1 2 3 4 5 6 7 | 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 | - - + + + - - + + + | # Very simple tokenizer import re _PATTERNS = { "default": ( |
︙ |
Modified gc_lang/fr/build_data.py from [ddf3c68ae3] to [6a4fdb333b].
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 40 41 | 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 40 41 42 43 44 45 | + + + + | #!python3 # FRENCH DATA BUILDER # # by Olivier R. # License: MPL 2 import json import os import itertools import grammalecte.ibdawg as ibdawg from grammalecte.echo import echo from grammalecte.str_transform import defineSuffixCode import grammalecte.fr.conj as conj import grammalecte.tokenizer as tkz class cd: """Context manager for changing the current working directory""" def __init__ (self, newPath): self.newPath = os.path.expanduser(newPath) def __enter__ (self): self.savedPath = os.getcwd() os.chdir(self.newPath) def __exit__ (self, etype, value, traceback): os.chdir(self.savedPath) def readFile (spf): if os.path.isfile(spf): with open(spf, "r", encoding="utf-8") as hSrc: for sLine in hSrc: sLine = sLine.strip() if sLine == "__END__": break if sLine and not sLine.startswith("#"): yield sLine else: raise OSError("# Error. File not found or not loadable: " + spf) def makeDictionaries (sp, sVersion): |
︙ | |||
179 180 181 182 183 184 185 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - | lTagMasForm = [] lTagMiscPlur = [] dMiscPlur = {} dMasForm = {} lTag = [] lTagMasPl = [] for n, sLine in enumerate(readFile(sp+"/data/dictDecl.txt")): |
︙ | |||
312 313 314 315 316 317 318 | 315 316 317 318 319 320 321 322 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 | - - - + + + + - - - - - - + + + + + + + + + + - + - + - + | open(sp+"/modules-js/phonet_data.json", "w", encoding="utf-8", newline="\n").write(sCode) def makeLocutions (sp, bJS=False): "compile list of locutions in JSON" print("> Locutions ", end="") print("(Python et JavaScript)" if bJS else "(Python seulement)") |
Added gc_lang/fr/data/locutions_adjectivales.txt version [93e8503ac2].