I'm looking for a function (from a Python library or similar) that takes as input a name and produces as output an encoding that is shared amount variants/misspellings of that name, i.e.
nameEncoder('Jon Smith')->674453
nameEncoder('Johnathan Smith')->674453
nameEncoder('Elizabeth Doe')->435132
nameEncoder('Elisabeth Doe')->435132
Happy to have that encoding simply be the most common variant. I've looked at various fuzzy matching tools, but all seem to focus on comparing value pairs. I'd like to do this as a data-preprocessing step so subsequent joins/aggregation/deduping don't need to use fuzzy matching.
I realize that there will be ambiguity here, just as there is in fuzzy matching, so nothing will be perfect.
Various SAS tools have a feature called Match Code that do what I'm looking for, but only within their (expensive) ecosystem.
P.S. I'm also looking for similar functionality with addresses, although that's a topic for another post.
[Cross post from SO, under advice that this would be a more appropriate forum]
Cross post from SO, under advice that this would be a more appropriate forum
Yes if you're looking for a library or some other pre-made program that does so, sure it is, just make sure to better define your requirements, as defined in the question guidelines. If you're asking for a piece of code, most likely this will be closed as off-topic.