PredictionsCategoryBehavior
public protocol PredictionsCategoryBehavior
Behavior of the Predictions category that clients will use
-
identify(_:Asynchronousin: options: ) Detect contents of an image based on
IdentifyActionDeclaration
Swift
func identify<Output>( _ request: Predictions.Identify.Request<Output>, in image: URL, options: Predictions.Identify.Options? ) async throws -> OutputParameters
typeThe type of image detection you want to perform
imageThe image you are sending
optionsParameters to specific plugin behavior
listenerTriggered when the event occurs
-
convert(_:Asynchronousoptions: ) Declaration
Swift
func convert<Options, Output>( _ request: Predictions.Convert.Request<some Any, Options, Output>, options: Options? ) async throws -> OutputParameters
requestoptionsReturn Value
-
interpret(text:Asynchronousoptions: ) Interpret the text and return sentiment analysis, entity detection, language detection, syntax detection, key phrases detection
Declaration
Swift
func interpret( text: String, options: Predictions.Interpret.Options? ) async throws -> Predictions.Interpret.ResultParameters
textText to interpret
optionsParameters to specific plugin behavior
optionsParameters to specific plugin behavior
View on GitHub