Index: gc_core/js/lang_core/gc_engine.js ================================================================== --- gc_core/js/lang_core/gc_engine.js +++ gc_core/js/lang_core/gc_engine.js @@ -179,11 +179,11 @@ this.dError = new Map(); this.dErrorPriority = new Map(); // Key = position; value = priority } asString () { - let s = "===== TEXT =====\n" + let s = "===== TEXT =====\n"; s += "sentence: " + this.sSentence0 + "\n"; s += "now: " + this.sSentence + "\n"; for (let dToken of this.lToken) { s += `#${dToken["i"]}\t${dToken["nStart"]}:${dToken["nEnd"]}\t${dToken["sValue"]}\t${dToken["sType"]}`; if (dToken.hasOwnProperty("lMorph")) { Index: gc_core/js/lang_core/gc_options.js ================================================================== --- gc_core/js/lang_core/gc_options.js +++ gc_core/js/lang_core/gc_options.js @@ -23,11 +23,11 @@ } return dColor; } catch (e) { console.error(e); - return {} + return {}; } }, lStructOpt: ${lStructOpt}, @@ -40,17 +40,17 @@ dColorType: ${dColorType}, dOptColor: ${dOptColor}, dOptLabel: ${dOptLabel} -} +}; if (typeof(exports) !== 'undefined') { - exports.getOptions = gc_options.getOptions; + exports.getOptions = gc_options.getOptions; exports.getOptionsColors = gc_options.getOptionsColors; - exports.lStructOpt = gc_options.lStructOpt; + exports.lStructOpt = gc_options.lStructOpt; exports.dOpt = gc_options.dOpt; exports.dColorType = gc_options.dColorType; exports.dOptColor = gc_options.dOptColor; - exports.dOptLabel = gc_options.dOptLabel; + exports.dOptLabel = gc_options.dOptLabel; } Index: gc_core/js/lang_core/gc_rules_graph.js ================================================================== --- gc_core/js/lang_core/gc_rules_graph.js +++ gc_core/js/lang_core/gc_rules_graph.js @@ -9,11 +9,11 @@ var gc_rules_graph = { dAllGraph: ${rules_graphsJS}, dRule: ${rules_actionsJS} -} +}; if (typeof(exports) !== 'undefined') { exports.dAllGraph = gc_rules_graph.dAllGraph; exports.dRule = gc_rules_graph.dRule; Index: graphspell-js/dawg.js ================================================================== --- graphspell-js/dawg.js +++ graphspell-js/dawg.js @@ -98,11 +98,11 @@ let lTemp = []; for (let c of sFlex) { lTemp.push(dChar.get(c)); } lTemp.push(iAff+nChar); - lTemp.push(iTag+nChar+nAff) + lTemp.push(iTag+nChar+nAff); lWord.push(lTemp); } lEntry.length = 0; // clear the array // Dictionary of arc values occurrency, to sort arcs of each node @@ -428,11 +428,11 @@ }, reset: function () { this.nNextId = 0; } -} +}; class DawgNode { constructor () { @@ -542,11 +542,11 @@ let sHexVal = nVal.toString(16); // conversion to hexadecimal string //console.log(`value: ${nVal} in ${nByte} bytes`); if (sHexVal.length < (nByte*2)) { return "0".repeat((nByte*2) - sHexVal.length) + sHexVal; } else if (sHexVal.length == (nByte*2)) { - return sHexVal + return sHexVal; } else { throw "Conversion to byte string: value bigger than allowed."; } } } Index: graphspell-js/ibdawg.js ================================================================== --- graphspell-js/ibdawg.js +++ graphspell-js/ibdawg.js @@ -221,11 +221,11 @@ return oJSON; } isValidToken (sToken) { // checks if sToken is valid (if there is hyphens in sToken, sToken is split, each part is checked) - sToken = char_player.spellingNormalization(sToken) + sToken = char_player.spellingNormalization(sToken); if (this.isValid(sToken)) { return true; } if (sToken.includes("-")) { if (sToken.gl_count("-") > 4) { @@ -298,11 +298,11 @@ return Boolean(this._convBytesToInteger(this.byDic.slice(iAddr, iAddr+this.nBytesArc)) & this._finalNodeMask); } getMorph (sWord) { // retrieves morphologies list, different casing allowed - sWord = char_player.spellingNormalization(sWord) + sWord = char_player.spellingNormalization(sWord); let l = this.morph(sWord); if (sWord[0].gl_isUpperCase()) { l.push(...this.morph(sWord.toLowerCase())); if (sWord.gl_isUpperCase() && sWord.length > 1) { l.push(...this.morph(sWord.gl_toCapitalize())); @@ -312,11 +312,11 @@ } suggest (sWord, nSuggLimit=10) { // returns a array of suggestions for //const t0 = Date.now(); - sWord = char_player.spellingNormalization(sWord) + sWord = char_player.spellingNormalization(sWord); let sPfx = ""; let sSfx = ""; [sPfx, sWord, sSfx] = char_player.cut(sWord); let nMaxSwitch = Math.max(Math.floor(sWord.length / 3), 1); let nMaxDel = Math.floor(sWord.length / 5); @@ -589,11 +589,11 @@ } } } * _getArcs1 (iAddr) { - "generator: return all arcs at as tuples of (nVal, iAddr)" + // generator: return all arcs at as tuples of (nVal, iAddr) while (true) { let iEndArcAddr = iAddr+this.nBytesArc; let nRawArc = this._convBytesToInteger(this.byDic.slice(iAddr, iEndArcAddr)); yield [nRawArc & this._arcMask, this._convBytesToInteger(this.byDic.slice(iEndArcAddr, iEndArcAddr+this.nBytesNodeAddress))]; if (nRawArc & this._lastArcMask) { Index: graphspell-js/spellchecker.js ================================================================== --- graphspell-js/spellchecker.js +++ graphspell-js/spellchecker.js @@ -195,11 +195,11 @@ return true; } if (this.bExtendedDic && this.oExtendedDic.isValid(sWord)) { return true; } - if (this.bCommunityDic && this.oCommunityDic.isValid(sToken)) { + if (this.bCommunityDic && this.oCommunityDic.isValid(sWord)) { return true; } if (this.bPersonalDic && this.oPersonalDic.isValid(sWord)) { return true; } @@ -212,11 +212,11 @@ return true; } if (this.bExtendedDic && this.oExtendedDic.lookup(sWord)) { return true; } - if (this.bCommunityDic && this.oCommunityDic.lookup(sToken)) { + if (this.bCommunityDic && this.oCommunityDic.lookup(sWord)) { return true; } if (this.bPersonalDic && this.oPersonalDic.lookup(sWord)) { return true; } @@ -271,11 +271,11 @@ } } * select (sFlexPattern="", sTagsPattern="") { // generator: returns all entries which flexion fits and morphology fits - yield* this.oMainDic.select(sFlexPattern, sTagsPattern) + yield* this.oMainDic.select(sFlexPattern, sTagsPattern); if (this.bExtendedDic) { yield* this.oExtendedDic.select(sFlexPattern, sTagsPattern); } if (this.bCommunityDic) { yield* this.oCommunityDic.select(sFlexPattern, sTagsPattern);