Skip to content

Approximate string matching support #17

Open

Description

@baudren

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?

Activity

  1. clusterfudge commented on Feb 19, 2016

    @clusterfudge
    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.

  2. wolfv commented on Mar 7, 2016

    @wolfv

    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

  3. Sudo-Kid commented on Mar 19, 2016

    @Sudo-Kid
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions