Open wangtao1321 opened 6 years ago
This is an issue of the 'spacy' module. If you downgrade to an older version of spacy (pip install -U spacy==1.9.0) you shouldn't get this error.
change spacy pipeline as
en.pipeline = [('tagger', en.tagger), ('parser', en.parser)]
Your solution works well for me. Thank you for solving it. (@darwinlc )
changing
en.pipeline = [en.tagger, en.parser]
to
en.pipeline = [('tagger', en.tagger), ('parser', en.parser)]
Environment:
Hellow,While Running yelp_prepare.py, I got error log as follow. The code has been ran with Yelp dataset round10 and tensorflow 1.1.0 and Python 3.5.2 in Linux.
0it [00:00, ?it/s] Traceback (most recent call last): File "yelp_prepare.py", line 98, in
make_data()
File "yelp_prepare.py", line 78, in make_data
for sent in en(review['text']).sents:
File "/home/wangtao/py35env/lib/python3.5/site-packages/spacy/language.py", line 330, in call
for name, proc in self.pipeline:
TypeError: 'Tagger' object is not iterable