{"id":20619323,"url":"https://github.com/dedupeio/fuzzycategory","last_synced_at":"2025-04-15T11:54:36.826Z","repository":{"id":57432736,"uuid":"41607443","full_name":"dedupeio/fuzzycategory","owner":"dedupeio","description":":triangular_ruler: Fuzzy Categorical Distances","archived":false,"fork":false,"pushed_at":"2020-03-31T20:54:31.000Z","size":6,"stargazers_count":14,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T19:45:22.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dedupeio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-29T21:12:40.000Z","updated_at":"2023-10-12T15:54:46.000Z","dependencies_parsed_at":"2022-09-17T03:50:54.769Z","dependency_job_id":null,"html_url":"https://github.com/dedupeio/fuzzycategory","commit_stats":null,"previous_names":["datamade/fuzzycategory"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedupeio%2Ffuzzycategory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedupeio%2Ffuzzycategory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedupeio%2Ffuzzycategory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedupeio%2Ffuzzycategory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dedupeio","download_url":"https://codeload.github.com/dedupeio/fuzzycategory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249067773,"owners_count":21207395,"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":[],"created_at":"2024-11-16T12:11:21.822Z","updated_at":"2025-04-15T11:54:36.799Z","avatar_url":"https://github.com/dedupeio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fuzzycategory\nFuzzy Categorical Distances\n\nPart of the [Dedupe.io](https://dedupe.io/) cloud service and open source toolset for de-duplicating and finding fuzzy matches in your data.\n\nFor cases which the number of classes is large, but much smaller than the number of of records we can do something like a \"semantic\" distance between categories. A good example would be something like occupation in campaign finance data.\n\n```python\n{'name' : 'Jim Bob', 'employer' : 'JP Morgan Chase', 'occupation' : 'lawyer'}\n{'name' : 'James Bob', 'employer' : 'JP Morgan Chase', 'occupation' : 'lawyer'}\n{'name' : 'Jim Bob', 'employer' : 'JP Morgan Chase', 'occupation' : 'attorney''}\n```\n\nWe can 1.\n\n# Create a vector of all the terms that don't appear in the focal field\n\n```python\nlawyer : {'Jim' : 1, 'James' : 1, 'Bob' : 2, 'JP' : 2, 'Morgan' : 2, 'Chase' : 2}\nattorney : {'Jim' : 1, 'Bob' : 1, 'JP' : 1, 'Morgan' : 1, 'Chase' : 1}\n```\n\nThe \"distance\" between attorney and lawyer is then the tfidf weighted cosine distance between those vectors.\n\nAlternately, \n\n# Create a vector of exact field matches\n\n```python\nlawyer : {'Jim Bob' : 1, 'James Bob' : 1, 'JP Morgan Chase' : 2}\nattorney : {'Jim Bob' : 1, 'JP Morgan Chase' : 2}\n```\n\nOr even a \n\n# vector exact matches for everything except the focal field\n\n```python\nlawyer : {'Jim Bob, JP Morgan Chase' : 1, 'James Bob, JP Morgan Chase' : 1}\nattorney : {'James Bob, JP Morgan Chase' : 1}\n```\n\nThis last version is very similar to what http://www.naviddianati.com/fec is doing with their Maximum Likelihood Filter: http://arxiv.org/abs/1503.04085\n\n\nIf we wanted to get even more fancy we could use word2vec instead of the tfidf business: https://www.kaggle.com/c/word2vec-nlp-tutorial/details/part-2-word-vectors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedupeio%2Ffuzzycategory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdedupeio%2Ffuzzycategory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedupeio%2Ffuzzycategory/lists"}