【发布时间】:2021-06-27 09:52:41
【问题描述】:
我正在运行以下代码
from rake_nltk import rake
import operator
stoppath = 'data/stoplists/SmartStoplist.txt'
rake_object = rake.Rake("SmartStopList.txt",5,3,2)
但是当我运行最后一行时,我得到以下错误
rake_object = rake.Rake("SmartStopList.txt",5,3,2)
Traceback (most recent call last):
File "<ipython-input-12-595e49e89adb>", line 1, in <module>
rake_object = rake.Rake("SmartStopList.txt",5,3,2)
File "C:\Users\kris\Anaconda3\lib\site-packages\rake_nltk\rake.py", line 64, in __init__
self.to_ignore = set(chain(self.stopwords, self.punctuations))
TypeError: 'int' object is not iterable
我不确定为什么会出现此错误。需要帮助
【问题讨论】: