Utterance vectors are split by the utterance marker. Note that if x has more than one element, the separate elements will remain separate.

cleaned_source_to_utterance_vector(
  x,
  utteranceMarker = rock::opts$get("utteranceMarker"),
  fixed = FALSE,
  perl = TRUE
)

Arguments

x

The character vector.

utteranceMarker

The utterance marker (by default, a newline character conform the ROCK standard).

fixed

Whether the utteranceMarker is a regular expression.

perl

If the utteranceMarker is a regular expression, whether it is a perl regular expression.

Value

A character vector with separate utterances, split by utteranceMarker.

Examples

cleaned_source_to_utterance_vector("first\nsecond\nthird");
#> [1] "first"  "second" "third"