You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a built-in mechanism to support fuzzy string matching (within a certain range). For instance, when having a keyword "from", to be able to detect that "form" could be a match, if no exact match is found?
I was going to say yes, but then sadly have to say "not right now." The Trie implementation supports querying with edit distance, but I have not plumbed that all the way out.
I'd be happy to review a PR that makes the changes necessary to expose edit distance, and a test or two flexing it. It should be noted that fuzzy matching in this way can dramatically affect performance with a large number of entities.
Maybe you'd be interested in the Android Keyboard Fuzzy String matching? I've ported it over to a standalone C++ implementation (based on the work from the Chromium Mojo team).
Activity
clusterfudge commentedon Feb 19, 2016
I was going to say yes, but then sadly have to say "not right now." The Trie implementation supports querying with edit distance, but I have not plumbed that all the way out.
https://github.com/MycroftAI/adapt/blob/master/adapt/tools/text/trie.py#L112
I'd be happy to review a PR that makes the changes necessary to expose edit distance, and a test or two flexing it. It should be noted that fuzzy matching in this way can dramatically affect performance with a large number of entities.
wolfv commentedon Mar 7, 2016
Maybe you'd be interested in the Android Keyboard Fuzzy String matching? I've ported it over to a standalone C++ implementation (based on the work from the Chromium Mojo team).
I think it offers great string matching (for typed input): https://github.com/wolfv/dbus_type_correction
Sudo-Kid commentedon Mar 19, 2016
To add to what wolfv has suggested.
There is also a python fuzzy string matching library that maybe worth looking at as well.
https://github.com/seatgeek/fuzzywuzzy