calcjaccard: Calculate Jaccard Similarity for a Pair of Topics

View source: R/calcjaccard.R

calcjaccardR Documentation

Calculate Jaccard Similarity for a Pair of Topics

Description

A primary internal function for calculating Jaccard similarity for a given pair of topics.

Usage

calcjaccard(topic1, topic2)

Arguments

topic1

a vector with terms most representative of a topic.

topic2

a vector with terms most representative of another topic.

Value

a value of Jaccard similarity for a pair of topics (numerical).

Examples

topicA <- c("tax", "money", "million", "financi", "govern", "spend", "billion")
topicB <- c("iraq", "war", "militari", "iraqi", "troop", "forc", "will")

calcjaccard(topicA, topicB)

paskn/topicl documentation built on Feb. 1, 2025, 9:33 p.m.