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 @@ -913,28 +913,28 @@ self.lToken[i]["sNewValue"] = sValue def rewrite (self, bDebug=False): "rewrite the sentence, modify tokens, purge the token list" lNewToken = [] - nMergeUntil = -1 + nMergeUntil = 0 dTokenMerger = None for dToken in self.lToken: bKeepToken = True if "bImmune" in dToken: nErrorStart = self.nOffsetWithinParagraph + dToken["nStart"] if nErrorStart in self.dError: if bDebug: print("immunity -> error removed:", self.dError[nErrorStart]) del self.dError[nErrorStart] - if dToken["i"] <= nMergeUntil: - dTokenMerger["sValue"] += " " * (dToken["i"]["nStart"] - dTokenMerger["nEnd"]) + dToken["i"]["sValue"] - dTokenMerger["nEnd"] = dToken["i"]["nEnd"] + if nMergeUntil and dToken["i"] <= nMergeUntil: + dTokenMerger["sValue"] += " " * (dToken["nStart"] - dTokenMerger["nEnd"]) + dToken["sValue"] + dTokenMerger["nEnd"] = dToken["nEnd"] if bDebug: print("Merged token:", dTokenMerger["sValue"]) bKeepToken = False if "nMergeUntil" in dToken: - if not nMergeUntil: # this token should alerady been merged with a previous token + if dToken["i"] > nMergeUntil: # this token is not already merged with a previous token dTokenMerger = dToken if dToken["nMergeUntil"] > nMergeUntil: nMergeUntil = dToken["nMergeUntil"] del dToken["nMergeUntil"] elif "bToRemove" in dToken: Index: gc_lang/fr/rules.grx ================================================================== --- gc_lang/fr/rules.grx +++ gc_lang/fr/rules.grx @@ -4602,11 +4602,11 @@ @@@@ __p_notre_père_qui_es_au_cieux__ notre père qui [es|est] aux cieux <<- ~4>> ! - <<- ~3:0>> * + <<- ~3:0>> _ !! !! !!!! Formes verbales sans sujet