python - Spacy returns empty results -


i've installed spacy following instructions on website python 2.7 using pip , downloaded english models, using pip, when run simple test code returns empty set result, when example online indicates should identify subject. think spacy not connecting models, , therefore not returning results, gives me no errors , indicates has connected properly.

from spacy.en import english  nlp = english() sent = "i shot elephant" doc = nlp(sent)  sub_toks = [tok tok in doc if (tok.dep_ == "nsubj")]  print sub_toks  

this returns [], no errors or other issues. how return result?

my problem english models didn't load correctly. when reinstalled saw despite fact command prompt said 'linked successfully' line above 'you not have sufficient rights perform operation', ran administrator , worked


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -