Closed rabbithui closed 6 years ago
Hi @rabbithui, you can plug in any Levenshtein-distance function as the first argument to BKTree()
when you initialize it. There are plenty of edit-distance and Levenshtein libraries around for Python, so just use Google to find something worthwhile. Here's one place, or you could find a well-tested PyPI library.
And actually, just the other day I created a Python Gist to calculate edit distance. Not the most efficient, but it does the job! https://gist.github.com/benhoyt/3152d3cb5762ad1b9d6aa21bcf142969
@benhoyt hi,what should i do if i want to use levenshtein distance?