PredictionsCategoryBehavior
public protocol PredictionsCategoryBehavior
Behavior of the Predictions category that clients will use
-
identify(_:
Asynchronousin: options: ) Detect contents of an image based on
IdentifyAction
Declaration
Swift
func identify<Output>( _ request: Predictions.Identify.Request<Output>, in image: URL, options: Predictions.Identify.Options? ) async throws -> Output
Parameters
type
The type of image detection you want to perform
image
The image you are sending
options
Parameters to specific plugin behavior
listener
Triggered when the event occurs
-
convert(_:
Asynchronousoptions: ) Declaration
Swift
func convert<Input, Options, Output>( _ request: Predictions.Convert.Request<Input, Options, Output>, options: Options? ) async throws -> Output
Parameters
request
options
Return 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.Result
Parameters
text
Text to interpret
options
Parameters to specific plugin behavior
options
Parameters to specific plugin behavior