Skip to contents

This function processes a structured interview (as created by prep_interview) to extract and concatenate the interventions of each speaker. It removes speaker tags from each segment and then simplifies the naming of the resulting list elements.

Usage

process_structured_interview(structured_interview, pattern)

Arguments

structured_interview

A list where each element is a character vector representing an intervention by a specific speaker (as returned by prep_interview).

pattern

The regular expression pattern used to remove speaker tags from the interventions. Typically generated using generate_speaker_pattern.

Value

A list where each element is a single string containing the concatenated intervention of one speaker, with speaker tags removed. The names of the list elements are the unique speaker IDs.

Examples

# Example Usage:
speakers = retrieve_speaker(intrw)
pattern = generate_speaker_pattern(speakers)
structured_interview = prep_interview(intrw)
processed_interview = process_structured_interview(
     structured_interview, 
     pattern
)