Calculate lexical similarity sequence for a single dyad
Source:R/conversation_sequence.R
lex_sim_seq.Rd
This function calculates lexical similarity over a sequence of conversation exchanges within a single dyad.
Examples
conversation <- data.frame(
processed_text = c("Hello world", "World of programming",
"Programming is fun", "Fun world of coding")
)
result <- lex_sim_seq(conversation, window_size = 2)
print(result)
#> $sequence
#> [1] 0.3750000 0.4444444
#>
#> $average
#> [1] 0.4097222
#>