Compare 5000 strings with PHP Levenshtein
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 through all 5000 and comparing them directly with every other 4999? Edit: I am also interested in alternate methods if anyone has suggestions. The overall goal is to find similar entries (and eliminate duplicates) based on user-submitted street addresses. I think a better way to group similar addresses would be to: create a database with two tables - one for the address (and a id), one for the soundexes of words or literal