Skip to content

Words instead of characters #17

@evyasonov

Description

@evyasonov

Hey

Thank you for the package! It's really amazing!

I'm wondering if it's possible to use words instead of characters in Levenshtein and Damerau-Levenshtein methods?

Result of a code below is 10:

from similarity.levenshtein import Levenshtein
print(Levenshtein().distance('Hello world', 'Hello brave new world'))

But if I use words instead of characters in the algorithm, I get 2 (insert 'brave', insert 'new').

Is it possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions