fagan2888 / Benchmark-of-Levenshtein_search

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Benchmark-of-Levenshtein_search

The included restaurant_nophone_training dataset was tested with a max Levenshtein edit distance of 2:

Results

select name from restaurant_nophone_training where levenshtein_less_equal(name, '"philippe the original"', 2) <= 2;
0.00198695853199 sec
[('"philippe\'s the original"',), ('"philippe the original"',)]

Levenshtein_search algorithm:
0.00019705373871 sec
[['"philippe the original"', 0, 0.0011574074074074073], ['"philippe\'s the original"', 2, 0.0011574074074074073]]

In this test, the Levenshtein_search algorithm was approx. 10x faster than using an equivalent search in PostgreSQL

About

License:MIT License


Languages

Language:Python 100.0%