我正在使用下面的代码并从 nltk 导入停用词
#from nltk.corpus import words as word_corp
from nltk.corpus import stopwords
nlp = spacy.load('en_core_web_sm')
phrase_matcher = PhraseMatcher(nlp.vocab)
en_words = nltk.corpus.words.words('en')
stop_words = stopwords.words('english')
Run Code Online (Sandbox Code Playgroud)
但错误就是AttributeError: 'getset_descriptor' object has no attribute 'setdefault' for ----> 3 nlp = spacy.load('en_core_web_sm')
这一行。