Skip to contents

This function calculates the structural similarity between two conversations based on their length and average turn length.

Usage

structural_similarity(conv1, conv2)

Arguments

conv1

A character vector representing the first conversation

conv2

A character vector representing the second conversation

Value

A numeric value representing the structural similarity

Examples

conv1 <- c("Hello", "Hi there", "How are you?", "I'm fine, thanks")
conv2 <- c("Good morning", "Hello", "Nice day, isn't it?", "Yes, indeed")
structural_similarity(conv1, conv2)
#> [1] 0.9361702