python - 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
解决方案
推荐阅读
- r - 替换R中列中的重复元素
- python - 返回不包含超过某个最大长度的单词的字符串内容的行,同时保留和过滤掉包含某些内容的单词
- nuxt.js - 新的 fetch 不适用于 nuxtjs 中的组件
- ios - Xamarin.iOS 中的“必需的后台模式”实际上是什么意思?
- reactjs - 如何在 react-router ProtectedRoute 中访问 Redux 状态?
- android - 如何将 Android Byte [] 数组从 OnPreviewFrame 传递给 Zxing Decode(byte[])
- sql - SQL Oracle:查找使用视图/包/函数的最后一个时间戳
- python - 可以在 mac OS 机器上测试我的 docker 应用程序吗?
- swift - 如果值为 nil,则 Swfit XML Parse 不起作用
- php - 无法将问号(?)作为字符串从 sql 获取到 php