Discussion:
[Bitpim-devel] Splitting fullname into parts
Roger Binns
2004-01-11 02:10:06 UTC
Permalink
Does anyone have any pointers to an algorithm for splitting
a full name into parts?

It should cope with something like:

Don Juan De Marco III

The III is a generational qualifier and "De" is part
of the surname and is not a middle name.

Roger
Stephen Wood
2004-01-11 04:59:14 UTC
Permalink
Evolution seems to have some sort of algorithm. I went into the contact
editor (for V 1.2.2) and typed in "Don Juan De Marco" and then clicked
on the "Full Name" button. It split the name into Firts: Don, Middle:
Juan, Last: De Marco, Suffix: III.

I'll poke around to see if I can find the algorithm used.

Steve
Roger Binns
2004-01-11 06:12:46 UTC
Permalink
Post by Stephen Wood
Evolution seems to have some sort of algorithm. I went into the contact
editor (for V 1.2.2) and typed in "Don Juan De Marco" and then clicked
Juan, Last: De Marco, Suffix: III.
Outlook is even more fine tuned. It splits the name correctly, but
also has a 'File As' field which is "lastname, first middle" format.
If the "de" is lower case, it is file as "Marco, Don Juan de" and
if "de" is upper case "De" then it is file as "De Marco, Don Juan".

Roger
Stephen Wood
2004-01-12 02:52:19 UTC
Permalink
Evolution's got some File As button in it's contact editor. It lets you
choose between "First Last" and "Last, First".

I found the "Western Name Parser" in evolution. (Now in the
evolution-data-server). It starts out with

* <Nat> Jamie, do you know anything about name parsing?
* <jwz> Are you going down that rat hole? Bring a flashlight.

It looks like the relevant files are e-name-western.c, e-name-western.h
and e-name-western-tables.h. They can be browsed at
http://cvs.gnome.org/lxr/source/evolution-data-server/addressbook/libebook/

Steve

Loading...