Grammalecte  Check-in [15cc11e719]

Overview
Comment:[graphspell][js] dawg: fix bug about node identification
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | graphspell
Files: files | file ages | folders
SHA3-256: 15cc11e7190b875662b219269c305621d2a3f822608bb27a0688602af8e14b25
User & Date: olr on 2020-11-15 09:53:59
Other Links: manifest | tags
Context
2020-11-16
10:33
[graphspell][js] dawg: useless parameters check-in: 0369072caa user: olr tags: trunk, graphspell
2020-11-15
09:53
[graphspell][js] dawg: fix bug about node identification check-in: 15cc11e719 user: olr tags: trunk, graphspell
09:52
[fr] faux positif check-in: 3b96a2f847 user: olr tags: trunk, fr
Changes

Modified graphspell-js/dawg.js from [a107a75c0e] to [35cc08667a].

471
472
473
474
475
476
477
478

479
480
481
482
483
484
485
471
472
473
474
475
476
477

478
479
480
481
482
483
484
485







-
+







        this.final = false;
        this.arcs = new Map();  // key: arc value; value: a node
        this.addr = 0;          // address in the binary dictionary
    }

    __str__ () {
        // Caution! this function is used for hashing and comparison!
        let sFinalChar = (self.final) ? "1" : "0";
        let sFinalChar = (this.final) ? "1" : "0";
        let l = [sFinalChar];
        for (let [key, node] of this.arcs.entries()) {
            l.push(key.toString());
            l.push(node.i.toString());
        }
        return l.join("_");
    }