Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. def get_all_sentences(body_text):
  2. sentences = []
  3. paragraphs = [p for p in body_text.split('\n') if p]
  4. for paragraph in paragraphs:
  5. sentences += tokenize.sent_tokenize(paragraph)
  6.  
  7. return sentences
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement