How to use .sents method in spacy

ipython
nlp
python
spacy

#1

Hello everyone,
I am working on NLP. I have an object in unicode named ‘document’ which consists of one column of strings with educational details of individuals. I want to execute the following code on it.
for word in list(document.sents)[0]:
print word, word.tag_
The purpose is to print the parts of speech tags. But an error message is showing as given below
ValueError: sentence boundary detection requires the dependency parse, which requires data to be installed. If you haven’t done so, run:
python -m spacy download en
to install the data

After downloading the package spacy en , I tried to run the code. But still the same message has popped up. What should I do to fix it?


#2

@vikas_10 it is more of a spacy data download issue rather than a function issue (sents).

I recommend you to first install the required English data in your case and then try executing the above commands.