Skip to contents

This function structures an interview transcript to identify consecutive lines spoken by the same speaker. It uses run-length encoding (rle) after extracting speaker identifiers from bracketed tags in the text.

Usage

structure_interview(interview)

Arguments

interview

A character vector representing the interview transcript, where each line is tagged with a speaker's name enclosed in square brackets (e.g., "[Speaker1] This is a line").

Value

An object of class "rle" containing information about the lengths and values of consecutive lines spoken by the same speaker. The values component contains speaker names, and lengths indicates how many consecutive lines each speaker spoke.

Examples

# Example usage:
interview_structure = so.ii:::structure_interview(intrw)