【发布时间】:2017-06-13 17:43:33
【问题描述】:
我必须对一些情绪进行分类,我的数据框是这样的
Phrase Sentiment
is it good movie positive
wooow is it very goode positive
bad movie negative
我做了一些预处理,如标记化停止词词干等......我得到了
Phrase Sentiment
[ good , movie ] positive
[wooow ,is , it ,very, good ] positive
[bad , movie ] negative
我最终需要得到一个数据框,其中行是文本,值为 tf_idf,列是这样的词
good movie wooow very bad Sentiment
tf idf tfidf_ tfidf tf_idf tf_idf positive
(same thing for the 2 remaining lines)
【问题讨论】:
标签: python pandas dataframe text-mining tf-idf