134 points · by maxbachmann · 6y ago · 27 comments
I use fuzzy text searching to compare LPR license plates with those on lists for parking enforcement.
I wrote a blog entry about Vladimir Losifovich Levenshtein and practical description of string comparison here:
https://blog.easyalpr.com/2019/09/16/calculating-license-pla...
Also, here's a UI on top of fuzzy string matching if you just want to play with levenshtein distance for a few minutes: https://easyalpr.com/tools/string-compare/
>It is MIT licensed so it can be used whichever License you might want to choose for your project, while your forced to adopt the GPLv2 license when using FuzzyWuzzy
How is it using FuzzyWuzzy to be exact in order to be MIT licensed?
https://github.com/rhasspy/rapidfuzz/blob/c225979db3b02caccb...
https://github.com/seatgeek/fuzzywuzzy/blob/2188520502b86375...
I think (IANAL) that that clears it up - not using the same code, but the same algorithm.
Is it really that clear cut?
Any chance you could also implement a weighted-levenshtein version? (or allow passing in a weight-table for various characters combinations as like a kwarg or something?)
edit: Something like this, but with the speed of C++ would be amazing. https://pypi.org/project/weighted-levenshtein/
Not contradicting your point, btw.
I once solved a performance problem by using the pure-python mysql drivers and pypy, rather than the normal c-wrapped drivers and python. The result was actually faster than a Java version of the same program using the normal JDBC drivers.
Something feels deeply wrong with a world where database performance can depend on basic string interpolation performance deep in your client-side mysql drivers... Its soul-destroying to see a naive 'safe' parameterization code coming up hottest in Java profiling results.