Skip to content

Levenshtein distances Bug #268

@ibuda

Description

@ibuda

Found a bug in Levenshtein and WegihtedLevenshtein distances implementations.
In more details, the following methods give wrong #results:
Levenshtein.distance("abc", "a"): Expected: 2, Actual: 1
Levenshtein.distance("a", "abc") : Expected: 2, Actual: 1
WeightedLevenshtein.distance("a2c3e", "1b1d1", e): Expected: 8, Actual: WeightedLevenshtein.distance("a", "abc", e): Expected: 2, Actual: 1

This error is caused by a mistake in the implementation of Levenshtein distances.
Having studied the list of open issues, this bug causes #239 and #244.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions