Last active
July 23, 2021 06:11
-
-
Save jabirjamal/7578038a42103f02beb723bc41e750b9 to your computer and use it in GitHub Desktop.
Sentence segmentation
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
import spacy | |
nlp = spacy.load("en_core_web_md") | |
text = "I flew to Melbourne yesterday. I was at my hotel at 5 pm." | |
doc = nlp(text) | |
for sent in doc.sents: | |
print("***") | |
print(sent.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment