Overview
Comment: | [graphspell] suggestions: end of experiment -> aborted, too slow |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | graphspell |
Files: | files | file ages | folders |
SHA3-256: |
4cd155b03e401d2408c6d7e493b34c2d |
User & Date: | olr on 2020-05-28 15:20:32 |
Other Links: | manifest | tags |
Context
2020-05-28
| ||
17:28 | [graphspell][py] remove deprecated code check-in: 37ac74a3bb user: olr tags: trunk, graphspell | |
15:20 | [graphspell] suggestions: end of experiment -> aborted, too slow check-in: 4cd155b03e user: olr tags: trunk, graphspell | |
09:55 | [fr] ajustements check-in: f5058ae45d user: olr tags: trunk, fr | |
Changes
Modified graphspell-js/ibdawg.js from [9e7f2fda83] to [189561924c].
︙ | ︙ | |||
397 398 399 400 401 402 403 | this._suggest(oSuggResult, sRemain.slice(1), nMaxSwitch, nMaxDel, nMaxHardRepl, nMaxJump, nDist, nDeep+1, jAddr, sNewWord+cChar); } else if (!bAvoidLoop) { if (nMaxHardRepl && this.isNgramsOK(cChar+sRemain.slice(1,2))) { this._suggest(oSuggResult, sRemain.slice(1), nMaxSwitch, nMaxDel, nMaxHardRepl-1, nMaxJump, nDist+1, nDeep+1, jAddr, sNewWord+cChar, true); } if (nMaxJump) { | | | 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | this._suggest(oSuggResult, sRemain.slice(1), nMaxSwitch, nMaxDel, nMaxHardRepl, nMaxJump, nDist, nDeep+1, jAddr, sNewWord+cChar); } else if (!bAvoidLoop) { if (nMaxHardRepl && this.isNgramsOK(cChar+sRemain.slice(1,2))) { this._suggest(oSuggResult, sRemain.slice(1), nMaxSwitch, nMaxDel, nMaxHardRepl-1, nMaxJump, nDist+1, nDeep+1, jAddr, sNewWord+cChar, true); } if (nMaxJump) { this._suggest(oSuggResult, sRemain, nMaxSwitch, nMaxDel, nMaxHardRepl, nMaxJump-1, nDist+1, nDeep+1, jAddr, sNewWord+cChar, true); // true for avoiding loop? } } } if (!bAvoidLoop) { // avoid infinite loop if (sRemain.length > 1) { if (cCurrent == sRemain.slice(1, 2)) { // same char, we remove 1 char without adding 1 to <sNewWord> |
︙ | ︙ |
Modified graphspell/ibdawg.py from [bba1a1f0a5] to [b622d0fc42].
︙ | ︙ | |||
350 351 352 353 354 355 356 | for cChar, jAddr in self._getCharArcs(iAddr): if cChar in cp.d1to1.get(cCurrent, cCurrent): self._suggest(oSuggResult, sRemain[1:], nMaxSwitch, nMaxDel, nMaxHardRepl, nMaxJump, nDist, nDeep+1, jAddr, sNewWord+cChar) elif not bAvoidLoop: if nMaxHardRepl and self.isNgramsOK(cChar+sRemain[1:2]): self._suggest(oSuggResult, sRemain[1:], nMaxSwitch, nMaxDel, nMaxHardRepl-1, nMaxJump, nDist+1, nDeep+1, jAddr, sNewWord+cChar, True) if nMaxJump: | | | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | for cChar, jAddr in self._getCharArcs(iAddr): if cChar in cp.d1to1.get(cCurrent, cCurrent): self._suggest(oSuggResult, sRemain[1:], nMaxSwitch, nMaxDel, nMaxHardRepl, nMaxJump, nDist, nDeep+1, jAddr, sNewWord+cChar) elif not bAvoidLoop: if nMaxHardRepl and self.isNgramsOK(cChar+sRemain[1:2]): self._suggest(oSuggResult, sRemain[1:], nMaxSwitch, nMaxDel, nMaxHardRepl-1, nMaxJump, nDist+1, nDeep+1, jAddr, sNewWord+cChar, True) if nMaxJump: self._suggest(oSuggResult, sRemain, nMaxSwitch, nMaxDel, nMaxHardRepl, nMaxJump-1, nDist+1, nDeep+1, jAddr, sNewWord+cChar, True) # True for avoiding loop? if not bAvoidLoop: # avoid infinite loop if len(sRemain) > 1: if cCurrent == sRemain[1:2]: # same char, we remove 1 char without adding 1 to <sNewWord> self._suggest(oSuggResult, sRemain[1:], nMaxSwitch, nMaxDel, nMaxHardRepl, nMaxJump, nDist, nDeep+1, iAddr, sNewWord) else: # switching chars |
︙ | ︙ |