pairwise_candidates: Candidate pairs from pairwise comparisons

Description Usage Arguments Value Examples

View source: R/pairwise_candidates.R

Description

Converts a comparison matrix generated by pairwise_compare into a data frame of candidates for matches.

Usage

1
pairwise_candidates(m, directional = FALSE)

Arguments

m

A matrix from pairwise_compare.

directional

Should be set to the same value as in pairwise_compare.

Value

A data frame containing all the non-NA values from m. Columns a and b are the IDs from the original corpus as passed to the comparison function. Column score is the score returned by the comparison function.

Examples

1
2
3
4
5
6
7
8
dir <- system.file("extdata/legal", package = "textreuse")
corpus <- TextReuseCorpus(dir = dir)

m1 <- pairwise_compare(corpus, ratio_of_matches, directional = TRUE)
pairwise_candidates(m1, directional = TRUE)

m2 <- pairwise_compare(corpus, jaccard_similarity)
pairwise_candidates(m2)

textreuse documentation built on May 30, 2017, 3:32 a.m.