View source: R/string_similarities.R
jaccard_similarity | R Documentation |
Calculate Jaccard Similarity of two character vectors
jaccard_similarity(a, b, ngram_width = 2)
a |
the first character vector |
b |
the first character vector |
ngram_width |
the length of the shingles / ngrams used in the similarity calculation |
a vector of jaccard similarities of the strings
jaccard_similarity(
c("the quick brown fox", "jumped over the lazy dog"),
c("the quck bron fx", "jumped over hte lazy dog")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.