This function prepending unique utterance identifiers to each utterance (line) in a source. Note that you'll probably want to clean the sources using clean_sources() first.

prepend_ids_to_source(
input,
output = NULL,
origin = Sys.time(),
preventOverwriting = rock::opts$get(preventOverwriting), encoding = rock::opts$get(encoding),
silent = rock::opts$get(silent) ) prepend_ids_to_sources( input, output = NULL, outputPrefix = "", outputSuffix = "_withUIDs", origin = Sys.time(), preventOverwriting = rock::opts$get(preventOverwriting),
encoding = rock::opts$get(encoding), silent = rock::opts$get(silent)
)

## Arguments

input The filename or contents of the source for prepend_ids_to_source and the directory containing the sources for prepend_ids_to_sources. The filename where to write the resulting file for prepend_ids_to_source and the directory where to write the resulting files for prepend_ids_to_sources The time to use for the first identifier. Whether to overwrite existing files (FALSE) or prevent that from happening (TRUE). The encoding of the file(s). Whether to be chatty or quiet. The prefix and suffix to add to the filenames when writing the processed files to disk.

## Value

The source with prepended uids, either invisible (if output if specified) or visibly (if not).

## Examples

prepend_ids_to_source(input = "brief\nexample\nsource");#> [1] "[[uid=78ys5mzr]] brief"   "[[uid=78ys5mzs]] example"
#> [3] "[[uid=78ys5mzt]] source"