Differences From Artifact [f523996e8f]:
- File graphspell/ibdawg.py — part of check-in [8333a8bf1b] at 2018-04-01 08:16:11 on branch multid — [graphspell] new header <grammalecte-fsa> for binary dictionaries (user: olr, size: 37269) [annotate] [blame] [check-ins using] [more...]
To Artifact [9dd4726d13]:
- File graphspell/ibdawg.py — part of check-in [291494dd43] at 2018-04-04 15:10:54 on branch trunk — [graphspell] ibdawg: isValid -> True if word is digit (user: olr, size: 37321) [annotate] [blame] [check-ins using]
| ︙ | |||
233 234 235 236 237 238 239 240 241 242 243 244 245 246 | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | + + |
def isValid (self, sWord):
"checks if <sWord> is valid (different casing tested if the first letter is a capital)"
if not sWord:
return None
if "’" in sWord: # ugly hack
sWord = sWord.replace("’", "'")
if self.lookup(sWord):
return True
if sWord.isdigit():
return True
if sWord[0:1].isupper():
if len(sWord) > 1:
if sWord.istitle():
return self.lookup(sWord.lower())
if sWord.isupper():
if self.bOptNumSigle:
|
| ︙ |