我试着按顺序把句子列表输入gensim.models.Word2Vec,但它生成TypeError:“\u Token”对象不可读取。我该怎么办?在
embedding_model= Word2Vec()
for index, sentence_list in df.iterrows():
embedding_model = Word2Vec(sentence_list, size=100, window=5, min_count=2, workers=2)
embedding_model.train(tokenized_contents, total_examples=len(tsentence_list), epochs=10)
谢谢你的快速反应。我的错误是把纯句子而不是标记列表放在一起。但是,我仍然在为Word2Vec的顺序输入而挣扎。以下是我的示例数据、代码和错误:
相关问题 更多 >
编程相关推荐