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

Adds NearestDAWG for Levenshtein distances #37

Closed
wants to merge 2 commits into from

Conversation

poke1024
Copy link

@poke1024 poke1024 commented Apr 21, 2019

Based on http://stevehanov.ca/blog/?id=114

The relevant commit here is:
7a2379a

Sort of depends on #38.

Allows you to compute fast Levenshtein distances over large vocabularies:

import dawg

keys = ["weather", "this", "there", "thus", "another"]

d = dawg.NearestDAWG(keys)

for k, cost in d.items("other", 2):
	print(k, cost)

With #38, this could be a single new function similar inside the DAWG class (my preferred solution).

tested with python 3.7.3 and python 2.7.10
@poke1024
Copy link
Author

This needs more work. I'll continue to work on this on a fork.

@poke1024 poke1024 closed this Apr 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant