Class SentimentOptions
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.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SentimentOptions.Builder
Builder. -
Method Summary
Modifier and Type Method Description Boolean
document()
Gets the document.String
model()
Gets the model.SentimentOptions.Builder
newBuilder()
New builder.List<String>
targets()
Gets the targets.Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel
equals, hashCode, toString
-
Method Details
-
newBuilder
New builder.- Returns:
- a SentimentOptions builder
-
document
Gets the document.Set this to `false` to hide document-level sentiment results.
- Returns:
- the document
-
targets
Gets the targets.Sentiment results will be returned for each target string that is found in the document.
- Returns:
- the targets
-
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
-