def fixCols(fin, fout): fin = os.path.abspath(fin) fout = os.path.abspath(fout) text = NER.getText(fin) txt = re.sub(r"(\nO)",'\n.\tO',text) NER.writeText(fout, txt)
def addNewlines(fin, fout): fin = os.path.abspath(fin) fout = os.path.abspath(fout) text = NER.getText(fin) txt = re.sub(r"(^[.|?|!].*)",'\\1\n',text) NER.writeText(fout, txt)