cleaned_source_to_utterance_vector: Convert a character vector into an utterance vector

View source: R/cleaned_source_to_utterance_vector.R

cleaned_source_to_utterance_vectorR Documentation

Convert a character vector into an utterance vector

Description

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

Usage

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");

rock documentation built on Dec. 28, 2022, 1:55 a.m.