检测文本背后的情绪,text2emotion包将帮助您理解文本测量中的情绪。

text2emotion的Python项目详细描述


什么是情感?在

情绪是一种与神经系统有关的生物状态,由神经生理变化引起,与思想、感觉、行为反应和某种程度的快乐或不愉快有关。 (来源:维基百科)

人类可以很容易地从文本中识别和体验情感。但是机器呢,它们能从文本中识别情感吗?在

你可以从python中提取情感
  • 处理任何文本信息并识别其中的情感。在
  • 兼容5种不同的情绪类别,如快乐、愤怒、悲伤、惊讶和恐惧。在

特点

1. Text Pre-processing

At first we have the major goal to perform data cleaning and make the content suitable for emotion analysis.

  • Remove the unwanted textual part from the message.
  • Perform the natural language processing techniques.
  • Bring out the well pre-processed text from the text pre-processing.
2. Emotion Investigation

Detect emotion from every word that we got from pre-processed text and take a count of it for further analytical process.

  • Find the appropriate words that express emotions or feelings.
  • Check the emotion category of each word.
  • Store the count of emotions relevant to the words found.
3. Emotion Analysis

After emotion investigation, there is the time of getting the significant output for the textual message we input earlier.

  • The output will be in the form of dictionary.
  • There will be keys as emotion categories and values as emotion score.
  • Higher the score of a particular emotion category, we can conclude that the message belongs to that category.

如何使用?在

Check Demo on Colab

应用程序部署

下面是用户使用Streamlit App实现的代码。在

  1. 输入文本。在
  2. 点击提交按钮。在
  3. 泰达!!以可视形式获取输出。在

Check Demo of App

让我们体验一下这个库,在web应用程序上测试您的多个用例,并检查库的性能是否符合您的期望。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用MVC设计模式观察嵌套对象   java将多个客户端连接到服务器   合并Java Web应用程序   Spring Security中未捕获java AuthenticationSuccessEvent   java Firebase JSON到Arraylist内部的Arraylist,存在对象问题   在Java15的sealedclasses特性中,final类和非密封类之间有什么区别?   java我可以使用数组。copyOf制作二维数组的防御副本?   java球不会在屏幕上移动   Java类如何在同一个文件中包含两个类?   java使用“Character.isWhiteSpace”删除所有空白   java阻止在RealmList中保存时创建领域对象   如何仅在ConnectionFactory上使用Java JMS身份验证   spring可以强制java对象在运行时实现接口吗?   socket无法在JAVA中使用TCP启用双工模式通信