Calculate topic similarity sequence for a single dyad
Source:R/conversation_sequence.R
topic_sim_seq.Rd
This function calculates topic similarity over a sequence of conversation exchanges within a single dyad.
Examples
conversation <- data.frame(
processed_text = c("The cat sat on the mat", "The dog chased the cat",
"The mat was comfortable", "The cat liked the mat")
)
result <- topic_sim_seq(conversation, method = "lda", num_topics = 2, window_size = 2)
print(result)
#> $sequence
#> [1] 1 1 1
#>
#> $average
#> [1] 1
#>