@@ -175,11 +175,11 @@ break; default: throw ValueError("# Error: unknown code: " + this.nCompressionMethod); } //console.log(this.getInfo()); - this.bAcronymValid = true; + this.bAcronymValid = false; this.bNumAtLastValid = false; } getInfo () { return ` Language: ${this.sLangName} Lang code: ${this.sLangCode} Dictionary name: ${this.sDicName}\n` + @@ -224,11 +224,11 @@ } if (sToken.includes("-")) { if (sToken.gl_count("-") > 4) { return true; } - return sToken.split("-").every(sWord => this.isValid(sWord)); + return sToken.split("-").every(sWord => this.isValid(sWord)); } if (sToken.includes(".") || sToken.includes("ยท")) { return true; } return false; @@ -482,11 +482,11 @@ } } } } } - } + } _morph1 (sWord) { // returns morphologies of sWord let iAddr = 0; for (let c of sWord) { @@ -504,11 +504,11 @@ while (!(nRawArc & this._lastArcMask)) { let iEndArcAddr = iAddr + this.nBytesArc; nRawArc = this._convBytesToInteger(this.byDic.slice(iAddr, iEndArcAddr)); let nArc = nRawArc & this._arcMask; if (nArc > this.nChar) { - // This value is not a char, this is a stemming code + // This value is not a char, this is a stemming code let sStem = ">" + this.funcStemming(sWord, this.lArcVal[nArc]); // Now , we go to the next node and retrieve all following arcs values, all of them are tags let iAddr2 = this._convBytesToInteger(this.byDic.slice(iEndArcAddr, iEndArcAddr+this.nBytesNodeAddress)); let nRawArc2 = 0; while (!(nRawArc2 & this._lastArcMask)) { @@ -543,11 +543,11 @@ while (!(nRawArc & this._lastArcMask)) { let iEndArcAddr = iAddr + this.nBytesArc; nRawArc = this._convBytesToInteger(this.byDic.slice(iAddr, iEndArcAddr)); let nArc = nRawArc & this._arcMask; if (nArc > this.nChar) { - // This value is not a char, this is a stemming code + // This value is not a char, this is a stemming code l.push(this.funcStemming(sWord, this.lArcVal[nArc])); } iAddr = iEndArcAddr + this.nBytesNodeAddress; } return l; @@ -559,11 +559,11 @@ // looks if nVal is an arc at the node at iAddr, if yes, returns address of next node else None while (true) { let iEndArcAddr = iAddr+this.nBytesArc; let nRawArc = this._convBytesToInteger(this.byDic.slice(iAddr, iEndArcAddr)); if (nVal == (nRawArc & this._arcMask)) { - // the value we are looking for + // the value we are looking for // we return the address of the next node return this._convBytesToInteger(this.byDic.slice(iEndArcAddr, iEndArcAddr+this.nBytesNodeAddress)); } else { // value not found