This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Description
I found a bug in Accord.Math.Distance.Levenshtein
the if statement
public static double Levenshtein(string x, string y)
{
if (x == null || x.Length == 0)
{
if (y == null || y.Length != 0)
return 0;
return y.Length;
}
else
{
if (y == null || y.Length == 0)
return x.Length;
}
in my opinion that the if statement may be like the fowllowing statement
public static double Levenshtein(string x, string y)
{
if (x == null || x.Length == 0)
{
if (y == null || y.Length == 0)
return 0;
return y.Length;
}
else
{
if (y == null || y.Length == 0)
return x.Length;
}