WitOutcome

public struct WitOutcome : Codable

The result of wit’s interpretation.

  • The text that was sent to wit. Also part of WitResponse, but as wit includes it here too, so do we.

    Declaration

    Swift

    public let _text: String
  • The determined intent, such as ‘get_route’, ‘get_location’, ‘show_departures’, ‘wienbot’, etc.

    Declaration

    Swift

    public var intent: String
  • The confidence of wit’s interpretation, from 0.0 (0%) to 1.0 (100%). Optional.

    Declaration

    Swift

    public var confidence: Float?
  • A score of how well the requested text matches the returned story. Higher number is better. Has no explicit range but usually above 0 and below 10. Optional.

    Declaration

    Swift

    public var score: Float?
  • A dictionary of entities found. The key of the dictionary is also the name of the entity. Optional.

    Declaration

    Swift

    public var entities: [String : [WitEntity]]?
  • Non-Wit addition. Only available when multipleoutcomes == true. Array of Action to perform (message to outbut) by the client, if available. Dynamic answers are currently not outputted here and need to be resolved client-side via outcomes. Optional.

    Declaration

    Swift

    public var actions: [Action]?
  • Declaration

    Swift

    public init(from decoder: Decoder) throws