joshfraser/PHP-Name-Parser

Initialed first name assumed to be middle initial

Opened this issue · 0 comments

I'm not sure if this is an issue or not, it could be interpreted either way. Opening up a discussion.

For example: "J. Edgar Hoover" or "M. Night Shyamalan" are currently parsed as:

Array
(
    [salutation] => 
    [fname] => Edgar
    [initials] => J.
    [lname] => Hoover
    [lname_base] => Hoover
    [lname_compound] => 
    [suffix] => 
)

If this name is re-assembled in another system it would be assumed to be "Edgar J. Hoover" which would be incorrect.

An alternative would be to make fname "J. Edgar" in this situation, with no initials.

I pulled a random sampling of 1000 people from a large database and parsed their names, this script was 96.8% accurate. If this one issue were fixed, 13 additional splits would work, upping the accuracy to 98.1%.