cut_up: 'Cut-up' a hymn (or something else)

View source: R/cut_up.R

cut_upR Documentation

'Cut-up' a hymn (or something else)

Description

Using the cut-up technique popularized by William S. Burroughs, cut_up() replaces each word in the reference document with a random sample of words with same number of wovels and same part-of-speach-tag.

Usage

cut_up(
  df,
  ref_id = 1,
  except = NULL,
  token = token,
  token_no = token_no,
  doc_id = doc_id,
  vowels = vowels,
  upos = upos,
  token_new = token_new
)

Arguments

df

A tibble based on output from udpipe::udpipe_annotate() which is assumed to also contain a wovel column.

ref_id

An integer number; this is the text that will get new words.

except

character. upos tags that will not be cut-up.

token

Name of column containing tokens

token_no

Name of column containing token ids

doc_id

Name of column containing document ids

vowels

Name of column containing number of wovels in token

upos

Name of column containing POS-tag

token_new

Name of column to contain a new, suggested token

Value

A tibble with new column token_new with a suggested replacement for column token.

Examples

## Not run
cut_up(annotated_hymns)


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