Overview
Comment: | [graphspell][py][lo] remove trailing dot when asking for suggestions (useful for LibreOffice) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | lo | graphspell |
Files: | files | file ages | folders |
SHA3-256: |
e967615c1a917bcae8446183a76aec49 |
User & Date: | olr on 2018-05-04 16:09:02 |
Other Links: | manifest | tags |
Context
2018-05-04
| ||
16:18 | v0.6.5 (bad commit) check-in: aadffe77de user: olr tags: trunk | |
16:09 | [graphspell][py][lo] remove trailing dot when asking for suggestions (useful for LibreOffice) check-in: e967615c1a user: olr tags: trunk, lo, graphspell | |
15:11 | [lo][fr] main dictionary selection: classic / reform / all variants check-in: 711e61cc23 user: olr tags: trunk, fr, lo | |
Changes
Modified graphspell/ibdawg.py from [2f2c00b856] to [a255097656].
︙ | ︙ | |||
280 281 282 283 284 285 286 287 288 289 290 291 292 293 | 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 = 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) | > | 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) |
︙ | ︙ |