IMPROVES-i3 both empties are equal (ratio 1.0)

This commit is contained in:
2026-05-22 19:45:50 -03:00
parent 6efce8c601
commit 18c34e3b41

View File

@@ -82,8 +82,10 @@ static float shit11(char *s1, char *s2)
len1 = strlen(s1); len1 = strlen(s1);
len2 = strlen(s2); len2 = strlen(s2);
if(len1 == 0 && len2 == 0)
return 1.0; /* both empty == identical */
if(len1 == 0 || len2 == 0) if(len1 == 0 || len2 == 0)
return 0.0; return 0.0; /* one empty == no similarity */
int d[len1+1][len2+1]; int d[len1+1][len2+1];