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

Support for weighted edit distance #43

Open
heatherleaf opened this issue Sep 7, 2018 · 2 comments
Open

Support for weighted edit distance #43

heatherleaf opened this issue Sep 7, 2018 · 2 comments

Comments

@heatherleaf
Copy link

I'm not sure if SymSpell already has support for weighted edit distance. If so, please tell me how to use it.

Otherwise, I suggest to add this as another possible distance metric, in addition to Levenshtein and Damerau-Levenshtein. The implementation itself shouldn't be problematic: just use the weight matrix instead of the default unit cost. The matrix is input to the constructor, and for command line use it can be stored in a file. (I could in principle do it myself, but I don't know C#)

@wolfgarbe
Copy link
Owner

  1. There is a third-party SymSpell implementation with weighted Damerau-Levenshtein edit distance / keyboard-distance: https://github.com/searchhub/preDict

  2. Weighted edit distance can also be added as a post-processing step. The preliminary SymSpell results could be filtered/re-sorted according to your preferences.

  3. It is planned to add a weighted edit distance to SymSpell in the future, but there is no timeline yet.

@heatherleaf
Copy link
Author

  1. Thanks, I'll look into that!
  2. Yes, but then the problem is the maximum edit distance parameter: I would like this parameter to be the true weighted cost, otherwise I have to use a too large value.
  3. I hope you'll get the time for it.

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

2 participants