Index: gc_core/py/lang_core/gc_engine.py ================================================================== --- gc_core/py/lang_core/gc_engine.py +++ gc_core/py/lang_core/gc_engine.py @@ -591,11 +591,10 @@ self.lToken = list(_oTokenizer.genTokens(sSentence, True)) self.dTokenPos = { dToken["nStart"]: dToken for dToken in self.lToken } self.dTags = {} self.createError = self._createWriterError if _bWriterError else self._createDictError - def update (self, sSentence): self.sSentence = sSentence self.lToken = list(_oTokenizer.genTokens(sSentence, True)) def _getNextMatchingNodes (self, dToken, dGraph, dNode, bDebug=False): @@ -673,10 +672,11 @@ print(" MATCH: @" + sRegex) yield dGraph[dNode[""][sRegex]] # meta arc (for token type) if "" in dNode: for sMeta in dNode[""]: + # not regex here, we just search if exists within if sMeta == "*": if bDebug: print(" MATCH: *" + sMeta) yield dGraph[dNode[""]["*"]] elif "¬" in sMeta: @@ -732,11 +732,11 @@ print(dRule[sRuleId]) sOption, sFuncCond, cActionType, sWhat, *eAct = dRule[sRuleId] # Suggestion [ option, condition, "-", replacement/suggestion/action, iTokenStart, iTokenEnd, nPriority, message, URL ] # TextProcessor [ option, condition, "~", replacement/suggestion/action, iTokenStart, iTokenEnd ] # Disambiguator [ option, condition, "=", replacement/suggestion/action ] - # Tag [ option, condition, "/", replacement/suggestion/action, iTokenStart, iTokenEnd ] + # Sentence Tag [ option, condition, "/", replacement/suggestion/action, iTokenStart, iTokenEnd ] # Test [ option, condition, ">", "" ] if not sOption or dOptions.get(sOption, False): bCondMemo = not sFuncCond or globals()[sFuncCond](self.lToken, nTokenOffset, nLastToken, sCountry, bCondMemo, self.dTags, self.sSentence, self.sSentence0) if bCondMemo: if cActionType == "-":