Overview
Comment: | [build][core] named graphs |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | core | build | rg |
Files: | files | file ages | folders |
SHA3-256: |
7e92a17d420719345291388e13ab89f1 |
User & Date: | olr on 2018-06-11 09:26:03 |
Other Links: | branch diff | manifest | tags |
Context
2018-06-11
| ||
13:21 | [build][core] graph calls within regex rules check-in: eeef098bd9 user: olr tags: core, build, rg | |
09:26 | [build][core] named graphs check-in: 7e92a17d42 user: olr tags: core, build, rg | |
09:11 | [core] gc engine: small code clarification check-in: 70e6105d8a user: olr tags: core, rg | |
Changes
Modified compile_rules_graph.py from [37d848c323] to [f86ee887b1].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - - - - - - - - - - - | dACTIONS = {} lFUNCTIONS = [] def prepareFunction (s): s = s.replace("__also__", "bCondMemo") s = s.replace("__else__", "not bCondMemo") |
︙ | |||
234 235 236 237 238 239 240 | 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 250 251 252 253 254 255 256 257 258 259 260 261 262 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 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - - - + + + + + - - - - - - + + + + + | except: print("Error. Rules file in project [" + sLang + "] not found.") exit() # removing comments, zeroing empty lines, creating definitions, storing tests, merging rule lines print(" parsing rules...") global dDEF |
︙ | |||
342 343 344 345 346 347 348 | 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | - + | for sActionName, aAction in dACTIONS.items(): print(sActionName, aAction) # Result d = { "graph_callables": sPyCallables, "graph_gctests": sGCTests, |
Modified gc_core/py/lang_core/gc_engine.py from [7c7a312e6d] to [12b89317cd].
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + | from itertools import chain from ..graphspell.spellchecker import SpellChecker from ..graphspell.echo import echo from . import gc_options from ..graphspell.tokenizer import Tokenizer |
︙ | |||
136 137 138 139 140 141 142 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + | dDA.clear() try: # regex parser _, errs = _proofread(sText[iStart:iEnd], sRealText[iStart:iEnd], iStart, False, dDA, dPriority, sCountry, dOpt, bShowRuleId, bDebug, bContext) aErrors.update(errs) # token parser oSentence = TokenSentence(sText[iStart:iEnd], sRealText[iStart:iEnd], iStart) |
︙ | |||
575 576 577 578 579 580 581 | 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 | - + | def __init__ (self, sSentence, sSentence0, nOffset): self.sSentence = sSentence self.sSentence0 = sSentence0 self.nOffset = nOffset self.lToken = list(_oTokenizer.genTokens(sSentence, True)) self.createError = self._createWriterError if _bWriterError else self._createDictError |
︙ | |||
617 618 619 620 621 622 623 | 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 | - + - + - + - + - + | yield dGraph[dNode["<re_morph>"][sRegex]] else: if sNegPattern and any(re.search(sNegPattern, sMorph) for sMorph in _oSpellChecker.getMorph(dToken["sValue"])): continue if any(re.search(sPattern, sMorph) for sMorph in _oSpellChecker.getMorph(dToken["sValue"])): yield dGraph[dNode["<re_morph>"][sRegex]] |
︙ |
Modified gc_core/py/lang_core/gc_rules_graph.py from [e9a58f5498] to [b99ba93b1b].
1 2 | 1 2 3 4 5 | - + | # generated code, do not edit |
Modified gc_lang/fr/rules_graph.grx from [7f8d7a1159] to [7ae68d4f85].
︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 46 47 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | + + | # Fin d’interprétation du fichier avec une ligne commençant par #END # ERREURS COURANTES # http://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Fautes_d%27orthographe/Courantes GRAPH_NAME: test_graph __da1__ ne >donner <<- =>> select(\2, ":V") TEST: je ne donne rien. |
︙ |