cleaned_source_to_utterance_vector {rock}R 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");

[Package rock version 0.8.1 Index]