Sentiments#

Application ID eot_sentiments

Application Aliases sentiments.app eot/sentiments.app

Description#

The sentiments application enables you to extract sentiments from your documents, positive or negative, as well as a percentage of positives and negatives per file. Note that the app will resolve names and Pronouns like she or he in the sentiment results. Which means that de result from ‘He is a nice person.’ will be ‘John Smith is a nice person.’ If ‘John Smith’ is referent to ‘he’

Configuration#

The configuration is an object defined as (bold = required, italic = optional):

  • context (array[number,(number)]) – A list of relative sentence index ranges

Example#

Identifying the sentiments:

Note

We need to include the entity domain to resolve the anaphora.

wow -p 'english,entity,sentiment,sentiments.app' \
    -i "John Dow is a very nice Person, but he sucks at football.'"

which yields:

eot_sentiments#
{
    "positive": 50.0,
    "negative": 50.0,
    "sentiments": [
        {
            "polarity": "positive",
            "text": "John Dow is a very nice Person",
            "begin_offset": 0,
            "end_offset": 30,
            "object": "John Dow",
            "adjective": "nice"
        },
        {
            "polarity": "negative",
            "text": "John Dow sucks",
            "begin_offset": 36,
            "end_offset": 44,
            "object": "John Dow",
            "expression": "suck",
            "comp": "intrans",
            "verb": "suck"
        }
    ]
}

For an interpretation of the JSON data, refer to the application’s JSON schema.