Examines the surrounding context where codes are applied by looking at preceding and following annotations to understand code relationships.
analyze_code_context(code_anns, all_anns)List of contexts for each code instance:
before: Preceding annotation if exists
after: Following annotation if exists
Data frame containing annotations for specific code:
start: numeric, starting position
end: numeric, ending position
code: character, code identifier
Data frame containing all annotations in the text