Index: graphspell-js/dawg.js ================================================================== --- graphspell-js/dawg.js +++ graphspell-js/dawg.js @@ -383,15 +383,11 @@ "nArc": this.nArc, "nAff": this.nAff, "cStemming": this.cStemming, "nTag": this.nTag, "dChar": helpers.mapToObject(this.dChar), - "_arcMask": this._arcMask, - "_finalNodeMask": this._finalNodeMask, - "_lastArcMask": this._lastArcMask, - "_addrBitMask": this._addrBitMask, - "nBytesOffset": this.nBytesOffset + "nBytesOffset": 1 }; return oJSON; } } Index: graphspell-js/ibdawg.js ================================================================== --- graphspell-js/ibdawg.js +++ graphspell-js/ibdawg.js @@ -135,10 +135,15 @@ } else if (this.cStemming == "A") { this.funcStemming = str_transform.changeWordWithAffixCode; } else { this.funcStemming = str_transform.noStemming; } + + this._arcMask = (2 ** ((this.nBytesArc * 8) - 3)) - 1; + this._finalNodeMask = 1 << ((this.nBytesArc * 8) - 1); + this._lastArcMask = 1 << ((this.nBytesArc * 8) - 2); + // Configuring DAWG functions according to nVersion switch (this.nVersion) { case 1: this.morph = this._morph1; Index: graphspell/ibdawg.py ================================================================== --- graphspell/ibdawg.py +++ graphspell/ibdawg.py @@ -184,14 +184,10 @@ "nArc": self.nArc, "nAff": self.nAff, "cStemming": self.cStemming, "nTag": self.nTag, "dChar": self.dChar, - "_arcMask": self._arcMask, - "_finalNodeMask": self._finalNodeMask, - "_lastArcMask": self._lastArcMask, - "_addrBitMask": self._addrBitMask, "nBytesOffset": self.nBytesOffset }, ensure_ascii=False)) if bInJSModule: hDst.write(";\n\nexports.dictionary = dictionary;\n")