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 @@ -1020,12 +1020,16 @@ return any(zPattern.search(sMorph) for sMorph in lMorph) def g_analyse (dToken, sPattern, sNegPattern="", nLeft=None, nRight=None, bMemorizeMorph=True): "analyse a token, return True if not in morphologies and in morphologies (disambiguation off)" - sValue = dToken["sValue"] if nLeft is not None else dToken["sValue"][slice(nLeft, nRight)] - lMorph = _oSpellChecker.getMorph(sValue) + if nLeft is not None: + lMorph = _oSpellChecker.getMorph(dToken["sValue"][slice(nLeft, nRight)]) + if bMemorizeMorph: + dToken["lMorph"] = lMorph + else: + lMorph = _oSpellChecker.getMorph(dToken["sValue"]) if not lMorph: return False # check negative condition if sNegPattern: if sNegPattern == "*":