fuzzyset.js – Fuzzy String Set for JavaScript

fuzzyset.js is a data structure that performs something akin to fulltext search against data to determine likely mispellings and approximate string matching. 


The usage is simple. Just add a string to the set, and ask for it later by using .get:

a = FuzzySet();a.add("michael axiak");
a.get("micael asiak");
[[0.8461538461538461, 'michael axiak']];

The result will be an array of [score, matched_value] arrays. The score is between 0 and 1, with 1 being a perfect match




The current page is the site's「Google AMP」 View and comment please click:Full Version »

Since this article was not written in the Markdown format editor, the converted page may not conform to the AMP standard.