Skip to contents

Convert the replacement_rules (as defined with report_to_redaction_rules) to a function that can be applied to a data frame.

Usage

prepare_redactions(object)

Arguments

object

The replacement_rules (can be a path to a csv file or a data.frame).

Value

A function that can be applied to a data frame.

Deprecated

NA

Examples

if (FALSE) { # \dontrun{
example.data <- head(the_one_in_massapequa)
report <- pidpos(example.data, to_remove = "speaker")
redactions.raw <- report_to_redaction_rules(report)

replace_by <- make_random_replacement()
redactions <- auto_replace(redactions.raw, replacement_func = replace_by)

f <- pidpos:::prepare_redactions(redactions)
f(example.data$text)
} # }