我有带有情感评分的词典,我想从标记化的推文中找到这些单词,然后添加评分[closed]

问题描述 投票:0回答:1
Keyword .   Score
fabulous    7.526

excellent   7.247

superb  7.199

alert   7.099

drop    6.922


#Tokenized tweets below

["b'just", 'saw', 'amazon', 'ticwatch', 'pro', '4g/lte', 'smartwatch', 'dual', 'displa', '...', 'mobvoi', '299.00']

["b'amazon", 'pricedrop', 'deal', '\\nprice', 'drop', 'alert', 'camelbak', 'eddy', 'kids', 'vacuum', 'insulated', 'stainless', 'steel', 'bottle', '12', 'oz', 'retro', 'floral\\navg', 'price', '16.00\\nnew', 'price', '12.17\\nprice', 'drop', '23.94', '\\nURL']

对于每个列表,我想查看与关键字匹配的总分例如]

Tweet 1 - 12.22

Tweet 2 - 7

有没有图书馆可以让我找到这样的单词?在这方面的任何帮助表示赞赏

关键字。得分出色的7.526出色的7.247一流的7.199警报7.099下降6.922#在[“ b'just”,“ saw”,“ amazon”,“ ticwatch”,“ pro”,“ 4g / lte”,“ smartwatch”,“以下的标记的推文。 ..

python twitter nlp sentiment-analysis
1个回答
1
投票

[如果您有关键字和得分的数据框,则可以将zip函数用作

© www.soinside.com 2019 - 2024. All rights reserved.