我想知道是否可以让Sentimentia.polarity_scores()函数只打印负片和正片,并且可以去掉中性和复合结果 while i < len(Replaced_Data): print(Sentimentia.polarity_scores(data['Clean_TweetText'][i]))
output >>> {'neg': 0.214
我正在编写一个脚本,该脚本使用praw模块从Reddit中抓取评论,并使用nltk.sentiment的SentimentIntensityAnalyzer对被刮到的内容进行情感分析。post.body.lower() for post in submission.comments.list()])
return {**{'all_