Hey all
The Javadoc for the getDistance method of lucene 5.1.0  says.
"Returns a float between 0 and 1 based on how similar the specified strings are 
to one another. Returning a value of 1 means the specified strings are 
identical and 0 means the string are maximally different."
But it returns negative values for some string comparisons. Is this a bug?

Example code below.



String string1 = "microsoft";

String string2 = "microsoft's minesweeper";

System.out.println(new LuceneLevenshteinDistance().getDistance(string1, 
string2));

//prints -0.5555556


Thanks
Ferosh

Reply via email to