简体   繁体   English

如何从 TextBlob 情绪分析中找到强度

[英]How to find intensity from TextBlob sentiment analysis

I am using the sentiment analysis tool in the TextBlob package on Python 3.7.我正在使用 Python 3.7 上的 TextBlob package 中的情绪分析工具。 I am familiar with it and understand that it works on a basis of 3 values : polarity, subjectivity, and intensity.我熟悉它并理解它基于 3 个值起作用:极性、主观性和强度。 Polarity and subjectivity are standard output from TextBlob('string').sentiment , however TextBlob('string').intensity was sadly not successful.极性和主观性是来自TextBlob('string').sentiment的标准 output ,但遗憾的是TextBlob('string').intensity没有成功。 Any clues on this?这有什么线索吗?

I don't think there is an option to calculate the intensity in textblob library.我认为在 textblob 库中没有计算强度的选项。

1) Please refer to line 439 of the source code for the sentiment function: https://github.com/sloria/TextBlob/blob/dev/textblob/blob.py 1) 情感function: https://github.com/sloria/TextBlob/blob/dev/textblob/blob.py请参考源码第439行

It provides an option to calculate polarity and subjectivity but, there is no argument for intensity.它提供了计算极性和主观性的选项,但没有强度的论据。

2) If we talk about separate functions (mentioned by you), it is also not available in the source code. 2)如果我们谈论单独的功能(你提到的),它在源代码中也是不可用的。

3) The following link provides and shows that intensity and confidence are included but the source code lacks the function. 3) 以下链接提供并显示包含强度和置信度,但源代码缺少 function。

https://github.com/sloria/TextBlob/blob/eb08c120d364e908646731d60b4e4c6c1712ff63/textblob/en/en-sentiment.xml https://github.com/sloria/TextBlob/blob/eb08c120d364e908646731d60b4e4c6c1712ff63/textblob/en/en-sentiment.Z0F635D0E0F3874FFF8B581C132E6

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

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