def read(self, text: str): sentences = list() for sent in text.split(self.linesep + self.linesep): if len(sent)-1 > 0: sentences.append(self.sentence_parser.read(sent)) paragraph = Paragraph(sentences) document = Document() document.append(paragraph) return document
def read(self, text: str): # it parses the whole(!) analysed corpus sentences = list() for line in text.split(self.linesep): if len(line) > 0: sentences.append(self.sentence_parser.read(line)) paragraph = Paragraph(sentences) document = Document() document.append(paragraph) return document