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

text2vec报错 #3

Open
lgr1392585506 opened this issue Jun 13, 2021 · 1 comment
Open

text2vec报错 #3

lgr1392585506 opened this issue Jun 13, 2021 · 1 comment

Comments

@lgr1392585506
Copy link

lgr1392585506 commented Jun 13, 2021

您好,我运行时执行 texts_vec = [[model_word2vec[word] for word in text_cut if word in model_word2vec] for text_cut in texts_cut] 时引发报错: argument of type 'Word2Vec' is not iterable,请问有什么解决办法?

@renjunxiang
Copy link
Owner

你好,可能是gensim版本问题。这是挺早写的,gensim的细节不太记得了,就是遍历文本,查询词库词向量,拼接每个词语的词向量成为句向量,可以根据你的gensim相应版本自行debug修改

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

2 participants