Learn R Programming

conversim (version 0.1.0)

lexical_similarity: Calculate lexical similarity between two conversations

Description

This function calculates the lexical similarity between two conversations based on the overlap of unique words.

Usage

lexical_similarity(conv1, conv2)

Value

A numeric value representing the lexical similarity

Arguments

conv1

A character string representing the first conversation

conv2

A character string representing the second conversation

Examples

Run this code
conv1 <- "The quick brown fox jumps over the lazy dog"
conv2 <- "The lazy dog sleeps under the quick brown fox"
lexical_similarity(conv1, conv2)

Run the code above in your browser using DataLab