首页 > 解决方案 > Sentiment analysis comparing two lists assigning sentiment scores

问题描述

someone maybe can help me

This is my problem. I want to compare a dataframe (column name) containing sentences with words that have a sentiment score (word, score). The output at the end must provide a score for each sentence

dataframe

1.there is a great recession

2.great things happening

sentiment.txt:

recession, -0.58

great, 0.15

output:

1.there is a great recession, -0.43 (-0.58+0.15)

2.great things happening, 0.15

标签: pythonpandasnltk

解决方案


推荐阅读