Open heatherleaf opened 6 years ago
There is a third-party SymSpell implementation with weighted Damerau-Levenshtein edit distance / keyboard-distance: https://github.com/searchhub/preDict
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.
It is planned to add a weighted edit distance to SymSpell in the future, but there is no timeline yet.
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#)