You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inserting a C costs 3. Everything else costs 1. The function returns lev(' ','C') = 3, but in actuality the minimal cost should be 2, since it's cheaper to insert an A (+1) and then transform the A into a C (+1).
I haven't been able to think of a solution yet, but a workaround at the least is to say that the single-character costs entered in as weights must already be minimal.
Deletion has the same issue, but substitution does not.
Hi @tmpetty - thanks for reporting this issue. I was able to reproduce. If you do come up with a solution, please open a PR and we'll review and approve. (Right now, we do not have engineers who can focus on fixing this)
Consider the following scenario:
Inserting a C costs 3. Everything else costs 1. The function returns lev(' ','C') = 3, but in actuality the minimal cost should be 2, since it's cheaper to insert an A (+1) and then transform the A into a C (+1).
I haven't been able to think of a solution yet, but a workaround at the least is to say that the single-character costs entered in as weights must already be minimal.
Deletion has the same issue, but substitution does not.
Here's an example:
The text was updated successfully, but these errors were encountered: