titipata / pubmed_parser

:clipboard: A Python Parser for PubMed Open-Access XML Subset and MEDLINE XML Dataset
http://titipata.github.io/pubmed_parser/
MIT License
579 stars 166 forks source link

#129 Parse language in parse_xml_web() #130

Closed nils-herrmann closed 7 months ago

nils-herrmann commented 7 months ago

parse_xml_web() does not parse the language of the publication. This PR implements the needed code.

Michael-E-Rose commented 7 months ago

Can you do this with a try-except clause instead, and return None if it fails? try-except is faster when the exception triggers most of the time.

raypereda commented 7 months ago

Please consider adding a dozen lines to make a new test here: tests/test_medline_parser.py https://github.com/titipata/pubmed_parser/blob/master/tests/test_medline_parser.py

raypereda-gr commented 7 months ago

Looks good to me. Have a few more eyes review. If no objections, ready to merge. Thanks @nils-herrmann

Michael-E-Rose commented 7 months ago

Side question to the other maintainers of this project: Do I see this correctly that are no tests for the pubmed_web_parser yet?