Skip to content

Bug: string:levenshteinDistance can sometimes produce incorrect results #58

@Yewzir

Description

@Yewzir

I just noticed that the results of string:levenshteinDistance are sometimes incorrect, probably because the implementation counts an extra character operation, albeit incorrectly. I have collected a number of examples for you in which this discrepancy occurs.

_str1 _str2 Output Expected
before order 6 5
time system 6 5
state present 7 6
square consider 8 7
after carbohydrate 11 10
dictionary general 10 9
incomprehensible public 15 14
under square 6 5
there number 6 5
there never 5 4
structure interest 9 8
possible public 7 6

As you can see, one extra character operation is counted with the above parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions