【发布时间】:2021-06-04 11:40:21
【问题描述】:
我正在尝试计算文件reviews_english 中的tokenized 列中某个单词被提及的次数。
tokenized 列如下所示{restaurant, Juni, 2019, Arrogante, service, ..}。使用我当前的代码,我收到以下错误消息
TypeError: unhashable type: 'set'
import collections
from collections import Counter
counts = collections.Counter(reviews_english['tokenized'])
【问题讨论】:
标签: python counter sentiment-analysis review