fulltext/process/psv.py
def process_text(txt: str) -> Tuple[str, str]:
    """
    Convert a single string to a list of lines giving the PSV and references.

    Parameters
    ----------
    txt : string
        The full text of an article, typically as extracted from PDF

    Returns
    -------
    psv : string
        The extracted PSV as a single string object

    ref : string
        The cleaned reference section with lines separated by newline
    """
    txt = _recover_accents(txt)

    # rest of code expects \n terminated lines (^J, ^K, ^L, ^M)
    lines = [l+'\n' for l in re.split(r'[\x0a-\x0d]+', txt)]

    psv, ref = split_on_references(lines)
    psv_composed = '\n'.join(tidy_txt_from_pdf(psv))
    ref_composed = '\n'.join(tidy_txt_from_pdf(ref))
    return psv_composed, ref_composed

    Convert a single string to a list of lines giving the PSV and references.

    Parameters
    ----------
    txt : string
        The full text of an article, typically as extracted from PDF

    Returns
    -------
    psv : string
        The extracted PSV as a single string object

    ref : string
        The cleaned reference section with lines separated by newline
    
Convert a single string to a list of lines giving the PSV and references.
Parameters

txt : string
The full text of an article, typically as extracted from PDF

Returns

psv : string
The extracted PSV as a single string object

ref : string
The cleaned reference section with lines separated by newline
Convert a single string to a list of lines giving the PSV and references . Parameters txt : string The full text of an article typically as extracted from PDF Returns psv : string The extracted PSV as a single string object ref : string The cleaned reference section with lines separated by newline
def process_text(txt: str) -> Tuple[str, str]:
    txt = _recover_accents(txt)
    lines = [l+'\n' for l in re.split(r'[\x0a-\x0d]+', txt)]
    psv, ref = split_on_references(lines)
    psv_composed = '\n'.join(tidy_txt_from_pdf(psv))
    ref_composed = '\n'.join(tidy_txt_from_pdf(ref))
    return psv_composed, ref_composed
def process_text ( txt : str ) -> Tuple [ str , str ] : txt = _recover_accents ( txt ) lines = [ l + '\n' for l in re . split ( r'[\x0a-\x0d]+' , txt ) ] psv , ref = split_on_references ( lines ) psv_composed = '\n' . join ( tidy_txt_from_pdf ( psv ) ) ref_composed = '\n' . join ( tidy_txt_from_pdf ( ref ) ) return psv_composed , ref_composed
Convert a single string to a list of lines giving the PSV and references.
Convert a single string to a list of lines giving the PSV and references .
"""
    Convert a single string to a list of lines giving the PSV and references.

    Parameters
    ----------
    txt : string
        The full text of an article, typically as extracted from PDF

    Returns
    -------
    psv : string
        The extracted PSV as a single string object

    ref : string
        The cleaned reference section with lines separated by newline
    """ # rest of code expects \n terminated lines (^J, ^K, ^L, ^M)
txt
str