Skip to content

Commit

Permalink
Fixed jats native language handling for author name (#145)
Browse files Browse the repository at this point in the history
* Fixed jats native language handling for author name

* fixing formatting issues

---------

Co-authored-by: Mugdha Polimera <[email protected]>
  • Loading branch information
mugdhapolimera and Mugdha Polimera authored Nov 7, 2024
1 parent baafaed commit e2548b8
Show file tree
Hide file tree
Showing 5 changed files with 3,951 additions and 6 deletions.
10 changes: 9 additions & 1 deletion adsingestp/parsers/jats.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,15 @@ def parse(self, article_metadata):

# get native language author name
if contrib.find("name-alternatives"):
native_lang = contrib.find("name-alternatives").get_text().strip()
if contrib.find("name-alternatives").find("string-name"):
native_lang = (
contrib.find("name-alternatives")
.find("string-name")
.get_text()
.strip()
)
else:
native_lang = contrib.find("name-alternatives").get_text().strip()
else:
native_lang = ""

Expand Down
Loading

0 comments on commit e2548b8

Please sign in to comment.