fulltext/process/psv.py
def _remove_Keyword(lines: List[str]) -> List[str]:
    """Remove sentences with the following keywords."""
    out = []
    prevline = ''
    saveline = ''

    for line in lines:
        prevline = saveline
        saveline = line

        if line.lower().startswith('arxiv'):
            continue
        if 'will be inserted by hand later' in line:
            continue
        if 'was prepared with the aas' in line:
            continue
        if (re.match(r'^\d+$', prevline) and
                re.match(r'university|institute', line, flags=re.IGNORECASE)):
            continue

        out.append(line)
    return out
Remove sentences with the following keywords.
Remove sentences with the following keywords.
Remove sentences with the following keywords .
def _remove_Keyword(lines: List[str]) -> List[str]:
    out = []
    prevline = ''
    saveline = ''
    for line in lines:
        prevline = saveline
        saveline = line
        if line.lower().startswith('arxiv'):
            continue
        if 'will be inserted by hand later' in line:
            continue
        if 'was prepared with the aas' in line:
            continue
        if (re.match(r'^\d+$', prevline) and
                re.match(r'university|institute', line, flags=re.IGNORECASE)):
            continue
        out.append(line)
    return out
def _remove_Keyword ( lines : List [ str ] ) -> List [ str ] : out = [ ] prevline = '' saveline = '' for line in lines : prevline = saveline saveline = line if line . lower ( ) . startswith ( 'arxiv' ) : continue if 'will be inserted by hand later' in line : continue if 'was prepared with the aas' in line : continue if ( re . match ( r'^\d+$' , prevline ) and re . match ( r'university|institute' , line , flags = re . IGNORECASE ) ) : continue out . append ( line ) return out
Remove sentences with the following keywords.
Remove sentences with the following keywords .
"""Remove sentences with the following keywords."""
lines
List[str]