Documentation - v1.5.3
    Preparing search index...

    Entity

    This class represents an entity in the annotations, containing start and end indices, label, and history of changes.

    Index

    Constructors

    • Constructor for the Entity class.

      Parameters

      • start: number

        The start index of the entity in the text.

      • end: number

        The end index of the entity in the text.

      • history: History[] = []

        An optional array of history entries for the entity.

      • labelClass: undefined | Label = undefined

        An optional label class for the entity.

      • reviewed: boolean = false

        Indicates if the entity has been reviewed.

      • OptionalcurrentState: string

        The current state of the entity.

      Returns Entity

      This constructor initializes the Entity with start and end indices, an optional history array, a label class, and a reviewed status.

    Properties

    currentState: undefined | string

    The current state of the entity, e.g., "active", "inactive".

    end: number

    The end index of the entity in the text.

    history: History[]

    An array to hold the history of label changes.

    labelClass: undefined | Label

    The label class of the entity.

    labelName: string

    The name of the label assigned to the entity.

    name: undefined | string

    The name of the last annotator.

    reviewed: boolean

    Indicates if the entity has been reviewed.

    start: number

    The start index of the entity in the text.

    Methods

    • Converts the Entity instance to a JSON object.

      Parameters

      • newAnnotator: string

        The name of the annotator for the export.

      Returns REF_EntityJSONFormat

      The JSON representation of the Entity.

      This method generates a JSON format for the entity, including start, end, history, and label information.