def get_paragraphs(section): """Given a list of lines, where each line is a paragraph transforms them into a list of lists, where each sublist represents a sentence""" paragraphs = [] for line in section: if len(line.strip()) > 0: sentences = sentence_tagger.get_sentences(line) paragraphs.append(sentences) return paragraphs
def find_sentences(text): return sentence_tagger.get_sentences(text)