|
|
|
@ -1,13 +1,13 @@
|
|
|
|
|
Introduction
|
|
|
|
|
------------
|
|
|
|
|
Conversion
|
|
|
|
|
----------
|
|
|
|
|
|
|
|
|
|
Senpy includes experimental support for emotion/sentiment conversion plugins.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use
|
|
|
|
|
---
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
Consider the original query: `http://127.0.0.1:5000/api/?i=hello&algo=emoRand`_
|
|
|
|
|
Consider the original query: http://127.0.0.1:5000/api/?i=hello&algo=emoRand
|
|
|
|
|
|
|
|
|
|
The requested plugin (emoRand) returns emotions using Ekman's model (or big6 in EmotionML):
|
|
|
|
|
|
|
|
|
@ -28,7 +28,7 @@ The requested plugin (emoRand) returns emotions using Ekman's model (or big6 in
|
|
|
|
|
|
|
|
|
|
To get these emotions in VAD space (FSRE dimensions in EmotionML), we'd do this:
|
|
|
|
|
|
|
|
|
|
`http://127.0.0.1:5000/api/?i=hello&algo=emoRand&emotionModel=emoml:fsre-dimensions`_
|
|
|
|
|
http://127.0.0.1:5000/api/?i=hello&algo=emoRand&emotionModel=emoml:fsre-dimensions
|
|
|
|
|
|
|
|
|
|
This call, provided there is a valid conversion plugin from Ekman's to VAD, would return something like this:
|
|
|
|
|
|
|
|
|
@ -87,7 +87,7 @@ It is also possible to get the original emotion nested within the new converted
|
|
|
|
|
Lastly, `conversion=filtered` would only return the converted emotions.
|
|
|
|
|
|
|
|
|
|
Developing a conversion plugin
|
|
|
|
|
------------------------------
|
|
|
|
|
================================
|
|
|
|
|
|
|
|
|
|
Conversion plugins are discovered by the server just like any other plugin.
|
|
|
|
|
The difference is the slightly different API, and the need to specify the `source` and `target` of the conversion.
|
|
|
|
|