Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Approximate string matching support #17

Open
baudren opened this issue Feb 19, 2016 · 3 comments
Open

Approximate string matching support #17

baudren opened this issue Feb 19, 2016 · 3 comments

Comments

@baudren
Copy link

baudren commented Feb 19, 2016

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?

@clusterfudge
Copy link
Collaborator

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
Copy link

wolfv commented 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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants