Learn R Programming

textAnnotatoR (version 1.0.1)

find_overlapping_codes: Find overlapping code annotations

Description

Identifies pairs of annotations that overlap in the text and returns their intersection points and associated codes.

Usage

find_overlapping_codes(annotations)

Value

A list of overlapping code pairs, each containing:

  • code1: first code in the overlap

  • code2: second code in the overlap

  • overlap_start: starting position of overlap

  • overlap_end: ending position of overlap

Arguments

annotations

A data frame containing text annotations with columns:

  • start: numeric, starting position of annotation

  • end: numeric, ending position of annotation

  • code: character, code applied to the annotation