NLUResult

@objc
public class NLUResult : NSObject

A simple data class that represents the result of an utterance classification.

  • The original utterance that was classified.

    Declaration

    Swift

    @objc
    public var utterance: String
  • The intent that the utterance was classified as.

    Declaration

    Swift

    @objc
    public var intent: String
  • Additional context included with the classification results.

    Declaration

    Swift

    @objc
    public var context: [String : Any]
  • The confidence level of the classification result.

    Declaration

    Swift

    @objc
    public var confidence: Float
  • The slot values present in the utterance.

    Declaration

    Swift

    @objc
    public var slots: [String : Slot]?
  • Undocumented

    Declaration

    Swift

    public override var description: String { get }
  • The initializer for the NLU result.

    Declaration

    Swift

    public init(utterance: String, intent: String, context: [String : Any] = [:], confidence: Float, slots: [String : Slot]?)

    Parameters

    utterance

    The original utterance that was classified.

    intent

    The intent that the utterance was classified as.

    context

    Additional context included with the classification results.

    confidence

    The confidence level of the classification result.

    slots

    The slot values present in the utterance.

  • The initializer for the NLU result.

    Declaration

    Swift

    public init(utterance: String, intent: String, context: [String : Any] = [:], confidence: Float)

    Parameters

    utterance

    The original utterance that was classified.

    intent

    The intent that the utterance was classified as.

    context

    Additional context included with the classification results.

    confidence

    The confidence level of the classification result.

    slots

    The slot values present in the utterance.