【发布时间】:2019-02-23 16:42:39
【问题描述】:
我不确定我的错误在哪里,但这是我从index = plottest(doc) 收到错误的代码:
for doc in plottest:
for word in wordsunique:
if word in doc:
word = str(word)
index = plottest(doc)
positions = list(np.where(np.array(index) == word)[0])
idfs = tfidf(word,doc,plottest)
try:
worddic[word].append([index, positions, idfs])
except:
worddic[word] = []
worddic[word].append([index, positions, idfs])
【问题讨论】:
-
大概
plottest是一个列表,而您似乎认为它是一个函数。不能说更多,因为您没有告诉我们plottest的定义或分配位置。
标签: python list compiler-errors python-3.6