{"id":20431445,"url":"https://github.com/go-dedup/html-distance","last_synced_at":"2026-04-22T05:34:32.009Z","repository":{"id":57696092,"uuid":"95899785","full_name":"go-dedup/html-distance","owner":"go-dedup","description":"go library for computing the proximity of the HTML pages","archived":false,"fork":false,"pushed_at":"2017-06-30T15:33:46.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T05:44:52.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-dedup.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":"2017-06-30T15:10:56.000Z","updated_at":"2017-08-30T14:02:22.000Z","dependencies_parsed_at":"2022-09-09T20:50:17.086Z","dependency_job_id":null,"html_url":"https://github.com/go-dedup/html-distance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/go-dedup/html-distance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-dedup%2Fhtml-distance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-dedup%2Fhtml-distance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-dedup%2Fhtml-distance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-dedup%2Fhtml-distance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-dedup","download_url":"https://codeload.github.com/go-dedup/html-distance/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-dedup%2Fhtml-distance/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32122773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-15T08:11:55.103Z","updated_at":"2026-04-22T05:34:31.991Z","avatar_url":"https://github.com/go-dedup.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# html-distance\n\nhtml-distance is a go library for computing the proximity of the HTML pages. The implementation similiarity fingerprint is Charikar's simhash. \n\nWe used BK Tree (Burkhard and Keller) for verifying if a fingerprint is closed to a set of fingerprint within a defined proximity distance. \n\nDistance is the hamming distance of the fingerprints. Since fingerprint is of size 64 (inherited from hash/fnv), Similiarity is defined as 1 - d / 64.\n\nIn normal scenario, similarity \u003e 95% (i.e. d\u003e3) could be considered as duplicated html pages.\n\n\n## Get the source\n\n```\ngo get github.com/yahoo/gryffin/html-distance/...\n```\n\n## Install \n\n```\ngo install github.com/yahoo/gryffin/html-distance/cmd/html-distance\n```\n\n## Command Line Interface\n\n```\nUsage of html-distance:\n\n    html-distance url1 url2\n```\n\nExample 1\n```\n$ html-distance https://www.flickr.com/photos/120759744@N07/20389369791/ https://www.flickr.com/photos/120759744@N07/20374523532/in/photostream/\n\nFetching https://www.flickr.com/photos/120759744@N07/20389369791/, Got 200\nFetching https://www.flickr.com/photos/120759744@N07/20374523532/in/photostream/, Got 200\nFeature distance is 0. HTML Similarity is 100.00%\n```\n\nExample 2\n```\n$ html-distance https://www.yahoo.com/politics/kasichs-reception-on-gay-marriage-important-126109300441.html https://www.yahoo.com/tech/s/verizon-drop-phone-contracts-end-discounted-phones-201530971--finance.html\n\nFetching https://www.yahoo.com/politics/kasichs-reception-on-gay-marriage-important-126109300441.html, Got 200\nFetching https://www.yahoo.com/tech/s/verizon-drop-phone-contracts-end-discounted-phones-201530971--finance.html, Got 200\nFeature distance is 2. HTML Similarity is 96.88%\n```\n\nExample 3\n```\n$ html-distance https://www.flickr.com/photos/120759744@N07/20389369791/ https://www.yahoo.com/tech/s/verizon-drop-phone-contracts-end-discounted-phones-201530971--finance.html\n\nFetching https://www.flickr.com/photos/120759744@N07/20389369791/, Got 200\nFetching https://www.yahoo.com/tech/s/verizon-drop-phone-contracts-end-discounted-phones-201530971--finance.html, Got 200\nFeature distance is 9. HTML Similarity is 85.94%\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-dedup%2Fhtml-distance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-dedup%2Fhtml-distance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-dedup%2Fhtml-distance/lists"}