fairdm.contrib.contributors.services.matching#
Fuzzy name matching that finds potential duplicate people.
Module Contents#
Functions#
Find people whose names closely match this person’s name. |
API#
- find_duplicate_candidates(person: fairdm.contrib.contributors.models.Person, threshold: float = 0.85) list[dict][source]#
Find people whose names closely match this person’s name.
Scores use rapidfuzz
token_sort_ratio, so reordered names such as “Smith, John” and “John Smith” score alike.Args: person: The person to find duplicates for. threshold: Minimum similarity score between 0 and 1.
Returns:
{"person": Person, "score": float}dicts with a score from 0 to 1, highest first. The person itself is excluded.