Grammalecte  Check-in [ad736fa52b]

Overview
Comment:[graphspell][py] drawPath() for spellchecker
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | graphspell | multid
Files: files | file ages | folders
SHA3-256: ad736fa52b94235781ff20d957d431a6ab2f7fda18209e16645edb2d9ee75ea7
User & Date: olr on 2018-02-13 16:05:06
Other Links: branch diff | manifest | tags
Context
2018-02-13
16:57
[graphspell][py][bug] ibdawg: fix dictionary of chars check-in: 5dc606a9bd user: olr tags: graphspell, multid
16:05
[graphspell][py] drawPath() for spellchecker check-in: ad736fa52b user: olr tags: graphspell, multid
15:57
[cli] suggest() in spellchecker is a generator check-in: 966babe645 user: olr tags: cli, multid
Changes

Modified graphspell/spellchecker.py from [781d3c301e] to [17be6ccea2].

109
110
111
112
113
114
115









    def select (self, sPattern=""):
        "generator: returns all entries which morphology fits <sPattern>"
        yield from self.oMainDic.select(sPattern)
        if self.oExtendedDic:
            yield from self.oExtendedDic.select(sPattern)
        if self.oPersonalDic:
            yield from self.oPersonalDic.select(sPattern)
















>
>
>
>
>
>
>
>
>
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
    def select (self, sPattern=""):
        "generator: returns all entries which morphology fits <sPattern>"
        yield from self.oMainDic.select(sPattern)
        if self.oExtendedDic:
            yield from self.oExtendedDic.select(sPattern)
        if self.oPersonalDic:
            yield from self.oPersonalDic.select(sPattern)

    def drawPath (self, sWord):
        self.oMainDic.drawPath(sWord)
        if self.oExtendedDic:
            print("-----")
            self.oExtendedDic.drawPath(sWord)
        if self.oPersonalDic:
            print("-----")
            self.oPersonalDic.drawPath(sWord)