import goldenmatch as gm
config = gm.GoldenMatchConfig(
matchkeys=[
gm.MatchkeyConfig(
name="exact_email",
type="exact",
fields=[gm.MatchkeyField(field="email", transforms=["lowercase"])],
),
gm.MatchkeyConfig(
name="fuzzy_name",
type="weighted",
threshold=0.85,
fields=[
gm.MatchkeyField(field="name", scorer="jaro_winkler", weight=0.7),
gm.MatchkeyField(field="zip", scorer="exact", weight=0.3),
],
),
],
blocking=gm.BlockingConfig(strategy="learned"),
llm_scorer=gm.LLMScorerConfig(enabled=True, mode="cluster"),
backend="ray",
)
result = gm.dedupe_df(df, config=config)