Index: graphspell-js/str_transform.js ================================================================== --- graphspell-js/str_transform.js +++ graphspell-js/str_transform.js @@ -251,11 +251,12 @@ return weight; }, showDistance (s1, s2) { - console.log(`Distance: ${s1} / ${s2} = ${this.distanceDamerauLevenshtein(s1, s2)})`); + console.log(`Distance Jaro-Winkler: ${s1} / ${s2} = ${this.distanceJaroWinkler(s1, s2)})`); + console.log(`Distance Damerau-Levenshtein: ${s1} / ${s2} = ${this.distanceDamerauLevenshtein(s1, s2)})`); }, // Suffix only defineSuffixCode: function (sFlex, sStem) { /* @@ -339,12 +340,12 @@ exports.simplifyWord = str_transform.simplifyWord; exports.numbersToExponent = str_transform.numbersToExponent; exports.spellingNormalization = str_transform.spellingNormalization; exports.longestCommonSubstring = str_transform.longestCommonSubstring; exports.distanceDamerauLevenshtein = str_transform.distanceDamerauLevenshtein; - exports.distanceDamerauLevenshtein2 = str_transform.distanceDamerauLevenshtein2; + exports.distanceJaroWinkler = str_transform.distanceJaroWinkler; exports.showDistance = str_transform.showDistance; exports.changeWordWithSuffixCode = str_transform.changeWordWithSuffixCode; exports.changeWordWithAffixCode = str_transform.changeWordWithAffixCode; exports.defineAffixCode = str_transform.defineAffixCode; exports.defineSuffixCode = str_transform.defineSuffixCode; } Index: graphspell/str_transform.py ================================================================== --- graphspell/str_transform.py +++ graphspell/str_transform.py @@ -252,10 +252,11 @@ return round(max(nLen1, nLen2) - nLargestCS + nTrans) def showDistance (s1, s2): "display Damerau-Levenshtein distance and Sift4 distance between and " + print("Jaro-Winkler: " + s1 + "/" + s2 + " = " + distanceJaroWinkler(s1, s2)) print("Damerau-Levenshtein: " + s1 + "/" + s2 + " = " + distanceDamerauLevenshtein(s1, s2)) print("Sift4:" + s1 + "/" + s2 + " = " + distanceSift4(s1, s2))