Index: gc_core/py/ibdawg.py ================================================================== --- gc_core/py/ibdawg.py +++ gc_core/py/ibdawg.py @@ -188,12 +188,14 @@ "returns a set of suggestions for " # first, we check for similar words #return self._suggestWithCrushedUselessChars(cp.clearWord(sWord)) aSugg = self._suggest(sWord) if not aSugg: + print("try without first char") aSugg.update(self._suggest(sWord[1:])) if not aSugg: + print("crush useless chars") aSugg.update(self._suggestWithCrushedUselessChars(cp.clearWord(sWord))) return sorted(aSugg, key=lambda sSugg: cp.distanceBetweenWords(sWord, sSugg)) def _suggest (self, sRemain, nDeep=0, iAddr=0, sNewWord="", bAvoidLoop=False): "returns a set of suggestions" @@ -276,10 +278,11 @@ if self.dCharVal.get(nVal, None) in cp.aVovels: yield (self.dCharVal[nVal], jAddr) yield from self._getSimilarArcs(cChar, iAddr) def drawPath (self, sWord, iAddr=0): + "show the path taken by in the graph" cChar = sWord[0:1] if sWord else " " iPos = -1 n = 0 print(cChar + ": ", end="") for nVal, jAddr in self._getArcs(iAddr):