Skip to content

euclidean distance

Subhajit Sahu edited this page May 5, 2020 · 1 revision

Get Euclidean distance between strings, with normalized single UTF-16 code.

const euclideanDistance = require('string-euclideandistance');
// euclideanDistance(<string-1>, <string-2>)

euclideanDistance('a', 'b');
// 0.000015259021896696422 (normalized distance between 1 character code)
euclideanDistance('logo', 'pogo');
// 0.00006103608758678569
euclideanDistance('doctor', 'broker');
// 0.00028053370429312937

extra-string

Clone this wiki locally