PyElla Names

PyElla Names is a Python module that attempts to separate Spanish full names into First name, First surname and Second surname. It is not a trivial task as there are many composite names—both first names and surnames—which eliminates the possibility of just separating on spaces. I wrote this over a couple of days to help administrative tasks in the office: we had a list of a few hundred people whose names needed separating. The script still needs some work as there are some names which can also be surnames: they should be flagged and reviewed by a human.

Given a list of full names...

 

...run the CSV example...

 

...and voilà

Source code on GitHub

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>