Runs np_block() -> np_compare() -> np_score() -> np_veto() pass by
pass, tight to loose. After each pass, queries that reached the YES tier are
removed from the pending set, so each successive (more expensive) pass only
processes the harder residual. Candidate pairs are scored once; the final
np_select() / np_tier() run over the de-duplicated union, so a match found
by a looser pass still competes on equal footing (and the runner-up margin is
computed across all of a query's candidates).
Usage
np_cascade(
query,
reference,
config = np_config(),
method = "hier",
passes = np_default_passes(),
verbose = TRUE,
query_map = np_map_sam(),
reference_map = np_map_bmf(),
name_freq = NULL,
token_idf = NULL,
ref_index = NULL,
addr_freq = NULL
)Arguments
- query
Raw data frame or
np_query.- reference
Raw data frame,
np_reference, or a matchdb reference: the list thatmatchdb::md_compile()ormatchdb::md_reference()returns. From a matchdb reference, npmatch takes the frame and whichever ofname_freq,token_idf,ref_indexandaddr_freqit carries; arguments you pass explicitly take precedence. It is refused if its normalizer signature differs from the installed one. matchdb itself is not needed.- config
An
np_config().- method
Scoring method for
np_score()(default"hier").- passes
A list of pass specs (see
np_default_passes()).- verbose
Print the per-stage report. Default
TRUE.- query_map, reference_map
Schema maps for raw inputs.
- name_freq, token_idf
Optional pre-computed reference tables from
np_name_freq()/np_token_idf(). Supply them (together with an already-normalizedreference) to reuse a one-time normalization across many calls — e.g. from a batched driver (np_run_batches()). Computed from the reference whenNULL.- ref_index
Optional precomputed
np_ref_index()blocking index. Built once from the reference whenNULLand reused across every pass (and, vianp_run_batches(), every batch), so a large reference is tokenized once rather than per pass.- addr_freq
Optional precomputed
np_addr_freq()table: how many reference records share each address and suite, and what kind of place each shared address is. Counted over the whole reference whenNULL. Pass one counted over the full reference whenreferenceis only part of it (one state, say), so crowded addresses are not under-counted.