NLUService
@objc
public protocol NLUService
A simple protocol for NLU services that provide intent classification and slot recognition, either on-device or via a network request.
-
The global configuration for all speech pipeline components.
Declaration
Swift
@objc var configuration: SpeechConfiguration { get set }
-
Delegate that receives NLU service events.
Declaration
Swift
@objc var delegates: [SpokestackDelegate] { get set }
-
The initializer for the NLU service.
Declaration
Swift
@objc init(_ delegates: [SpokestackDelegate], configuration: SpeechConfiguration) throws
Parameters
delegate
Delegate that receives NLU service events.
configuration
The global configuration for all speech pipeline components.
-
Classifies a user utterance into an intent, sending the result to the NLUDelegate.
Declaration
Swift
@objc func classify(utterance: String, context: [String : Any])
Parameters
utterance
The user utterance to be classified.
context
Any contextual information that should be sent along with the utterance to assist classification.