0

I think I am missing something, but I don't manage to get POS and lemma results even when I just try their example:

import spacy
nlp = spacy.load('en')
doc = nlp(u'They told us to duck.')
for word in doc:
    print(word.text, word.lemma, word.lemma_, word.tag, word.tag_, word.pos, word.pos_)

I get:

(u'They', 0, u'', 0, u'', 0, u'')
(u'told', 0, u'', 0, u'', 0, u'')
(u'us', 0, u'', 0, u'', 0, u'')
(u'to', 0, u'', 0, u'', 0, u'')
(u'duck', 0, u'', 0, u'', 0, u'')
(u'.', 0, u'', 0, u'', 0, u'')

I am in 64bit python 2.7

student
  • 511
  • 1
  • 5
  • 20

1 Answers1

1

It looks like the english model is not available. Did you download it as described [here] (https://spacy.io/docs/usage/)?

A note on the documented procedure: There sometimes seem to be some ssl-related issues with downloading the model via terminal (for MacOS there is a solution, unfortunately only for python3).

The good news is that it seems that they fixed it in that you are now able to download the models manually as described here (it's quite a long thread - scroll to the very bottom of it and look for the response by ines. At the time of writing it is the third last answer).

Hope this helps!

Community
  • 1
  • 1
jfrehner
  • 56
  • 5