Grammalecte  Diff

Differences From Artifact [e748c8288e]:

To Artifact [81ed21aafb]:


1
2
3
4


5
6



7
8
9
10
11
12
13
1
2
3
4
5
6


7
8
9
10
11
12
13
14
15
16




+
+
-
-
+
+
+







//// IBDAWG

"use strict";


if (typeof(exports) !== 'undefined') {
const st = require("resource://grammalecte/str_transform.js");
const helpers = require("resource://grammalecte/helpers.js");
    var str_transform = require("resource://grammalecte/str_transform.js");
    var helpers = require("resource://grammalecte/helpers.js");
}


// String
// Don’t remove. Necessary in TB.
${string}


37
38
39
40
41
42
43
44

45
46

47
48

49
50
51
52
53
54
55
40
41
42
43
44
45
46

47
48

49
50

51
52
53
54
55
56
57
58







-
+

-
+

-
+







            throw RangeError("# Error. Unknown dictionary version: " + this.nVersion);
        }

        this.dChar = helpers.objectToMap(this.dChar);
        //this.byDic = new Uint8Array(this.byDic);  // not quicker, even slower

        if (this.cStemming == "S") {
            this.funcStemming = st.getStemFromSuffixCode;
            this.funcStemming = str_transform.getStemFromSuffixCode;
        } else if (this.cStemming == "A") {
            this.funcStemming = st.getStemFromAffixCode;
            this.funcStemming = str_transform.getStemFromAffixCode;
        } else {
            this.funcStemming = st.noStemming;
            this.funcStemming = str_transform.noStemming;
        }

        // Configuring DAWG functions according to nVersion
        switch (this.nVersion) {
            case 1:
                this.morph = this._morph1;
                this.stem = this._stem1;