pubmed_parser/medline_parser.py
def parse_keywords(medline):
    """Parse keywords from article, separated by ;

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

    Returns
    -------
    keywords: str
        String of concatenated keywords.
    """
    keyword_list = medline.find('KeywordList')
    keywords = list()
    if keyword_list is not None:
        for k in keyword_list.findall('Keyword'):
            if k.text is not None:
                keywords.append(k.text)
        keywords = '; '.join(keywords)
    else:
        keywords = ''
    return keywords
Parse keywords from article, separated by ;

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

    Returns
    -------
    keywords: str
        String of concatenated keywords.
    
Parse keywords from article, separated by ;
Parameters

Element
The lxml node pointing to a medline document

Returns

str
String of concatenated keywords.
Parse keywords from article separated by ; Parameters Element The lxml node pointing to a medline document Returns str String of concatenated keywords .
def parse_keywords(medline):
    keyword_list = medline.find('KeywordList')
    keywords = list()
    if keyword_list is not None:
        for k in keyword_list.findall('Keyword'):
            if k.text is not None:
                keywords.append(k.text)
        keywords = '; '.join(keywords)
    else:
        keywords = ''
    return keywords
def parse_keywords ( medline ) : keyword_list = medline . find ( 'KeywordList' ) keywords = list ( ) if keyword_list is not None : for k in keyword_list . findall ( 'Keyword' ) : if k . text is not None : keywords . append ( k . text ) keywords = '; ' . join ( keywords ) else : keywords = '' return keywords
Parse keywords from article, separated by ;
Parameters
Parse keywords from article separated by ; Parameters
"""Parse keywords from article, separated by ;

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

    Returns
    -------
    keywords: str
        String of concatenated keywords.
    """
medline