158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
+
-
-
-
-
-
+
+
+
+
+
|
if sOption == "@@@@":
# graph rules
oSentence.dError = dErrors
if not bParagraph and bSentenceChange:
oSentence.update(s, bDebug)
bSentenceChange = False
for sGraphName, sLineId in lRuleGroup:
if sGraphName not in dOptions or dOptions[sGraphName]:
if bDebug:
print("\n>>>> GRAPH:", sGraphName, sLineId)
bParagraphChange, s = oSentence.parse(dAllGraph[sGraphName], dPriority, sCountry, dOptions, bShowRuleId, bDebug, bContext)
dErrors.update(oSentence.dError)
dTokenPos = oSentence.dTokenPos
if bDebug:
print("\n>>>> GRAPH:", sGraphName, sLineId)
bParagraphChange, s = oSentence.parse(dAllGraph[sGraphName], dPriority, sCountry, dOptions, bShowRuleId, bDebug, bContext)
dErrors.update(oSentence.dError)
dTokenPos = oSentence.dTokenPos
elif not sOption or dOptions.get(sOption, False):
# regex rules
for zRegex, bUppercase, sLineId, sRuleId, nPriority, lActions in lRuleGroup:
if sRuleId not in _aIgnoredRules:
for m in zRegex.finditer(s):
bCondMemo = None
for sFuncCond, cActionType, sWhat, *eAct in lActions:
|