Closed
Description
I am currently trying to parse names with the nameparser which works perfectly fine, except i encounter some errors when trying to parse trailing titles such as MSc.
Here is a small example of what I am trying to do:
>>> from nameparser import HumanName
>>> HumanName("Dr. med. univ. Margit Popp")
<HumanName : [
title: 'Dr. med. univ.'
first: 'Margit'
middle: ''
last: 'Popp'
suffix: ''
nickname: ''
]>
>>> HumanName("Dr. med. univ. Margit Popp, MSc")
<HumanName : [
title: 'MSc'
first: 'Dr. med. univ. Margit Popp'
middle: ''
last: ''
suffix: ''
nickname: ''
]>
The first example works perfectly fine, but as soon as MSc is in the game it doesnt recognize the other titles nor split the name correctly. I have added MSc (as well as med. + univ.) to the CONSTANTS but it doesnt seem to help. It also acts strange when i just use default settings:
>>> HumanName("Dr. med. univ. Margit Popp, MSc")
<HumanName : [
title: ''
first: 'MSc'
middle: ''
last: 'Dr. med. univ. Margit Popp'
suffix: ''
nickname: ''
]>
What i would be expecting is:
>>> HumanName("Dr. med. univ. Margit Popp, MSc")
<HumanName : [
title: 'MSc Dr. med. univ.'
first: 'Margit'
middle: ''
last: 'Popp'
suffix: ''
nickname: ''
]>
I am running python 3.4 with the latest version of nameparser. Is there any possibility of making this work? Am i just missing some customizable setting?
thanks for your help