Watson NLU sentiment inconsistencies

48 views Asked by At

I have 2 very simple sentences which produce very different sentiment values from the IBM Watson NLU engine. So I am at a loss how to configure the APIs to handle each sentence consistently.

  "text": "WidgetX has been recently created. It is terrible.",
  "features": {
    "sentiment": {},
    "entities": {
      "sentiment": true
    },
    "keywords": {
      "sentiment": true
    }
  }

Produces a neutral sentiment:

  "keywords": [
    {
      "text": "WidgetX",
      "sentiment": {
        "score": 0,
        "label": "neutral"
      },
      "relevance": 0.5,
      "count": 1
    }
  ],
  "entities": [
    {
      "type": "Organization",
      "text": "WidgetX",
      "sentiment": {
        "score": 0,
        "label": "neutral"
      },
      "relevance": 0.978348,
      "count": 1,
      "confidence": 0.562355
    }
  ]

Whereas changing the text to below produces the correct very negative sentiment:

  "text": "WidgetX has been recently created, and it is terrible.",

  "keywords": [
    {
      "text": "WidgetX",
      "sentiment": {
        "score": -0.964476,
        "label": "negative"
      },
      "relevance": 0.5,
      "count": 1
    }
  ],
  "entities": [
    {
      "type": "Organization",
      "text": "WidgetX",
      "sentiment": {
        "score": -0.964476,
        "label": "negative"
      },
      "relevance": 0.978348,
      "count": 1,
      "confidence": 0.319847
    }
  ]
1

There are 1 answers

3
chughts On

This is interesting. The phrase

WidgetX has been recently created, and it is terrible.

is a single sentence. By context it can refer to a number of things the nominative noun WidgetX or the adverb recently or the verb created. So that one or more of the following is being stated.

  • WidgetX is terrible
  • That its creation was recent is terrible
  • That it has been created is terrible

In all cases its a negative statement.

The phrase

WidgetX has been recently created. It is terrible.

comprises of two sentences. The first sentence just states that WidgetX has been created, there is no emotion. There is no context in the second statement, just the pronoun it, where It might be related to the first sentence or it might not.