Differences From Artifact [f1a1c3c7ab]:
- File graphspell/ibdawg.py — part of check-in [90977551b1] at 2020-09-09 08:37:02 on branch trunk — [graphspell] getSuggestions: always sort first list found, assuming that list 1 and 2 might be empty (user: olr, size: 38907) [annotate] [blame] [check-ins using]
To Artifact [e07922ff50]:
- File graphspell/ibdawg.py — part of check-in [4fdd6a9337] at 2020-09-10 15:30:12 on branch trunk — [core][graphspell][fx][cli] new lexicographer (user: olr, size: 38951) [annotate] [blame] [check-ins using] [more...]
| ︙ | |||
297 298 299 300 301 302 303 304 305 306 307 308 309 310 | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | + + |
iAddr = self._lookupArcNode(self.dChar[c], iAddr)
if iAddr is None:
return False
return bool(int.from_bytes(self.byDic[iAddr:iAddr+self.nBytesArc], byteorder='big') & self._finalNodeMask)
def getMorph (self, sWord):
"retrieves morphologies list, different casing allowed"
if not sWord:
return []
sWord = st.spellingNormalization(sWord)
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
|
| ︙ |