Overview
Comment: | [core] ibdawg: code clarification |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | core | spellsugg |
Files: | files | file ages | folders |
SHA3-256: |
f7c9ad046c8c4f56ea9094109e890431 |
User & Date: | olr on 2017-11-08 08:52:37 |
Other Links: | branch diff | manifest | tags |
Context
2017-11-08
| ||
13:32 | [core][js] ibdawg: suggest (adaptation from Python code) check-in: 1ef26c175b user: olr tags: core, spellsugg | |
08:52 | [core] ibdawg: code clarification check-in: f7c9ad046c user: olr tags: core, spellsugg | |
08:26 | [core] ibdawg: suggest > avoid useless recursivity check-in: 7d3b4993ee user: olr tags: core, spellsugg | |
Changes
Modified cli.py from [a5ccfdebb3] to [68793c6981].
︙ | |||
206 207 208 209 210 211 212 | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | - + | echo("* " + sWord) for sMorph in oDict.getMorph(sWord): echo(" {:<32} {}".format(sMorph, oLexGraphe.formatTags(sMorph))) elif sText.startswith("!"): for sWord in sText[1:].strip().split(): if sWord: echo(" | ".join(oDict.suggest(sWord))) |
︙ |
Modified gc_core/py/ibdawg.py from [0a0b7a93a2] to [0927c91f92].
︙ | |||
293 294 295 296 297 298 299 | 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | - + - - - - + + | # Phonetic replacements for sRepl in cp.d1toX.get(cCurrent, ()): self._suggest(oSuggResult, sRepl + sRemain[1:], nMaxSwitch, nMaxDel, nMaxHardRepl, nDeep+1, iAddr, sNewWord, cCurrent+">"+sRepl, True) for sRepl in cp.d2toX.get(sRemain[0:2], ()): self._suggest(oSuggResult, sRepl + sRemain[2:], nMaxSwitch, nMaxDel, nMaxHardRepl, nDeep+1, iAddr, sNewWord, sRemain[0:2]+">"+sRepl, True) # Hard replacements if nDeep > 3 and nMaxHardRepl: |
︙ |