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.
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]