You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
senpy/emotion-wnaffect
militarpancho 65b8873092 cambios 7 years ago
..
README.md Added some documentation and changes to .senpy files. 8 years ago
emotion-wnaffect.py cambios 7 years ago
emotion-wnaffect.senpy cambios 7 years ago
emotion.py Plugins names updated 8 years ago
test_wna.py Plugins names updated 8 years ago
wnaffect.py Plugins names updated 8 years ago

README.md

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

  • This plugin uses the pattern library, which means it will only run on python 2.7
  • Wnaffect and corpora files are not included in the repository, but can be easily added either to the docker image (using a volume) or in a new docker image.

alt GSI Logo