pubmed_parser/medline_parser.py
def parse_publication_types(medline):
    """Parse Publication types from article

    Parameters
    ----------
    medline: Element
        The lxml node pointing to a medline document

    Returns
    -------
    publication_types: str
        String of semi-colon spearated publication types
    """
    publication_types = []
    publication_type_list = medline.find('Article/PublicationTypeList')
    if publication_type_list is not None:
        publication_type_list = publication_type_list.findall('PublicationType')
        for publication_type in publication_type_list:
            publication_types.append(
                publication_type.attrib.get('UI', '') + ':' + (publication_type.text.strip() or '')
            )
    publication_types = '; '.join(publication_types)
    return publication_types
Parse Publication types from article

    Parameters
    ----------
    medline: Element
        The lxml node pointing to a medline document

    Returns
    -------
    publication_types: str
        String of semi-colon spearated publication types
    
Parse Publication types from article
Parameters

Element
The lxml node pointing to a medline document

Returns

str
String of semi-colon spearated publication types
Parse Publication types from article Parameters Element The lxml node pointing to a medline document Returns str String of semi - colon spearated publication types
def parse_publication_types(medline):
    publication_types = []
    publication_type_list = medline.find('Article/PublicationTypeList')
    if publication_type_list is not None:
        publication_type_list = publication_type_list.findall('PublicationType')
        for publication_type in publication_type_list:
            publication_types.append(
                publication_type.attrib.get('UI', '') + ':' + (publication_type.text.strip() or '')
            )
    publication_types = '; '.join(publication_types)
    return publication_types
def parse_publication_types ( medline ) : publication_types = [ ] publication_type_list = medline . find ( 'Article/PublicationTypeList' ) if publication_type_list is not None : publication_type_list = publication_type_list . findall ( 'PublicationType' ) for publication_type in publication_type_list : publication_types . append ( publication_type . attrib . get ( 'UI' , '' ) + ':' + ( publication_type . text . strip ( ) or '' ) ) publication_types = '; ' . join ( publication_types ) return publication_types
Parse Publication types from article
Parameters
Parse Publication types from article Parameters
"""Parse Publication types from article

    Parameters
    ----------
    medline: Element
        The lxml node pointing to a medline document

    Returns
    -------
    publication_types: str
        String of semi-colon spearated publication types
    """
medline