fulltext/process/psv.py
def _remove_BadEOL(lines: List[str]) -> List[str]:
    """Remove eols in the middle of sentence."""
    out = ['']
    prevline = ''

    for line in lines:
        line = re.sub(r'- $', '', line)

        if re.match(r'^[a-z]', line) and not re.match(r'\. $', prevline):
            out.append(out.pop() + line)
        else:
            out.append(line)
        prevline = line
    return out
Remove eols in the middle of sentence.
Remove eols in the middle of sentence.
Remove eols in the middle of sentence .
def _remove_BadEOL(lines: List[str]) -> List[str]:
    out = ['']
    prevline = ''
    for line in lines:
        line = re.sub(r'- $', '', line)
        if re.match(r'^[a-z]', line) and not re.match(r'\. $', prevline):
            out.append(out.pop() + line)
        else:
            out.append(line)
        prevline = line
    return out
def _remove_BadEOL ( lines : List [ str ] ) -> List [ str ] : out = [ '' ] prevline = '' for line in lines : line = re . sub ( r'- $' , '' , line ) if re . match ( r'^[a-z]' , line ) and not re . match ( r'\. $' , prevline ) : out . append ( out . pop ( ) + line ) else : out . append ( line ) prevline = line return out
Remove eols in the middle of sentence.
Remove eols in the middle of sentence .
"""Remove eols in the middle of sentence."""
lines
List[str]