collapse_annotation: 'Collapses' a annotation back into text

View source: R/collapse_annotation.R

collapse_annotationR Documentation

'Collapses' a annotation back into text

Description

Takes an annotation-style dataframe and concatenates tokens back into lines of text

Usage

collapse_annotation(
  df,
  token = token,
  doc_id = doc_id,
  line_id = line_id,
  text = text
)

Arguments

df

A tibble based on output from udpipe::udpipe_annotate()

token

Name of column containing tokens to be collapsed

doc_id

Name of column containing document ids to group by

line_id

Name of column containing line ids to group by

text

Name of column to contain collapsed text

Value

A tibble with lines in column text.

Examples

## Not run
collapse_annotation(annotated_hymns)


lassehjorthmadsen/salmer documentation built on April 15, 2022, 3:38 a.m.