Differences From Artifact [34d4e4f42a]:
- File graphspell/ibdawg.py — part of check-in [cbbb58a487] at 2020-03-27 12:45:19 on branch trunk — [graphspell] suggestion: prevents splitting trailing numbers if not following an alpha character (user: olr, size: 39838) [annotate] [blame] [check-ins using]
To Artifact [3cc04ec719]:
- File graphspell/ibdawg.py — part of check-in [a00365529c] at 2020-04-14 15:26:59 on branch trunk — [graphspell] add 1 to distance between word and suggestion if word is split (user: olr, size: 39902) [annotate] [blame] [check-ins using] [more...]
| ︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | + + |
#logging.info((nDeep * " ") + "__" + sSugg + "__")
if sSugg in self.aAllSugg:
return
self.aAllSugg.add(sSugg)
if sSugg not in self.aSugg:
nDist = st.distanceDamerauLevenshtein(self.sSimplifiedWord, cp.simplifyWord(sSugg))
if nDist <= self.nDistLimit:
if " " in sSugg:
nDist += 1
if nDist not in self.dSugg:
self.dSugg[nDist] = []
self.dSugg[nDist].append(sSugg)
self.aSugg.add(sSugg)
if nDist < self.nMinDist:
self.nMinDist = nDist
self.nDistLimit = min(self.nDistLimit, self.nMinDist+1)
|
| ︙ |