PredictionsCategory
final public class PredictionsCategory : Category
extension PredictionsCategory: Resettable
extension PredictionsCategory: PredictionsCategoryBehavior
extension PredictionsCategory: DefaultLogger
-
Declaration
Swift
public let categoryType: CategoryType
-
Adds
plugin
to the list of Plugins that implement functionality for this category.Declaration
Swift
public func add(plugin: PredictionsCategoryPlugin) throws
Parameters
plugin
The Plugin to add
-
Returns the added plugin with the specified
key
property.Declaration
Swift
public func getPlugin(for key: PluginKey) throws -> PredictionsCategoryPlugin
Parameters
key
The PluginKey (String) of the plugin to retrieve
Return Value
The wrapped plugin
-
Removes the plugin registered for
key
from the list of Plugins that implement functionality for this category. If no plugin has been added forkey
, no action is taken, making this method safe to call multiple times.Declaration
Swift
public func removePlugin(for key: PluginKey)
Parameters
key
The key used to
add
the plugin -
reset()
AsynchronousDeclaration
Swift
public func reset() async
-
identify(_:
Asynchronousin: options: ) Declaration
Swift
public func identify<Output>( _ request: Predictions.Identify.Request<Output>, in image: URL, options: Predictions.Identify.Options? = nil ) async throws -> Output
-
convert(_:
Asynchronousoptions: ) Declaration
Swift
public func convert<Input, Options, Output>( _ request: Predictions.Convert.Request<Input, Options, Output>, options: Options? = nil ) async throws -> Output
-
interpret(text:
Asynchronousoptions: ) Declaration
Swift
public func interpret( text: String, options: Predictions.Interpret.Options? = nil ) async throws -> Predictions.Interpret.Result
-
Declaration
Swift
public static var log: Logger { get }
-
Declaration
Swift
public var log: Logger { get }