MLKitEntityExtraction Framework Reference

  • EntityExtractorRemoteModel is a class representing an entity extraction model stored remotely and downloaded for on-device usage.

  • It's initialized using a model identifier and leverages ModelManager for downloads, posting notifications during the process.

  • Developers can access the model's identifier through the modelIdentifier property.

  • Direct initialization via init() is unavailable; instead, utilize entityExtractorRemoteModel(identifier:) with the desired model identifier to get an instance.

EntityExtractorRemoteModel

class EntityExtractorRemoteModel : RemoteModel

An entity extraction model that is stored remotely on the server and downloaded on the device.

  • The model identifier of this model.

    Declaration

    Swift

    var modelIdentifier: EntityExtractionModelIdentifier { get }
  • Gets an instance of EntityExtractorRemoteModel configured with the given model identifier. This model can be used to trigger a download by calling the download(_:) API from ModelManager.

    EntityExtractorRemoteModel uses ModelManager internally. When downloading an EntityExtractorRemoteModel, there will be a notification posted for a RemoteModel. To verify if such notifications belong to an EntityExtractorRemoteModel, check that the ModelDownloadUserInfoKeyRemoteModel field in the user info dictionary contains an object of type EntityExtractorRemoteModel .

    Declaration

    Swift

    class func entityExtractorRemoteModel(identifier modelIdentifier: EntityExtractionModelIdentifier) -> EntityExtractorRemoteModel

    Parameters

    modelIdentifier

    The model identifier of the model.

    Return Value

    A EntityExtractorRemoteModel instance.

  • Unavailable.