We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The combination of having lastname prefixes and repeated titles before and after a name seems to break the parsers logic around middle name handling.
Here's a test that fails:
hn = HumanName("dr Vincent van Gogh dr") self.assertEqual("Vincent", hn.first) self.assertEqual("van", hn.middle) self.assertEqual("Gogh", hn.last)
For some reason, the middle name comes out as dr Vincent van instead of the expected van.
dr Vincent van
van
The text was updated successfully, but these errors were encountered:
Current master does this:
% python tests.py "dr Vincent van Gogh dr" <HumanName : [ title: 'dr' first: 'Vincent' middle: ' dr Vincent van' last: 'Gogh' suffix: 'dr' nickname: '' ]>
Actually this is what I would expect because "van" is a prefix and should attach itself to the following piece.
% python tests.py "dr Vincent van Gogh dr" <HumanName : [ title: 'dr' first: 'Vincent' middle: '' last: 'van Gogh' suffix: 'dr' nickname: '' ]>
I think this is a valid bug but I'm not sure what the issue is.
Sorry, something went wrong.
actually, "van" is not a prefix because it is sometimes a first name. So you're right, this should be the expected output:
% python tests.py "dr Vincent van Gogh dr" <HumanName : [ title: 'dr' first: 'Vincent' middle: 'van' last: 'Gogh' suffix: 'dr' nickname: '' ]>
No branches or pull requests
The combination of having lastname prefixes and repeated titles before and after a name seems to break the parsers logic around middle name handling.
Here's a test that fails:
For some reason, the middle name comes out as
dr Vincent van
instead of the expectedvan
.The text was updated successfully, but these errors were encountered: