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

public class SentimentOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Analyzes the general sentiment of your content or the sentiment toward specific target phrases. You can analyze sentiment for detected entities with `entities.sentiment` and for keywords with `keywords.sentiment`.

Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish.

  • Method Details

    • newBuilder

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

      public Boolean document()
      Gets the document.

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

      Returns:
      the document
    • targets

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

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

      Returns:
      the targets
    • model

      public String model()
      Gets the model.

      (Beta) Enter a [custom model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) ID to override the standard sentiment model for all sentiment analysis operations in the request, including targeted sentiment for entities and keywords.

      Returns:
      the model