Learn R Programming

conversim (version 0.1.0)

sentiment_similarity: Calculate sentiment similarity between two conversations

Description

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

Usage

sentiment_similarity(conv1, conv2)

Value

A numeric value representing the sentiment similarity

Arguments

conv1

A character string representing the first conversation

conv2

A character string representing the second conversation

Examples

Run this code
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)

Run the code above in your browser using DataLab