def get_text_from_doc(doc) -> str:
    """
    Build document text from title + abstract

    :param doc: S2 paper
    :return: Document text
    """

    text = ''

    if 'title' in doc:
        text += doc['title']

        if doc['abstract']:
            text += '\n' + doc['abstract']

    return text