Compare 5000 strings with PHP Levenshtein

前端 未结 8 1659
长情又很酷
长情又很酷 2021-01-30 12:15

I have 5000, sometimes more, street address strings in an array. I\'d like to compare them all with levenshtein to find similar matches. How can I do this without looping throug

8条回答
  •  失恋的感觉
    2021-01-30 12:39

    I think you cannot avoid looping through the array as the levenstein() function takes only strings and not an array as input.

    You can do something like:

    for($i=0;$i

提交回复
热议问题