Index: graphspell-js/dawg.js ================================================================== --- graphspell-js/dawg.js +++ graphspell-js/dawg.js @@ -65,11 +65,11 @@ if (!dAff.get(sAff)) { dAff.set(sAff, nAff); lAff.push(sAff); nAff += 1; } - dAffOccur.set(sAff, dCharOccur.gl_get(sAff, 0) + 1); + dAffOccur.set(sAff, dAffOccur.gl_get(sAff, 0) + 1); // tags if (!dTag.get(sTag)) { dTag.set(sTag, nTag); lTag.push(sTag); nTag += 1; Index: graphspell/dawg.py ================================================================== --- graphspell/dawg.py +++ graphspell/dawg.py @@ -87,11 +87,11 @@ sAff = funcStemmingGen(sFlex, sStem) if sAff not in dAff: dAff[sAff] = nAff lAff.append(sAff) nAff += 1 - dAffOccur[sAff] = dCharOccur.get(sAff, 0) + 1 + dAffOccur[sAff] = dAffOccur.get(sAff, 0) + 1 # tags if sTag not in dTag: dTag[sTag] = nTag lTag.append(sTag) nTag += 1