Bestmatch in fuzzy search not working

Create issue
Issue #224 closed
Former user created an issue

When I compare strings 1234 and 12234 and ask for the best match, allowing only insertions and deletions, I get the correct, minimal match (1 insertion needed):

matched = search('(^1234$){i,d}', '12234', BESTMATCH) matched.fuzzy_counts (0, 1, 0)

But when I say that I will also allow substitutions, it reports that two substitutions will accomplish the change I need (can't be right, since the strings are of unequal lengths). Anyway, the total error for this solution is 2, which is not the best match:

matched = search('(^1234$){s,i,d}', '12234', BESTMATCH) matched.fuzzy_counts (2, 0, 0)

Comments (1)

  1. Log in to comment