Grammalecte  Check-in [9afc3d6d2b]

Overview
Comment:[graphspell] comment timethis
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | graphspell
Files: files | file ages | folders
SHA3-256: 9afc3d6d2be7c060a24f1e39c3415c85ec636817a4a936d220ef331217a2d167
User & Date: olr on 2018-04-18 12:58:23
Other Links: manifest | tags
Context
2018-04-18
14:00
v0.6.4 check-in: bfbaeab39d user: olr tags: trunk, v0.6.4
12:58
[graphspell] comment timethis check-in: 9afc3d6d2b user: olr tags: trunk, graphspell
12:39
[graphspell] better multicasing handling check-in: fd910bc078 user: olr tags: trunk, graphspell
Changes

Modified graphspell/ibdawg.py from [14a561393f] to [81e3b2e579].

274
275
276
277
278
279
280
281

282
283
284
285
286
287
288
274
275
276
277
278
279
280

281
282
283
284
285
286
287
288







-
+







        l = self.morph(sWord)
        if sWord[0:1].isupper():
            l.extend(self.morph(sWord.lower()))
            if sWord.isupper() and len(sWord) > 1:
                l.extend(self.morph(sWord.capitalize()))
        return l

    @timethis
    #@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)