textrank_jaccard: Calculate the distance between 2 vectors based on the Jaccard...

Description Usage Arguments Value Examples

View source: R/textrank.R

Description

The jaccard distance computes the percentage of terms in the 2 vectors which are overlapping.

Usage

1
textrank_jaccard(termsa, termsb)

Arguments

termsa

a character vector of words

termsb

a character vector of words

Value

The Jaccard distance distance between the 2 vectors

Examples

1
2
3
sentencea <- c("I", "like", "champaign")
sentenceb <- c("I", "prefer", "choco")
textrank_jaccard(termsa = sentencea, termsb = sentenceb)

Example output

[1] 0.2

textrank documentation built on Oct. 23, 2020, 5:21 p.m.