MLKitEntityExtraction Framework Reference

  • EntityAnnotation objects store potential entities identified within a text segment.

  • The range property indicates the location of the annotated text within the original content.

  • An array of MLKEntity objects, representing the possible entities for the given text span, is stored in the entities property.

EntityAnnotation

class EntityAnnotation : NSObject

An object that contains the possible entities associated with a piece of the text.

  • The range of the annotation in the given text.

    Declaration

    Swift

    var range: NSRange { get }
  • A list of possible entities in the given span of text.

    Declaration

    Swift

    var entities: [MLKEntity] { get }