Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
def find_sentences(text):
    return sentence_tagger.get_sentences(text)