1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-12-22 13:08:13 +00:00
senpy/emotion-wnaffect
militarpancho b671ff51f9 Add support for py3 in emotion-wnaffect
Normalize polarity values in sentiment-basic and sentiment-140
2017-07-14 11:13:59 +02:00
..
emotion-wnaffect.py Add support for py3 in emotion-wnaffect 2017-07-14 11:13:59 +02:00
emotion-wnaffect.senpy Add support for py3 in emotion-wnaffect 2017-07-14 11:13:59 +02:00
emotion.py Add support for py3 in emotion-wnaffect 2017-07-14 11:13:59 +02:00
README.md updated links in readme for obtain resources 2017-05-05 11:00:40 +02:00
test_wna.py Plugins names updated 2017-01-25 18:58:27 +01:00
wnaffect.py Plugins names updated 2017-01-25 18:58:27 +01:00

WordNet-Affect plugin

This plugin uses WordNet-Affect (http://wndomains.fbk.eu/wnaffect.html) to calculate the percentage of each emotion. The plugin classifies among five diferent emotions: anger, fear, disgust, joy and sadness. It is has been used a emotion mapping enlarge the emotions:

  • anger : general-dislike
  • fear : negative-fear
  • disgust : shame
  • joy : gratitude, affective, enthusiasm, love, joy, liking
  • sadness : ingrattitude, daze, humlity, compassion, despair, anxiety, sadness

Usage

The parameters accepted are:

  • Language: English (en).
  • Input: Text to analyse.

Example request:

http://senpy.cluster.gsi.dit.upm.es/api/?algo=emotion-wnaffect&language=en&input=I%20love%20Madrid

Example respond: This plugin follows the standard for the senpy plugin response. For more information, please visit senpy documentation. Specifically, NIF API section.

The response of this plugin uses Onyx ontology developed at GSI UPM for semantic web.

This plugin uses WNAffect labels for emotion analysis.

The emotion-wnaffect.senpy file can be copied and modified to use different versions of wnaffect with the same python code.

Known issues

![alt GSI Logo][logoGSI] [logoGSI]: http://www.gsi.dit.upm.es/images/stories/logos/gsi.png "GSI Logo"