NameCleaver recently received a small version bump (to 0.3!) with a fairly big addition: safe mode. This was the most-requested feature amongst the other in-house users of NameCleaver, so I figured it might also merit a quick announcement.
The update is pretty simple. The @parse()@ method now takes a “safe” keyword argument. If NameCleaver encounters a name it doesn’t know how to deal with, it will return the original string you passed in. So, for example, our developers recently tried to parse a name similar to this, which made NameCleaver explode:
str(IndividualNameCleaver('BORDEN PHD J D, P THOMAS').parse()) => BOOOM!!!111!!11
But now, just tell NameCleaver you want safe parsing, and the result will be less messy:
str(IndividualNameCleaver('BORDEN PHD J D, P THOMAS').parse(safe=True)) => 'BORDEN PHD J D, P THOMAS'
In other NameCleaver news, it’s now on PyPI, so installing is as simple as:
pip install name-cleaver