MLKitEntityExtraction Framework Reference

Type Definitions

The following type definitions are available globally.

  • @enum EntityExtractionEntityType The type of an extracted entity.

    Declaration

    Swift

    struct EntityType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • An enumeration of models supported by EntityExtractor.

    Declaration

    Swift

    struct EntityExtractionModelIdentifier : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • A block that handles an entity extraction result.

    Declaration

    Swift

    typealias EntityExtractorCallback = ([MLKEntityAnnotation]?, Error?) -> Void

    Parameters

    result

    An array of annotations for the text or nil if there’s an error.

    error

    The error or nil.

  • A block that is invoked when the entity extraction models are downloaded.

    Declaration

    Swift

    typealias EntityExtractorDownloadModelIfNeededCallback = (Error?) -> Void

    Parameters

    error

    The error or nil.