similarity_search.c aktualisiert
3 -> 2 (min word length)
This commit is contained in:
@@ -77,8 +77,8 @@ float word_similarity(const char *word1, const char *word2) {
|
|||||||
int len1 = strlen(word1);
|
int len1 = strlen(word1);
|
||||||
int len2 = strlen(word2);
|
int len2 = strlen(word2);
|
||||||
|
|
||||||
// For very short words (3 chars or less), require exact match
|
// For very short words (2 chars or less), require exact match
|
||||||
if (len1 <= 3 || len2 <= 3) {
|
if (len1 <= 2 || len2 <= 2) {
|
||||||
return str_case_cmp(word1, word2) == 0 ? 1.0f : 0.0f;
|
return str_case_cmp(word1, word2) == 0 ? 1.0f : 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user