Differences From Artifact [01e0cc9f3f]:
- File graphspell/ibdawg.py — part of check-in [c88bf29423] at 2020-08-31 10:44:53 on branch salxg — [graphspell] ibdawg: fix lexicographer import (user: olr, size: 38941) [annotate] [blame] [check-ins using] [more...]
To Artifact [2c4cbe4f53]:
- File graphspell/ibdawg.py — part of check-in [e0ce6b10d7] at 2020-09-10 12:17:59 on branch salxg — [core][graphspell][fx][cli] lexicographer: update (user: olr, size: 38985) [annotate] [blame] [check-ins using]
| ︙ | |||
296 297 298 299 300 301 302 303 304 305 306 307 308 309 | 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | + + |
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
|
| ︙ |