notebook.community
Edit and run
https://spacy.io/docs/usage/lightning-tour
In [1]: import spacy nlp = spacy.load('en')
import spacy nlp = spacy.load('en')
In [12]: en_doc = nlp(u'Hello, world. Here are two sentences.')
en_doc = nlp(u'Hello, world. Here are two sentences.')
In [13]: en_doc
en_doc
Out[13]: Hello, world. Here are two sentences.
Hello, world. Here are two sentences.
In [14]: len(en_doc)
len(en_doc)
Out[14]: 9
9
In [15]: en_doc.sents
en_doc.sents
Out[15]: <generator at 0xf1dc648>
<generator at 0xf1dc648>
In [16]: for sen in next(en_doc.sents): print(sen)
for sen in next(en_doc.sents): print(sen)
Hello , world .
In [ ]: