检测文本背后的情绪,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第三方库


热门话题
尝试运行JFLAP。戴软呢帽的罐子23。Java正在抛出异常   无引用的java数组布尔复制   hibernate如何在java SE应用程序中使用JPA EntityManager   java如何使用ORMLite在SQLite中持久化JavaFX属性?   java无法将项目部署到GAE   java:谷歌地图维基百科层   java Resultset(getter/setter类)对象在第二次执行时未删除旧值   s中的java struts2:选择列表>请求的列表键“”作为集合/数组/映射/枚举/迭代器类型   java如何在Karaf 4.0.5中获得BaseDao中的entityManager?   java VSCode未从控制台读取西里尔文   java字体。createFromAsset()返回字体的空指针异常   java错误:将Android Studio从0.6.1更新到0.8.9后,没有合适的构造函数