我必须对一些情绪进行分类,我的数据框是这样的
Phrase Sentiment
is it good movie positive
wooow is it very goode positive
bad movie negative
Run Code Online (Sandbox Code Playgroud)
我做了一些预处理作为标记化停止词干...等我得到
Phrase Sentiment
[ good , movie ] positive
[wooow ,is , it ,very, good ] positive
[bad , movie ] negative
Run Code Online (Sandbox Code Playgroud)
我需要最终得到一个数据帧,该行是文本,其值是tf_idf,列是像这样的单词
good movie wooow very bad Sentiment
tf idf tfidf_ tfidf tf_idf tf_idf positive
Run Code Online (Sandbox Code Playgroud)
(其余两条线也一样)