Grammalecte  Check-in [b0efed0687]

Overview
Comment:[graphspell][py][bug] wrong variable name
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | graphspell
Files: files | file ages | folders
SHA3-256: b0efed068721a4c56425570ce65b5efe80cda7b4e1dc71e81c0dac4f0b8d9f1e
User & Date: olr on 2018-04-20 10:50:34
Other Links: manifest | tags
Context
2018-04-20
19:00
[fr] pt: sans vergogne check-in: 4735aa2358 user: olr tags: trunk, fr
10:50
[graphspell][py][bug] wrong variable name check-in: b0efed0687 user: olr tags: trunk, graphspell
06:32
[graphspell] token valid if begins with a digit or if contains a <·> check-in: 08e1343285 user: olr tags: trunk, graphspell
Changes

Modified graphspell/ibdawg.py from [61d7128b52] to [dcb23698b6].

228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
        sToken = cp.spellingNormalization(sToken)
        if self.isValid(sToken):
            return True
        if "-" in sToken:
            if sToken.count("-") > 4:
                return True
            return all(self.isValid(sWord)  for sWord in sToken.split("-"))
        if "·" in sWord:
            return True
        return False

    def isValid (self, sWord):
        "checks if <sWord> is valid (different casing tested if the first letter is a capital)"
        if not sWord:
            return None







|







228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
        sToken = cp.spellingNormalization(sToken)
        if self.isValid(sToken):
            return True
        if "-" in sToken:
            if sToken.count("-") > 4:
                return True
            return all(self.isValid(sWord)  for sWord in sToken.split("-"))
        if "·" in sToken:
            return True
        return False

    def isValid (self, sWord):
        "checks if <sWord> is valid (different casing tested if the first letter is a capital)"
        if not sWord:
            return None