ValueError 在 Word2vec 中解包
我有停用词和列表 1,希望在删除停用词后获得列表 2
stopwords= [" I ", " in ", " a ", " m ", " of ", " It ", " is "," all ", " about ", " you ", " to ", " at "]
list1 = ["I order food in a restaurant","I m fan of soccer","It is all about passion","you want to stay at home"]
list2 = [["order" "food","restaurant"],["fan","soccer"],["passion"],["want","stay","home"]
I have stopwords and list1 and want to get list 2 after removing stopwords
stopwords= [" I ", " in ", " a ", " m ", " of ", " It ", " is "," all ", " about ", " you ", " to ", " at "]
list1 = ["I order food in a restaurant","I m fan of soccer","It is all about passion","you want to stay at home"]
list2 = [["order" "food","restaurant"],["fan","soccer"],["passion"],["want","stay","home"]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道你的主题与你所呈现的代码有什么关系,但这里有一种方法可以完成你所要求的:
结果:
I don't know what your subject has to do with the code you're presenting, but here's a way to accomplish what you're asking for:
Result: