Grammalecte  Check-in [e1254b8ae2]

Overview
Comment:[core][py] remove lexicographer from gc engine
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core | gcerw
Files: files | file ages | folders
SHA3-256: e1254b8ae26c36c14445a452a308eb014bad4181bae1baeddb4739611b80e4d9
User & Date: olr on 2020-04-06 18:24:35
Original Comment: [core] remove lexicographer from gc engine
Other Links: branch diff | manifest | tags
Context
2020-04-06
19:12
[core][py] add echo to gc_engine_func.py check-in: e9d7f69946 user: olr tags: core, gcerw
18:24
[core][py] remove lexicographer from gc engine check-in: e1254b8ae2 user: olr tags: core, gcerw
13:15
merge trunk check-in: 1c5bdb25b6 user: olr tags: gcerw
Changes

Modified gc_core/py/lang_core/gc_engine.py from [95762aa8e3] to [db20a56eec].

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
47
48
49
50
51
52
53

54
55
56
57
58
59
60







-







# Modules
_rules = None                               # module gc_rules
_rules_graph = None                         # module gc_rules_graph

# Tools
_oSpellChecker = None
_oTokenizer = None
_oLexicographer = None

# Data
_aIgnoredRules = set()

# Writer underlining style
_dOptionsColors = None
_bMulticolor = True
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
81
82
83
84
85
86
87









88
89
90
91
92
93
94







-
-
-
-
-
-
-
-
-








#### Tools

def getSpellChecker ():
    "return the spellchecker object"
    return _oSpellChecker


def getLexicographer ():
    "load and return the lexicographer"
    global _oLexicographer
    if _oLexicographer is None:
        lxg = importlib.import_module(".lexicographe", "grammalecte.${lang}")
        _oLexicographer = lxg.Lexicographe(_oSpellChecker)
    return _oLexicographer


#### Rules

def _getRules (bParagraph):
    try:
        if not bParagraph:
            return _rules.lSentenceRules