Given a data frame and a vector of target columns, perform regex matching on the target columns until all entities are matched or we run out of columns to match. Warn about ambiguous matches (duplicate entity_id values). Return a data frame mapping the target columns to the entity patterns.
match_entities_with_patterns(
data,
target_cols,
patterns,
warn_ambiguous = TRUE
)
A data frame with the unique combinations of the target columns mapped to the entity patterns
A data frame containing the columns to match
Character vector of column names to match
Data frame containing entity patterns; if NULL, uses list_entity_patterns()
Logical; whether to warn about ambiguous matches