Differences From Artifact [2f2c00b856]:
- File graphspell/ibdawg.py — part of check-in [0eaff45865] at 2018-05-03 11:33:54 on branch trunk — [graphspell][py][bug] fix words selection (user: olr, size: 37856) [annotate] [blame] [check-ins using]
To Artifact [a255097656]:
- File graphspell/ibdawg.py — part of check-in [e967615c1a] at 2018-05-04 16:09:02 on branch trunk — [graphspell][py][lo] remove trailing dot when asking for suggestions (useful for LibreOffice) (user: olr, size: 37917) [annotate] [blame] [check-ins using] [more...]
| ︙ | |||
280 281 282 283 284 285 286 287 288 289 290 291 292 293 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | + |
if sWord.isupper() and len(sWord) > 1:
l.extend(self.morph(sWord.capitalize()))
return l
#@timethis
def suggest (self, sWord, nSuggLimit=10):
"returns a set of suggestions for <sWord>"
sWord = sWord.rstrip(".") # useful for LibreOffice
sWord = cp.spellingNormalization(sWord)
sPfx, sWord, sSfx = cp.cut(sWord)
nMaxSwitch = max(len(sWord) // 3, 1)
nMaxDel = len(sWord) // 5
nMaxHardRepl = max((len(sWord) - 5) // 4, 1)
nMaxJump = max(len(sWord) // 4, 1)
oSuggResult = SuggResult(sWord)
|
| ︙ |