Index: compile_rules_graph.py ================================================================== --- compile_rules_graph.py +++ compile_rules_graph.py @@ -45,24 +45,24 @@ if sCode[0:1] == "=": sCode = sCode[1:] sCode = sCode.replace("__also__", "bCondMemo") sCode = sCode.replace("__else__", "not bCondMemo") sCode = sCode.replace("sContext", "_sAppContext") - sCode = re.sub(r"(morph|morphVC|analyse|value|displayInfo)[(]\\(\d+)", 'g_\\1(lToken[nTokenOffset+\\2]', sCode) - sCode = re.sub(r"(morph|morphVC|analyse|value|displayInfo)[(]\\-(\d+)", 'g_\\1(lToken[nLastToken-\\2+1]', sCode) + sCode = re.sub(r"(morph|morphVC|analyse|value|tag|displayInfo)[(]\\(\d+)", 'g_\\1(lToken[nTokenOffset+\\2]', sCode) + sCode = re.sub(r"(morph|morphVC|analyse|value|tag|displayInfo)[(]\\-(\d+)", 'g_\\1(lToken[nLastToken-\\2+1]', sCode) sCode = re.sub(r"(select|exclude|define|define_from)[(][\\](\d+)", 'g_\\1(lToken[nTokenOffset+\\2]', sCode) sCode = re.sub(r"(select|exclude|define|define_from)[(][\\]-(\d+)", 'g_\\1(lToken[nLastToken-\\2+1]', sCode) sCode = re.sub(r"(tag_before|tag_after)[(][\\](\d+)", 'g_\\1(lToken[nTokenOffset+\\2], dTags', sCode) sCode = re.sub(r"(tag_before|tag_after)[(][\\]-(\d+)", 'g_\\1(lToken[nLastToken-\\2+1], dTags', sCode) sCode = re.sub(r"space_after[(][\\](\d+)", 'g_space_between_tokens(lToken[nTokenOffset+\\1], lToken[nTokenOffset+\\1+1]', sCode) sCode = re.sub(r"space_after[(][\\]-(\d+)", 'g_space_between_tokens(lToken[nLastToken-\\1+1], lToken[nLastToken-\\1+2]', sCode) sCode = re.sub(r"analyse_with_next[(][\\](\d+)", 'g_merged_analyse(lToken[nTokenOffset+\\1], lToken[nTokenOffset+\\1+1]', sCode) sCode = re.sub(r"analyse_with_next[(][\\]-(\d+)", 'g_merged_analyse(lToken[nLastToken-\\1+1], lToken[nLastToken-\\1+2]', sCode) - sCode = re.sub(r"(morph|analyse|value)\(>1", 'g_\\1(lToken[nLastToken+1]', sCode) # next token - sCode = re.sub(r"(morph|analyse|value)\(<1", 'g_\\1(lToken[nTokenOffset]', sCode) # previous token - sCode = re.sub(r"(morph|analyse|value)\(>(\d+)", 'g_\\1(g_token(lToken, nLastToken+\\2)', sCode) # next token - sCode = re.sub(r"(morph|analyse|value)\(<(\d+)", 'g_\\1(g_token(lToken, nTokenOffset+1-\\2)', sCode) # previous token + sCode = re.sub(r"(morph|analyse|tag|value)\(>1", 'g_\\1(lToken[nLastToken+1]', sCode) # next token + sCode = re.sub(r"(morph|analyse|tag|value)\(<1", 'g_\\1(lToken[nTokenOffset]', sCode) # previous token + sCode = re.sub(r"(morph|analyse|tag|value)\(>(\d+)", 'g_\\1(g_token(lToken, nLastToken+\\2)', sCode) # next token + sCode = re.sub(r"(morph|analyse|tag|value)\(<(\d+)", 'g_\\1(g_token(lToken, nTokenOffset+1-\\2)', sCode) # previous token sCode = re.sub(r"\bspell *[(]", '_oSpellChecker.isValid(', sCode) sCode = re.sub(r"\bbefore\(\s*", 'look(sSentence[:lToken[1+nTokenOffset]["nStart"]], ', sCode) # before(sCode) sCode = re.sub(r"\bafter\(\s*", 'look(sSentence[lToken[nLastToken]["nEnd"]:], ', sCode) # after(sCode) sCode = re.sub(r"\bbefore0\(\s*", 'look(sSentence0[:lToken[1+nTokenOffset]["nStart"]], ', sCode) # before0(sCode) sCode = re.sub(r"\bafter0\(\s*", 'look(sSentence[lToken[nLastToken]["nEnd"]:], ', sCode) # after0(sCode) 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 @@ -1119,11 +1119,11 @@ return True return False def g_tag (dToken, sTag): - return "tags" in dToken and sTag in dTags["tags"] + return "tags" in dToken and sTag in dToken["tags"] def g_space_between_tokens (dToken1, dToken2, nMin, nMax=None): nSpace = dToken2["nStart"] - dToken1["nEnd"] if nSpace < nMin: Index: gc_lang/fr/rules.grx ================================================================== --- gc_lang/fr/rules.grx +++ gc_lang/fr/rules.grx @@ -15589,10 +15589,16 @@ [|,] [ne|n’] @:Y [|,] @:Y <<- /2>> suj_vinfi +__se_douter__ + [me|te|se] >douter [que|qu’] + nous nous >douter [que|qu’] + vous vous >douter [que|qu’] + <<- /-1>> no_subj + @@@@ @@@@ @@@@ @@@@ @@ -16508,11 +16514,12 @@ [>permettre|>falloir|>vouloir|>ordonner|>exiger|>désirer|>préférer|>suffire] [que|qu’] @:(?:Os|M) @:I¬:[GYS] [afin|avant|pour|quoi|sans] [que|qu’] @:(?:Os|M) @:I¬:[GYS] <<- /vmode/ -4>> =suggVerbMode(\4, ":S", \3) # Après “\1 que”, ce verbe devrait être au subjonctif. >douter [que|qu’] @:(?:Os|M) @:I¬:(?:[GYSK]|If) - <<- /vmode/ morph(\1, ":V", ":N") -4>> =suggVerbMode(\4, ":S", \3) # Après “\1 que”, ce verbe devrait être au subjonctif. + <<- /vmode/ not tag(\2, "no_subj") and morph(\1, ":V", ":N") + -4>> =suggVerbMode(\4, ":S", \3) # Après “\1 que”, ce verbe devrait être au subjonctif. il est possible [que|qu’] @:(?:Os|M) @:I¬:[GYS] <<- /vmode/ -6>> =suggVerbMode(\6, ":S", \5) # Après “\1 \2 \3”, ce verbe devrait être au subjonctif. TEST: Il suffit qu’il {{court}} plus