{"id":19067048,"url":"https://github.com/imvladikon/deduplicator","last_synced_at":"2026-05-16T05:30:18.237Z","repository":{"id":211967984,"uuid":"730386770","full_name":"imvladikon/deduplicator","owner":"imvladikon","description":"Simple entity deduplication package","archived":false,"fork":false,"pushed_at":"2023-12-11T20:30:19.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-02T14:43:13.137Z","etag":null,"topics":["deduplication","entity-resolution"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imvladikon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-12-11T20:15:21.000Z","updated_at":"2023-12-30T22:04:05.000Z","dependencies_parsed_at":"2023-12-11T21:40:00.421Z","dependency_job_id":null,"html_url":"https://github.com/imvladikon/deduplicator","commit_stats":null,"previous_names":["imvladikon/deduplicator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imvladikon%2Fdeduplicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imvladikon%2Fdeduplicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imvladikon%2Fdeduplicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imvladikon%2Fdeduplicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imvladikon","download_url":"https://codeload.github.com/imvladikon/deduplicator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240121479,"owners_count":19751037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deduplication","entity-resolution"],"created_at":"2024-11-09T00:59:00.244Z","updated_at":"2026-05-16T05:30:18.208Z","avatar_url":"https://github.com/imvladikon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Deduplication and consolidation package\n\nSimple package to deduplicate records based on the specified attributes and to consolidate\n\n### Deduplication usage\n\nUsage from python:\n\n```python\nfrom deduplicator import Deduplicator\nfrom deduplicator.matching import NameSimilarity\n\nrecords = [{\"name\": ..., \"phone\": ...}, ...]\n\ndeduplicator = Deduplicator(\n    comparators=[(\"name\", NameSimilarity)],  # list of tuples (attribute, comparator)\n    aggregation_strategy=\"mean\",\n    # attributes to block on, nested attributes can be specified with a dot\n    blocking_attributes=[\"phone\"],\n    clust_kwargs={\"eps\": 0.1, \"min_samples\": 2, \"metric\": \"precomputed\"},\n)\n```\n\nOptionally, you can specify a custom `blocking_rule` instead of `blocking_attributes`:\n\n```python\nfrom deduplicator import Deduplicator\nfrom deduplicator.blockings import SortedNeighbourhoodBlockSplitter\nfrom deduplicator.blockings.rules import PhoneticGroupBy, ExactGroupBy, NLetterAbbreviationGroupBy, FirstNCharsGroupBy\nfrom deduplicator.matching import NameSimilarity\n\nrecords = [{\"contact_name\": ..., \"phone\": ..., \"user_id\": ...}, ...]\nrule1 = PhoneticGroupBy(\"contact_name\") \u0026 ExactGroupBy(\"phone\")\nrule2 = FirstNCharsGroupBy(\"contact_name\") \u0026 ExactGroupBy(\"phone\")\nrule3 = NLetterAbbreviationGroupBy(\"contact_name\", n_letters=2)\nblocking_rule = rule1 | rule2 | rule3\ndeduplicator = Deduplicator(\n    comparators=[(\"contact_name\", NameSimilarity())],\n    aggregation_strategy=\"mean\",\n    blocking_rule=blocking_rule,\n    blocking_splitter=SortedNeighbourhoodBlockSplitter(fields=['phone', 'user_id'],\n                                                       max_block_size=128),\n    clust_kwargs={\"eps\": 0.1, \"min_samples\": 2, \"metric\": \"precomputed\"},\n)\n\nfor cluster_id, duplicates in deduplicator(records, similarity_threshold=0.7):\n    print(\"-\" * 100)\n    print(cluster_id)\n\n    for duplicate in duplicates:\n        print(duplicate[\"contact_name\"])\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimvladikon%2Fdeduplicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimvladikon%2Fdeduplicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimvladikon%2Fdeduplicator/lists"}