Skip to contents

This file contains utility functions and visualization tools to complement the main similarity calculation functions for comparing two speeches. Combine multiple similarity measures

Usage

combine_sims(similarities, weights = NULL)

Arguments

similarities

A named list of similarity scores

weights

A named list of weights for each similarity measure (optional)

Value

A single combined similarity score

Details

This function combines multiple similarity measures into a single score.

Examples

sims <- list(topic = 0.8, lexical = 0.6, semantic = 0.7, structural = 0.9)
combine_sims(sims)
#> [1] 0.75
combine_sims(sims, weights = list(topic = 2, lexical = 1, semantic = 1.5, structural = 1))
#> [1] 0.7545455