SentimentOptions
public struct SentimentOptions : Codable, Equatable
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.
-
Set this to
false
to hide document-level sentiment results.Declaration
Swift
public var document: Bool?
-
Sentiment results will be returned for each target string that is found in the document.
Declaration
Swift
public var targets: [String]?
-
(Beta) Enter a custom model ID to override the standard sentiment model for all sentiment analysis operations in the request, including targeted sentiment for entities and keywords.
Declaration
Swift
public var model: String?
-
Initialize a
SentimentOptions
with member variables.Declaration
Swift
public init( document: Bool? = nil, targets: [String]? = nil, model: String? = nil )
Parameters
document
Set this to
false
to hide document-level sentiment results.targets
Sentiment results will be returned for each target string that is found in the document.
model
(Beta) Enter a custom model ID to override the standard sentiment model for all sentiment analysis operations in the request, including targeted sentiment for entities and keywords.
Return Value
An initialized
SentimentOptions
.