PredictionsCategory
public final class PredictionsCategory : Category
extension PredictionsCategory: Resettable
extension PredictionsCategory: PredictionsCategoryBehavior
extension PredictionsCategory: DefaultLogger
-
Declaration
Swift
public let categoryType: CategoryType
-
Adds
pluginto the list of Plugins that implement functionality for this category.Declaration
Swift
public func add(plugin: PredictionsCategoryPlugin) throwsParameters
pluginThe Plugin to add
-
Returns the added plugin with the specified
keyproperty.Declaration
Swift
public func getPlugin(for key: PluginKey) throws -> PredictionsCategoryPluginParameters
keyThe PluginKey (String) of the plugin to retrieve
Return Value
The wrapped plugin
-
Removes the plugin registered for
keyfrom 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
keyThe key used to
addthe 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<Options, Output>( _ request: Predictions.Convert.Request<some Any, 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 }
View on GitHub