2 ms·
can you clarify what you mean by "doesn’t take advantage of fuzziness"? what results are you expecting but not getting back? or what results are you getting ba
by leeoniya 4y ago
can you clarify what you mean by "doesn’t take advantage of fuzziness"?
what results are you expecting but not getting back? or what results are you getting back that you are not expecting?
- eurasiantiger 4y agoI tend to think of fuzzy search as having specific leniency: for example, ”xemaple” would find ”example” and ”exmaple”
- leeoniya 4y agoin reality what happens with this level of tolerance is you get back "example" followed by other nonsense results, which is exactly what uFuzzy tries to avoid. there are plenty of existing fuzzy searches that behave too loosely. xemaple has two transposition errors, one in the critical (and unusual) prefix position. if we allowed this level of fuzz in "spac ca" it should presumably match "psac ca", "spca ac", "sapc ac". it seems like a good idea at first, but with a big enough corpus you start to realize that these mangled variations actually appear as substrings in very unrealated matches, (they're all two swap errors away) i dont think you can have what you're asking for without destroying match quality and making things a lot slower in the process - the very qualities that distinguish uFuzzy from what already exists. i did add support for single transpositions, substitutions, and deletions (in non prefix or suffix positions) yesterday. so your version with one swap ("exmaple") should work. https://leeoniya.github.io/uFuzzy/demos/compare.html?libs=uFuzzy&intraTrn=1&intraSub=1&search=exmaple https://leeoniya.github.io/uFuzzy/demos/compare.html?libs=uF...