| 
384
385
386
387
388
389
390
391
392
393
394
395
396
397
 | 
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
 | 
+
+
+
+
+
+
+
 | 
def g_add_morph (dToken, lNewMorph):
    "Disambiguation: add a morphology to a token"
    lMorph = dToken["lMorph"]  if "lMorph" in dToken  else _oSpellChecker.getMorph(dToken["sValue"])
    lMorph.extend(lNewMorph)
    dToken["lMorph"] = lMorph
    return True
def g_rewrite (dToken, sToReplace, sReplace):
    "Disambiguation: rewrite morphologies"
    lMorph = dToken["lMorph"]  if "lMorph" in dToken  else _oSpellChecker.getMorph(dToken["sValue"])
    dToken["lMorph"] = [ sMorph.replace(sToReplace, sReplace)  for sMorph in lMorph ]
    return True
def g_define (dToken, lMorph):
    "Disambiguation: set morphologies of <dToken>, always return True"
    dToken["lMorph"] = lMorph
    #print("DA:", dToken["sValue"], lMorph)
    return True
 |