mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-10-20 10:19:59 +00:00
fix(identity): implement the default exact record comparator
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
This commit is contained in:
@@ -155,6 +155,11 @@ class IdentityMatcher:
|
||||
|
||||
return weighted_score / total_weight if total_weight > 0 else 0.0
|
||||
|
||||
def compare(self, value_a: str, value_b: str, comparator: str) -> float:
|
||||
if comparator != "exact":
|
||||
raise ValueError(f"Unsupported comparator: {comparator}")
|
||||
return 1.0 if value_a == value_b else 0.0
|
||||
|
||||
def normalize(self, value: str, normalizer: str) -> str:
|
||||
if normalizer == "email":
|
||||
return value.lower().strip()
|
||||
|
||||
Reference in New Issue
Block a user