Skip to contents

This function processes a raw interview transcript through a series of steps to extract speaker turns and reconstruct the dialogue in a human-readable format. It identifies speakers, generates regular expression patterns for their tags, structures the data, extracts interventions, and then prepends speaker tags back to each line.

Usage

process_interview(interview)

Arguments

interview

A character vector representing the raw interview transcript (as returned by read_interview). The lines should be tagged with speaker names within square brackets (e.g., "\[Speaker1\] This is a line").

Value

A character vector where each element represents a line of dialogue, with the corresponding speaker tag prepended (e.g., "[Speaker Name] Intervention text").

Examples

# Example Usage:
# processed_interview = process_interview(intrw)