47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# 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
|
<
|
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
# 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
|
#### 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
|
<
<
<
<
<
<
<
<
<
|
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
#### Tools
def getSpellChecker ():
"return the spellchecker object"
return _oSpellChecker
#### Rules
def _getRules (bParagraph):
try:
if not bParagraph:
return _rules.lSentenceRules
|