Skip to contents

This function calculates the sentiment similarity between two conversations using the sentimentr package.

Usage

sentiment_similarity(conv1, conv2)

Arguments

conv1

A character string representing the first conversation

conv2

A character string representing the second conversation

Value

A numeric value representing the sentiment similarity

Examples

conv1 <- "I love this product! It's amazing and works great."
conv2 <- "This item is okay. It does the job but could be better."
sentiment_similarity(conv1, conv2)
#> [1] 0.9401321