Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_all_sentences(body_text):
- sentences = []
- paragraphs = [p for p in body_text.split('\n') if p]
- for paragraph in paragraphs:
- sentences += tokenize.sent_tokenize(paragraph)
- return sentences
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement