emotion数据集下载
Emotion is the state of mind that is aligned with feelings, and thoughts usually directed toward a specific object. Emotion is a behavior that reflects personal significance or opinion regarding the interaction we have with other human beings or related to a certain event. The human being is able to identify the emotions from textual data and can understand the matter of the text. But if you think about the machines, can they able to identify the emotions from the text?
Ë运动是有感情对准心态,和思想通常向特定对象定向。 情感是一种行为,它反映了我们与他人互动或与某个事件相关的个人重要性或看法。 人类能够从文本数据中识别出情感并能够理解文本的内容。 但是,如果您考虑一下这些机器,它们是否能够从文本中识别出情感?
From this article, you will understand how to use this python package and extract the emotions from the text data.
通过本文,您将了解如何使用此python包以及如何从文本数据中提取情感。
What is text2emotion?
什么是text2emotion?
How to use it?
如何使用它?
Industry Use Case Details
行业用例详细信息
Conclusion
结论
Key Takeaways
重要要点
Photo by Toshi on Unsplash 由 Toshi在 Unsplash上 拍摄Don’t worry, I will take care that you won’t get tired of reading this article and will try to explain it in the easiest way.
不用担心,我会确保您不会厌倦阅读本文,并尝试以最简单的方式进行解释。
Let’s get started,
让我们开始吧,
Text2emotion is the python package developed with the clear intension to find the appropriate emotions embedded in the text data. The research says that when the human is in the thinking process and he is damn sure about his statement then he will express his emotions in the right context of manner and it will be proper aligned in case of words expressing those emotions.
Text2emotion是使用python包开发的,其意图很明显,即可以找到嵌入文本数据中的适当情感。 研究表明,当人类处于思维过程中并且对自己的陈述感到确定时,他将以正确的方式表达自己的情感,并且在表达这些情感的单词的情况下能够正确对齐。
If I want to tell you in simple words then consider if the customer did not like the product by investing the large amount then he will surely give his feedback like “I am very angry by your product services and gonna file a complaint regarding this issue”. When you read this kind of feedback then you will be sure that the customer is completely angry about product services and we have to improve it as soon as possible. Text2emotion works, in the same manner, to extract the emotions from the text.
如果我想简单地告诉您,然后考虑客户是否通过大量投资不喜欢该产品,那么他一定会给出反馈,例如“我对您的产品服务感到非常生气,并会就此问题进行投诉” 。 当您阅读此类反馈时,您将确定客户对产品服务完全生气,我们必须尽快对其进行改进。 Text2emotion以相同的方式从文本中提取情感。
Let’s conclude this, Text2Emotion is the python package that will assist you to pull out the emotions from the content.
让我们总结一下, Text2Emotion是python软件包,它将帮助您从内容中提取情感。
Processes any textual data, recognizes the emotion embedded in it, and provides the output in the form of a dictionary. 处理任何文本数据,识别其中嵌入的情感,并以字典的形式提供输出。Well suited with 5 basic emotion categories such as Happy, Angry, Sad, Surprise, and Fear.
非常适合5种基本情感类别,例如“快乐” ,“愤怒” ,“悲伤” ,“惊喜”和“恐惧” 。
The best way to install the text2emotion package is by using pip.
安装text2emotion软件包的最佳方法是使用pip。
#Install package using pippip install text2emotionLet’s import the necessary libraries that you require to build your model.
让我们导入构建模型所需的必要库。
#Import the modulesimport text2emotion as teGet some content to evaluate the performance.
获取一些内容以评估性能。
text = "I was asked to sign a third party contract a week out from stay. If it wasn't an 8 person group that took a lot of wrangling I would have cancelled the booking straight away. Bathrooms - there are no stand alone bathrooms. Please consider this - you have to clear out the main bedroom to use that bathroom. Other option is you walk through a different bedroom to get to its en-suite. Signs all over the apartment - there are signs everywhere - some helpful - some telling you rules. Perhaps some people like this but It negatively affected our enjoyment of the accommodation. Stairs - lots of them - some had slightly bending wood which caused a minor injury."Now we have to call the get_emotion() function using the above-defined text parameter.
现在,我们必须使用上面定义的text参数调用get_emotion()函数。
#Call to the functionte.get_emotion(text)#The output we received,{'Angry': 0.12, 'Fear': 0.42, 'Happy': 0.04, 'Sad': 0.33, 'Surprise': 0.08}Here, we got the output in terms of the dictionary where we have emotion categories along with the respective score.
在这里,我们获得了字典形式的输出,其中包含了情感类别以及相应的分数。
Now, if we think about the scores of the relative emotion categories then the Fear score is 0.42 & the Sad score is 0.33. So on the overall analysis, we can say that the statement we took as input has the Fear & Sad tone.
现在,如果我们考虑相对情感类别的得分,则恐惧得分为0.42 ,悲伤得分为0.33 。 所以对整体的分析,我们可以说,我们采取了作为输入的语句的恐惧和悲伤的基调。
The good thing about the package is, it is able to identify the emotion from the emojis which describes human behavior. Let’s take an example,
关于包装的好处是,它能够从描述人类行为的表情符号中识别出情感。 让我们举个例子
text = "Day was pretty amazing😃😃"te.get_emotion(text)#Output{'Angry': 0.0, 'Fear': 0.0, 'Happy': 0.8, 'Sad': 0.0, 'Surprise': 0.2}From the output, you can conclude that the text input belongs to the Happy and Surprise emotion category.
从输出中,您可以得出结论,文本输入属于“高兴和惊喜”情感类别。
We have designed a web app for you where you can experiment with all these things. I provide the link below, feel free to check it.
我们为您设计了一个Web应用程序,您可以在其中尝试所有这些内容。 我提供以下链接,请随时检查。
Enter the text in the input box.
在输入框中输入文字。
Web app demo 网络应用演示2. Hit the submit button and get the output.
2.点击提交按钮并获得输出。
Web app output 网络应用输出Check out the web app here.
在此处查看网络应用程序。
Consider as an organization, we always concern about the opinions, feedback, or improvements from the customers. What does the customer think about our product? he may be happy or sad or angry also because of the services provided by the organization you never know about it. This is the condition where text2emotion can be your savior. Here, I will discuss two real industry use cases.
考虑作为一个组织,我们始终关注客户的意见,反馈或改进。 客户如何看待我们的产品? 由于您从未了解的组织提供的服务,他可能会感到高兴,悲伤或愤怒。 这是text2emotion可以成为您的救星的条件。 在这里,我将讨论两个实际的行业用例。
Analyzing the input received from customers through various sources such as textual data from chat-bots, logs from contact centers, emails, etc. Tracking these tone signals can help Customer Service Managers improve how their teams interact with customers.
分析收到的输入 通过各种来源(例如来自聊天机器人的文本数据,联系中心的日志,电子邮件等)从客户那里获取信息。跟踪这些音调信号可以帮助客户服务经理改善其团队与客户的互动方式。
In today’s digital world Brand Monitoring and reputation management has become one of the most important aspects of every business unit. This is where emotion analysis comes into the picture. It will help companies by allowing them: In tracking the perception of the company by the consumers, in pointing out the attitude of the consumers by giving specific details, finding different patterns and trends, in keeping a close look on the demonstration by the influencers.
在当今的数字世界中,品牌监控和声誉管理已成为每个业务部门最重要的方面之一。 这就是情感分析进入现实的地方。 它将通过以下方式为公司提供帮助:跟踪消费者对公司的看法,通过提供具体细节,发现不同的模式和趋势,密切关注影响者的示威活动来指出消费者的态度。
I hope you got the idea about the basic functionalities provided by this library and how it can be useful for different industry use cases. If you like the package and want to design some interesting implementations and come up with innovative industry use case examples then it will be our pleasure to showcase it.
希望您对这个库提供的基本功能有所了解,以及它如何对不同的行业用例有用。 如果您喜欢该程序包并希望设计一些有趣的实现并提出创新的行业用例示例,那么我们很乐意展示它。
Text2emotion Documentation
Text2emotion文档
Google Colab Demo
Google Colab演示
Website Details
网站详情
Thank you for reading the article.
感谢您阅读这篇文章。
翻译自: https://towardsdatascience.com/text2emotion-python-package-to-detect-emotions-from-textual-data-b2e7b7ce1153
emotion数据集下载
相关资源:CK+ 表情数据集