Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error While Running yelp_prepare.py #14

Open
wangtao1321 opened this issue Jan 18, 2018 · 3 comments
Open

Error While Running yelp_prepare.py #14

wangtao1321 opened this issue Jan 18, 2018 · 3 comments

Comments

@wangtao1321
Copy link

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

@gkaramanolakis
Copy link

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.

@darwinlc
Copy link

darwinlc commented Mar 8, 2018

change spacy pipeline as

en.pipeline = [('tagger', en.tagger), ('parser', en.parser)]

@HearyShen
Copy link

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:

  • spacy(2.0.9),
  • Python3.6.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants