A pre-built domain comparison for personal names. Combines exact matching and Jaro-Winkler levels with thresholds tuned for typical name variation. Optionally adds a Soundex phonetic level as a final fallback before the else level, which helps catch names that sound similar but are spelled differently (e.g., Smith/Smyth).
Arguments
- term_frequency
Logical. If
TRUE, adjust match weights by name frequency at the highest comparison level. Defaults toFALSE.- phonetic
Logical. If
TRUE, add acl_soundex()level as a fallback before the else level. Defaults toFALSE.
Value
A comparison-level object for use in il_compare().
Examples
il_spec() |>
il_compare(first_name, cl_name()) |>
il_compare(surname, cl_name(term_frequency = TRUE))
#> Linkage Specification
#> Comparisons (2):
#> first_name : levels
#> surname : levels
#> Blocking rules: (none)
il_spec() |>
il_compare(first_name, cl_name(phonetic = TRUE))
#> Linkage Specification
#> Comparisons (1):
#> first_name : levels
#> Blocking rules: (none)
