Documentation - v1.7.0
    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

    Methods

    • Converts the AnnotationManager instance to RDF format.

      Parameters

      • labelManager: LabelManager

        Instance of LabelManager to include labels in the RDF export

      Returns string

      RDF representation of the annotations

    • 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.