Learn R Programming

textAnnotatoR (version 1.0.1)

create_plain_text_annotations: Create plain text version of annotations

Description

Converts annotated text to plain text format with code markers. Each annotation is represented as a code identifier and annotated text wrapped in square brackets. Multiple annotations are preserved and shown in order of appearance in the text.

Usage

create_plain_text_annotations(text, annotations)

Value

Character string containing formatted text with code markers

Arguments

text

Character string containing the original text

annotations

Data frame of annotations with columns:

  • start: Numeric vector of starting positions

  • end: Numeric vector of ending positions

  • code: Character vector of code names