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

AuthorList parse adds extra space if author middlename is abbrevatied without dot #4864

Closed
Siedlerchr opened this issue Apr 7, 2019 · 2 comments · Fixed by #4931
Closed
Labels
bug Confirmed bugs or reports that are very likely to be bugs

Comments

@Siedlerchr
Copy link
Member

Siedlerchr commented Apr 7, 2019

Importing the PubMed entry with the Id gives me a bunch of names.
However in e26d9ab I added a normalize names formatter to add dots to the abbrevated names.

However, the Authorlist.parse method adds an extra space between the first and last name of the last author.
N.[space][space]Henriette

Author{firstPart='N.  Henriette', firstAbbr='N. H.', vonPart='null', lastPart='Uhlenhaut', jrPart='null'}

Input entry to the formatter:

@article{,
  author = {Dyar, Kenneth Allen and Hubert, Michaël Jean and Mir, Ashfaq Ali and Ciciliot, Stefano and Lutter, Dominik and Greulich, Franziska and Quagliarini, Fabiana and Kleinert, Maximilian and Fischer, Katrin and Eichmann, Thomas Oliver and Wright, Lauren Emily and Peña Paz, Marcia Ivonne and Casarin, Alberto and Pertegato, Vanessa and Romanello, Vanina and Albiero, Mattia and Mazzucco, Sara and Rizzuto, Rosario and Salviati, Leonardo and Biolo, Gianni and Blaauw, Bert and Schiaffino, Stefano and Uhlenhaut, N Henriette},
}

Workaround is to call the NormalizeNames formatter again, then the space is removed

Entry preview in import is correct, so the error is the parser:
grafik

@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Apr 7, 2019
@matthiasgeiger
Copy link
Member

Not the last author is affected, but the problem seems to be caused by the quite special format of this particular name Uhlenhaut, N Henriette.

The single character without dot as the first firstname causes problems...

@Siedlerchr Siedlerchr changed the title AuthorLIst parse adds extra space between last author firstname and lastname AuthorLIst parse adds extra space if author middlename is abbrevatied without dot Apr 22, 2019
@Siedlerchr Siedlerchr changed the title AuthorLIst parse adds extra space if author middlename is abbrevatied without dot AuthorList parse adds extra space if author middlename is abbrevatied without dot Apr 22, 2019
@Siedlerchr
Copy link
Member Author

@matthiasgeiger is right. I wrote a quick test to check:

        Author author = AuthorList.parse("Uhlenhaut, N Henriette").getAuthor(0);
        author.getLastFirst(false) 

Results in Uhlenhaut, N.[space][space]Henriette

tobiasdiez added a commit that referenced this issue Apr 29, 2019
Fixes #4864. The author class added an additional space when converting "A O" to the dotted version "A. O.".
@tobiasdiez tobiasdiez mentioned this issue Apr 29, 2019
6 tasks
Siedlerchr pushed a commit that referenced this issue Apr 30, 2019
Fixes #4864. The author class added an additional space when converting "A O" to the dotted version "A. O.".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants