Cuts each document into the unit every stage of an analysis should share. Character offsets are returned alongside each unit, so any span stays recoverable from the original text.
Usage
split_texts(texts, unit = c("sentence", "paragraph", "document"))Value
A tibble with doc_id, unit_id, unit_text, start, and end.
unit_id is the doc_id itself for whole documents, and doc_id.n
otherwise. Empty and missing documents contribute no rows.
See also
apply_codes(), which splits with this before coding;
uncoded_units() for the units a codebook did not reach.
