【发布时间】:2020-03-03 16:33:34
【问题描述】:
我对情绪分析很陌生。尝试使用 Stanford Sentiment Treebank(sst) 并遇到错误。
from nltk.tree import Tree
import os
import sst
trees = "C:\\Users\m\data\trees"
tree, score = next(sst.train_reader(trees))
[输出]:
AttributeError Traceback (most recent call last)
<ipython-input-19-4101f90b0b16> in <module>()
----> 1 tree, score = next(sst.train_reader(trees))
AttributeError: module 'sst' has no attribute 'train_reader'
【问题讨论】:
标签: python nlp stanford-nlp sentiment-analysis sst