% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generate_speaker_pattern.R
\name{generate_speaker_pattern}
\alias{generate_speaker_pattern}
\title{Generate Regular Expression Pattern for Speaker Identification}
\usage{
generate_speaker_pattern(speaker)
}
\arguments{
\item{speaker}{A character vector of speaker identifiers.}
}
\value{
A string containing the regular expression pattern. If multiple
speakers are provided, the patterns are combined using the "|" (OR)
operator to match any of them.
}
\description{
This function generates a regular expression pattern to identify lines
spoken by one or more specific speakers in an interview transcript.
The pattern is designed to match the speaker's name enclosed in square
brackets, followed by a space.
}
\examples{

speakers = retrieve_speaker(intrw)
pattern = generate_speaker_pattern(speakers)

}
\seealso{
Other process interview:
\code{\link[=concatenate_intervention]{concatenate_intervention()}},
\code{\link[=prep_interview]{prep_interview()}},
\code{\link[=process_interview]{process_interview()}},
\code{\link[=process_structured_interview]{process_structured_interview()}},
\code{\link[=read_interview]{read_interview()}},
\code{\link[=rename_speaker]{rename_speaker()}},
\code{\link[=retrieve_speaker]{retrieve_speaker()}},
\code{\link[=structure_interview]{structure_interview()}},
\code{\link[=unlist_processed_interview]{unlist_processed_interview()}},
\code{\link[=write_interview]{write_interview()}}
}
\concept{process interview}
