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

IndividualNameCleaver fails to parse preceding degree #4

Open
kentr opened this issue Feb 8, 2013 · 1 comment
Open

IndividualNameCleaver fails to parse preceding degree #4

kentr opened this issue Feb 8, 2013 · 1 comment

Comments

@kentr
Copy link

kentr commented Feb 8, 2013

Edited:

Looks it fails on the preceding degree "M.D.," .

Output:

parsed = IndividualNameCleaver("M.D., ARCH PEQUET").parse()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/name_cleaver/cleaver.py", line 51, in parse
return self.cannot_parse(safe)
File "/usr/local/lib/python2.7/dist-packages/name_cleaver/cleaver.py", line 17, in cannot_parse
raise UnparseableNameException(u"Couldn't parse name: {0}".format(self.name))
UnparseableNameException: Couldn't parse name: ARCH PEQUET

I'm not sure what version I'm using. Recently installed via pip on Ubuntu 12.04.

@arowla
Copy link
Contributor

arowla commented Feb 12, 2013

Thanks for the bug report. We'll consider supporting this format in future versions of NameCleaver. In the meantime, you could pursue one of two solutions:

  1. Fix the problem and submit us a pull request (including a passing test!)
  2. Pre-process the name before you pass it in to NameCleaver, to place the degree at the end, if you can reasonably expect that you'll encounter this format often.

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

No branches or pull requests

2 participants