Grammalecte  Check-in [4d2953e2f6]

Overview
Comment:[graphspell][js] useless comments
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | graphspell
Files: files | file ages | folders
SHA3-256: 4d2953e2f6aac1f6992806b221f68725cb870af29fe462f8b3731a85a68a3940
User & Date: olr on 2018-10-09 11:07:19
Other Links: manifest | tags
Context
2018-10-10
09:19
Some change to javascript to work in node check-in: a3687f4fd3 user: IllusionPerdu tags: graphspell, njs, nodejs
09:03
[fr] test faux positif check-in: bdcc97b45b user: olr tags: trunk, fr
2018-10-09
11:07
[graphspell][js] useless comments check-in: 4d2953e2f6 user: olr tags: trunk, graphspell
08:54
[graphspell][js] performance tests check-in: 14ed269c7c user: olr tags: trunk, graphspell
Changes

Modified graphspell-js/ibdawg.js from [c77827bdfd] to [26e5034903].

136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
136
137
138
139
140
141
142

143
144
145
146
147
148
149







-







        if (!(this.nCompressionMethod == 1 || this.nCompressionMethod == 2 || this.nCompressionMethod == 3)) {
            throw RangeError("# Error. Unknown dictionary compression method: " + this.nCompressionMethod);
        }
        // <dChar> to get the value of an arc, <dCharVal> to get the char of an arc with its value
        this.dChar = helpers.objectToMap(this.dChar);
        this.dCharVal = this.dChar.gl_reverse();
        this.a2grams = new Set(this.l2grams);
        //console.log(this.l2grams);

        if (this.cStemming == "S") {
            this.funcStemming = str_transform.changeWordWithSuffixCode;
        } else if (this.cStemming == "A") {
            this.funcStemming = str_transform.changeWordWithAffixCode;
        } else {
            this.funcStemming = str_transform.noStemming;
404
405
406
407
408
409
410
411

412
413
414
415
416
417
418
419
403
404
405
406
407
408
409

410

411
412
413
414
415
416
417







-
+
-







        }
    }

    isNgramsOK (sChars) {
        if (sChars.length != 2) {
            return true;
        }
        return this.a2grams.has(sChars); //slower than indexOf in an Array?
        return this.a2grams.has(sChars);
        //return this.l2grams.indexOf(sChars) !== false;
    }

    * _getCharArcs (iAddr) {
        // generator: yield all chars and addresses from node at address <iAddr>
        for (let [nVal, jAddr] of this._getArcs(iAddr)) {
            if (nVal <= this.nChar) {
                yield [this.dCharVal.get(nVal), jAddr];