skip to Main Content

Php – Wrong levenshtein UTF8

From here Levenshtein distance on diacritic characters I'm using this PHP function to calculate the levenshtein distance for UTF8 characters. function levenshtein_php($str1, $str2){ $length1 = mb_strlen( $str1, 'UTF-8'); $length2 = mb_strlen( $str2, 'UTF-8'); if( $length1 < $length2) return levenshtein_php($str2, $str1);…

VIEW QUESTION
Back To Top
Search