a guest Jul 19th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- sen = "A fawn was racing in the forest!He was ahead of the rabbit?He
- was ahead of the elephant."
- nlp = spacy.load('en')
- nlp.add_pipe(nlp.create_pipe('sentencizer'), first=True)
- doc = nlp(sen)
- sentences = [sent.string.strip() for sent in doc.sents]
- "A fawn was racing in the forest!"
- "He was ahead of the rabbit?"
- "He was ahead of the elephant."
RAW Paste Data