Grammalecte  Check-in [9300a9349a]

Overview
Comment:[core][js] remove debug function
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core | webext3
Files: files | file ages | folders
SHA3-256: 9300a9349a2d6287a1ec3d267c306989823e9e9f064c661f837444f7b8d175e5
User & Date: olr on 2017-10-13 13:30:51
Other Links: branch diff | manifest | tags
Context
2017-10-13
13:43
[fx] WebExt: fix commands for selected text check-in: 2eb8d827d0 user: olr tags: fx, webext3
13:30
[core][js] remove debug function check-in: 9300a9349a user: olr tags: core, webext3
13:27
[fx] WebExt: clear registered node when closing panel check-in: e23d926562 user: olr tags: fx, webext3
Changes

Modified gc_core/js/ibdawg.js from [cbe1b04772] to [f4fdb2bfbb].

212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
212
213
214
215
216
217
218

219
220
221

222
223
224
225
226
227
228







-



-







        dDistTemp.clear();
        return aSugg;
    }

    _suggest (sRemain, nMaxDel=0, nDeep=0, iAddr=0, sNewWord="", bAvoidLoop=false) {
        // returns a set of suggestions
        // recursive function
        //show(nDeep, sNewWord + ":" + sRemain)
        let aSugg = new Set();
        if (sRemain == "") {
            if (this._convBytesToInteger(this.byDic.slice(iAddr, iAddr+this.nBytesArc)) & this._finalNodeMask) {
                //show(nDeep, "___" + sNewWord + "___");
                aSugg.add(sNewWord);
            }
            for (let sTail of this._getTails(iAddr)) {
                aSugg.add(sNewWord+sTail);
            }
            return aSugg;
        }
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
294
295
296
297
298
299
300

301
302
303
304
305
306

307
308
309
310
311
312
313







-






-







        return aTails;
    }

    _suggestWithCrushedUselessChars (sWord, nDeep=0, iAddr=0, sNewWord="", bAvoidLoop=false) {
        let aSugg = new Set();
        if (sWord.length == 0) {
            if (this._convBytesToInteger(this.byDic.slice(iAddr, iAddr+this.nBytesArc)) & this._finalNodeMask) {
                show(nDeep, "!!! " + sNewWord + " !!!");
                aSugg.add(sNewWord);
            }
            return aSugg;
        }
        let cCurrent = sWord.slice(0, 1);
        for (let [cChar, jAddr] of this._getSimilarArcsAndCrushedChars(cCurrent, iAddr)) {
            show(nDeep, cChar);
            aSugg.gl_update(this._suggestWithCrushedUselessChars(sWord.slice(1), nDeep+1, jAddr, sNewWord+cChar));
        }
        return aSugg;
    }

    * _getSimilarArcsAndCrushedChars (cChar, iAddr) {
        // generator: yield similar char of <cChar> and address of the following node