You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
{first} {last}, {suffix} is incorrectly recognized as {first}, {title} #62
It turns out this is because "Dr" is not an expected suffix, yet. It works as expected with "MD". "Dr" is currently only expected as a prefix.
It makes me wonder if maybe we should check through all the TITLES when they come after a comma (with more than 1 part before the comma) like this, but there's a lot in there. There's a few that could be names, so it could make some cases of "Lastname, Title Firstname" parse incorrectly.
I'm thinking for now to just put "Dr" in with the suffixes too. Let me know if you have other thoughts.
Actually, I listed Dr. as an example - I have lots of very rare suffixes (I suspect some of them to be made up) to work with, which is unreasonable to recognize via a whitelist.
I can't see why the addition of anything after the comma should turn the first part from being treated as a full name into just the first name. What I suggest you do instead is check whether the part before the (last) comma contains more than one word. If it does, then parse it as a name on its own and then mark the part after comma as a suffix.
Activity
derek73 commentedon Aug 11, 2017
It turns out this is because "Dr" is not an expected suffix, yet. It works as expected with "MD". "Dr" is currently only expected as a prefix.
It makes me wonder if maybe we should check through all the TITLES when they come after a comma (with more than 1 part before the comma) like this, but there's a lot in there. There's a few that could be names, so it could make some cases of "Lastname, Title Firstname" parse incorrectly.
I'm thinking for now to just put "Dr" in with the suffixes too. Let me know if you have other thoughts.
Darayavaush commentedon Aug 11, 2017
Actually, I listed Dr. as an example - I have lots of very rare suffixes (I suspect some of them to be made up) to work with, which is unreasonable to recognize via a whitelist.
I can't see why the addition of anything after the comma should turn the first part from being treated as a full name into just the first name. What I suggest you do instead is check whether the part before the (last) comma contains more than one word. If it does, then parse it as a name on its own and then mark the part after comma as a suffix.