CMDist: Concept Mover's Distance Function

Description Usage Arguments References Examples

View source: R/CMDist.R

Description

The function outputs a dataframe with Concept Mover's Distances for each document.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
CMDist(
  dtm,
  cw = NULL,
  cd = NULL,
  wv,
  method = "cosine",
  scale = TRUE,
  parallel = FALSE,
  threads = 2
)

Arguments

Function

requires a document-term matrix and a matrix of word embeddings.

References

https://journals.sagepub.com/doi/10.1177/2378023119827674

Examples

1
cm.dists <- CMDist(dtm, cw = "death", wv = wordvectors, scale = TRUE)

dustinstoltz/CMDist documentation built on Sept. 1, 2021, 5:14 a.m.