Skip to contents

Creates comparison levels based on the Jaro-Winkler similarity score (0 to 1). Thresholds are passed as unnamed arguments ordered from strictest to most lenient.

Usage

cl_jaro_winkler(..., term_frequency = FALSE)

Arguments

...

Numeric thresholds between 0 and 1, ordered from strictest to most lenient (e.g., 0.9, 0.7).

term_frequency

Logical. If TRUE, adjust match weights by value frequency at the highest comparison level. Defaults to FALSE.

Value

A comparison-level object for use in il_compare().

Examples

il_spec() |>
  il_compare(first_name, cl_jaro_winkler(0.9, 0.7)) |>
  il_compare(surname, cl_jaro_winkler(0.9, term_frequency = TRUE))
#> Linkage Specification
#>   Comparisons (2):
#>     first_name : jaro_winkler
#>     surname : jaro_winkler
#>   Blocking rules: (none)