-
-
Save quantra-go-algo/d72b92c9fd47de2bc284e42c42ed9a94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doc = nlp(text) | |
# Split the text into sentences | |
sentences = [sentence.text for sentence in doc.sents] | |
# Print the original text | |
print(f"Original text: \n\n{text}\n{'-'*50}\n") | |
# Print the different sentences from the text | |
print( | |
f"We have split the above into {len(sentences)} sentences:\n\n 1. {sentences[0]}\n2. {sentences[1]}") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment