EmotionOptions
public struct EmotionOptions : Codable, Equatable
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.
-
Set this to
falseto hide document-level emotion results.Declaration
Swift
public var document: Bool? -
Emotion results will be returned for each target string that is found in the document.
Declaration
Swift
public var targets: [String]? -
Initialize a
EmotionOptionswith member variables.Declaration
Swift
public init( document: Bool? = nil, targets: [String]? = nil )Parameters
documentSet this to
falseto hide document-level emotion results.targetsEmotion results will be returned for each target string that is found in the document.
Return Value
An initialized
EmotionOptions.
View on GitHub
EmotionOptions Structure Reference