ruidan / Unsupervised-Aspect-Extraction

Code for acl2017 paper "An unsupervised neural attention model for aspect extraction"
Apache License 2.0
338 stars 117 forks source link

Which version of gensim do you use? #6

Closed hrsma2i closed 6 years ago

hrsma2i commented 6 years ago

I read this issue,

https://github.com/ruidan/Unsupervised-Aspect-Extraction/issues/3

But I caught the following error.

Traceback (most recent call last):
  File "train.py", line 107, in <module>
    model = create_model(args, overall_maxlen, vocab)
  File "/home/hiroshimatsui/ruidan_abae/code/model.py", line 52, in create_model
    emb_reader = EmbReader(args.emb_path, emb_dim=args.emb_dim)
  File "/home/hiroshimatsui/ruidan_abae/code/w2vEmbReader.py", line 21, in __init__
    model = gensim.models.Word2Vec.load(emb_path)
  File "/home/hiroshimatsui/ruidan_abae/2abae/local/lib/python2.7/site-packages/gensim/models/word2vec.py", line 1485, in load
    model = super(Word2Vec, cls).load(*args, **kwargs)
  File "/home/hiroshimatsui/ruidan_abae/2abae/local/lib/python2.7/site-packages/gensim/utils.py", line 248, in load
    obj = unpickle(fname)
  File "/home/hiroshimatsui/ruidan_abae/2abae/local/lib/python2.7/site-packages/gensim/utils.py", line 912, in unpickle
    return _pickle.loads(f.read())
AttributeError: 'module' object has no attribute 'call_on_class_only'

Which version of gensim should I install?

Thanks.

ruidan commented 6 years ago

Are you sure your gensim version is 0.12.4? As it works correctly on my side.

hrsma2i commented 6 years ago

@ruidan Thanks. It works.