Documentation - v1.5.3
    Preparing search index...

    Annotation Manager

    This class manages annotations imported from a text or JSON file in the Rich Entity Format (REF).

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    annotations: Paragraph[]

    An array of paragraphs with annotations.

    Accessors

    • get inputSentences(): object[]

      Get all input sentences from the annotations.

      Returns object[]

      An array of objects containing the ID and text of each input sentence.

      This method extracts input sentences from the annotations, where each sentence is represented as an object with an ID and text.

    Methods

    • Returns new instance of AnnotationManager from a JSON file.

      Parameters

      • json: string

        The JSON content of the file.

      Returns AnnotationManager

      A new instance of AnnotationManager created from the JSON.

      This method processes a JSON file, parsing it into an object and creating a new AnnotationManager instance.

    • Returns new instance of AnnotationManager from a text file.

      Parameters

      • text: string

        The text content of the file.

      Returns AnnotationManager

      A new instance of AnnotationManager created from the text.

      This method processes a text file, splitting it into paragraphs based on double newlines, and creates a new AnnotationManager instance.