PredictionsCategory

final public class PredictionsCategory : Category
extension PredictionsCategory: Resettable
extension PredictionsCategory: PredictionsCategoryBehavior
extension PredictionsCategory: DefaultLogger

Plugin handling

  • 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 for key, 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() Asynchronous

    Declaration

    Swift

    public func reset() async
  • Declaration

    Swift

    public func identify<Output>(
        _ request: Predictions.Identify.Request<Output>,
        in image: URL,
        options: Predictions.Identify.Options? = nil
    ) async throws -> Output
  • convert(_:options:) Asynchronous

    Declaration

    Swift

    public func convert<Input, Options, Output>(
        _ request: Predictions.Convert.Request<Input, Options, Output>,
        options: Options? = nil
    ) async throws -> Output
  • Declaration

    Swift

    public func interpret(
        text: String,
        options: Predictions.Interpret.Options? = nil
    ) async throws -> Predictions.Interpret.Result
  • log

    Declaration

    Swift

    public static var log: Logger { get }
  • log

    Declaration

    Swift

    public var log: Logger { get }