yumeng5 / WeSTClass

[CIKM 2018] Weakly-Supervised Neural Text Classification
Apache License 2.0
77 stars 30 forks source link

TypeError: argument of type 'Word2Vec' is not iterable #5

Open filzahamjad opened 2 years ago

filzahamjad commented 2 years ago

running command: python main.py --dataset yelp --sup_source docs --model cnn i'm getting this error: ### Input preparation ### Loading existing Word2Vec model ./yelp/embedding... Traceback (most recent call last): File "main.py", line 185, in embedding_weights = train_word2vec(x, vocabulary_inv, args.dataset) File "main.py", line 46, in train_word2vec for key, word in vocabulary_inv.items()} File "main.py", line 46, in for key, word in vocabulary_inv.items()} TypeError: argument of type 'Word2Vec' is not iterable

zengjl20 commented 2 years ago

Hello, I have met the same problem. Have you solve this problem?

filzahamjad commented 2 years ago

@zengjl20 No. I went with conWea instead of this.

ozyyshr commented 1 year ago

I met the same problem. In my case, changing "embedding_model" to "embedding_model.wv" in line 46 of 'main.py' solved my problem.