cur_paragraph.append(line)
if len(cur_paragraph) > 0:
paragraph = " ".join(cur_paragraph)
paragraphs.append(paragraph)return paragraphs
class TxtParser(Agent):
def __init__(self, hg, lang, sequence=None):
After Change
for line in f.readlines():
paragraph = line.strip()
if len(paragraph) > 0:
yield paragraph
class TxtParser(Agent):
def __init__(self, hg, lang, sequence=None):