EmotionResult

public class EmotionResult : CustomStringConvertible, Codable

Representation of an emotion classification result. The supported emotions are:

"anger", "fear", "joy", "love", "neutral", "sadness" and "surprise"
  • Declaration

    Swift

    public var description: String { get }
  • Undocumented

    Declaration

    Swift

    public init()
  • Undocumented

    Declaration

    Swift

    public init(scores: [Double])
  • Declaration

    Swift

    public func getScore(for emotion: Emotion) -> Double

    Parameters

    emotion

    The emotion for which to get the score.

    Return Value

    The score for the given emotion.

  • Declaration

    Swift

    public func getHighestEmotion() -> Emotion

    Return Value

    The emotion with the highest score.