简体   繁体   English

使用 TextBlob 库的最高极性得分(情绪分析)

[英]Highest Polarity Score (Sentiment Analysis) using the TextBlob library

I've started to use the TextBlob library;我已经开始使用 TextBlob 库; for sentiment analysis.用于情感分析。 I have run a few tests on a few phrases and I have the polarity and subjectivity score - fine.我已经对几个短语进行了一些测试,我有极性和主观性得分 - 很好。

What sentence would return the highest polarity value within TextBlob?哪个句子会返回 TextBlob 中最高的极性值?

For instance例如

"I really, really, really love and admire your beauty, my good friend" “我真的,真的,真的很喜欢和欣赏你的美,我的好朋友”

returns a polarity score of 0.6.返回 0.6 的极性分数。

I understand that +1.0 is the highest score (-1.0) is the least.我知道 +1.0 是最高分(-1.0)是最低分。

What sentence, have you found which returns a score closer to +1.0?什么句子,你有没有发现哪个返回的分数更接近 +1.0?

TextBlob("I really, really, really love and admire your beauty my good friend").sentiment Sentiment( polarity=0.6 , subjectivity=0.6000000000000001) TextBlob("我真的,真的,真的很喜欢和欣赏你的美,我的好朋友").sentiment Sentiment( polarity=0.6 ,subjectivity=0.6000000000000001)

TextBlob("I really, really, really love my place of work").sentiment Sentiment( polarity=0.5 , subjectivity=0.6) TextBlob("我真的,真的,真的很喜欢我的工作场所").sentiment 情绪(极性=0.5 ,主观性=0.6)

TextBlob("I really love my place of work").sentiment Sentiment( polarity=0.5 , subjectivity=0.6) TextBlob("我真的很喜欢我的工作场所").sentiment Sentiment( polarity=0.5 ,subjectivity=0.6)


I expect that the "really" should increase the sentiment score, at least a bit.我希望“真的”应该至少增加一点情绪分数。 (ie really, really like = at least 0.9) (即真的,真的很喜欢 = 至少 0.9)

I expect that the score overall, without the really (I really like my work) should return a score closer to 1.0.我希望总分,没有真的(我真的很喜欢我的工作)应该返回接近 1.0 的分数。

You can use .sentiment_assessments to get some more idea of how your sentence is being evaluated.您可以使用.sentiment_assessments来更多地了解您的句子是如何被评估的。

Sentiment(polarity=0.6, subjectivity=0.6000000000000001, assessments=[(['really', 'really', 'really', 'love'], 0.5, 0.6, None), (['good'], 0.7, 0.6000000000000001, None)])情绪(极性=0.6,主观性=0.6000000000000001,评估=[(['真的','真的','真的','爱'],0.5,0.6,无),(['好'],0.7,0.60000000000没有任何)])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM