This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Matcher = require('did-you-mean'); | |
var Levenshtein = require('levenshtein'); | |
var Hangul = require('hangul-js'); | |
var m = new Matcher('고양이 호랑이 원숭이'); | |
m.setThreshold(999); | |
var typos = ['공야이', '홀아이', '우너수잉']; | |
function printDistances(word) { | |
console.log('word: ' + word); |