Skip to content
New issue

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

Van Nguyen capitalizes to van Nguyen #70

Closed
Denhai opened this issue Feb 26, 2018 · 1 comment
Closed

Van Nguyen capitalizes to van Nguyen #70

Denhai opened this issue Feb 26, 2018 · 1 comment
Labels
Milestone

Comments

@Denhai
Copy link

Denhai commented Feb 26, 2018

h = HumanName('Van Nguyen')
h.capitalize(force=True)
str(h)  # 'van Nguyen'

Do first names ever start with lower case?

@derek73
Copy link
Owner

derek73 commented Feb 27, 2018

Thanks for the bug report. The intention is to capitalize first names.

"Van" is not being capitalized because it is also a prefix and, apparently, anything that is a prefix or conjunction will always be made lower case regardless where it appears in the name.

https://github.com/derek73/python-nameparser/blob/master/nameparser/parser.py#L752

I don't think that's the the correct way to capitalize either of those. For example "e" is a conjunction but may also be an initial. Probably need to pass the attribute name or something into that cap_word function and make that if statement a bit more complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants