Skip to contents

This function preprocesses conversations from multiple dyads by applying text cleaning to each utterance.

Usage

preprocess_dyads(conversations)

Arguments

conversations

A data frame with columns 'dyad_id', 'speaker', and 'text'

Value

A data frame with an additional 'processed_text' column, removing any rows with empty processed text

Examples

convs <- data.frame(
  dyad_id = c(1, 1, 2, 2),
  speaker = c("A", "B", "C", "D"),
  text = c("Hello!", "Hi there!", "How are you?", "I'm fine, thanks!")
)
preprocess_dyads(convs)
#>   dyad_id speaker              text processed_text
#> 1       1       A            Hello!          hello
#> 2       1       B         Hi there!       hi there
#> 3       2       C      How are you?    how are you
#> 4       2       D I'm fine, thanks! im fine thanks