java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.natural_language_understanding.v1.model.EmotionOptions
All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel

public class EmotionOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or by the context around target phrases specified in the targets parameter. You can analyze emotion for detected entities with `entities.emotion` and for keywords with `keywords.emotion`.

Supported languages: English.

  • Method Details

    • newBuilder

      public EmotionOptions.Builder newBuilder()
      New builder.
      Returns:
      a EmotionOptions builder
    • document

      public Boolean document()
      Gets the document.

      Set this to `false` to hide document-level emotion results.

      Returns:
      the document
    • targets

      public List<String> targets()
      Gets the targets.

      Emotion results will be returned for each target string that is found in the document.

      Returns:
      the targets