{"id":16641106,"url":"https://github.com/suminb/winnowing","last_synced_at":"2025-03-21T15:32:18.164Z","repository":{"id":49742823,"uuid":"13133386","full_name":"suminb/winnowing","owner":"suminb","description":"A Python implementation of the Winnowing (local algorithms for document fingerprinting)","archived":false,"fork":false,"pushed_at":"2019-10-29T17:29:03.000Z","size":22,"stargazers_count":53,"open_issues_count":0,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T02:44:39.575Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suminb.png","metadata":{"files":{"readme":"README.rst","changelog":"changelog.rst","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":"2013-09-26T20:21:26.000Z","updated_at":"2025-01-19T10:23:18.000Z","dependencies_parsed_at":"2022-09-24T04:11:52.532Z","dependency_job_id":null,"html_url":"https://github.com/suminb/winnowing","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suminb%2Fwinnowing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suminb%2Fwinnowing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suminb%2Fwinnowing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suminb%2Fwinnowing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suminb","download_url":"https://codeload.github.com/suminb/winnowing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244822726,"owners_count":20516155,"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-10-12T07:45:17.279Z","updated_at":"2025-03-21T15:32:17.042Z","avatar_url":"https://github.com/suminb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Winnowing\n=========\n\nA Python implementation of the Winnowing (local algorithms for document\nfingerprinting)\n\nOriginal Work\n=============\n\nThe original research paper can be found at\nhttp://dl.acm.org/citation.cfm?id=872770.\n\nInstallation\n============\n\nYou may install ``winnowing`` package via ``pip`` as follows:\n\n::\n\n    pip install winnowing\n    \nAlternatively, you may also install the package by cloning this repository.\n\n::\n\n    git clone https://github.com/suminb/winnowing.git\n    cd winnowing \u0026\u0026 python setup.py install\n\nUsage\n=====\n\n.. code:: python\n\n    \u003e\u003e\u003e from winnowing import winnow\n\n    \u003e\u003e\u003e winnow('A do run run run, a do run run')\n    set([(5, 23942), (14, 2887), (2, 1966), (9, 23942), (20, 1966)])\n\n    \u003e\u003e\u003e winnow('run run')\n    set([(0, 23942)]) # match found!\n\nDefault Hash Function\n~~~~~~~~~~~~~~~~~~~~~\n\nQuite honestly, I did not know what hash function to use. The paper did\nnot talk about it. So I decided to use a part of SHA-1; more precisely,\nthe last 16 bits of the digest.\n\nCustom Hash Function\n~~~~~~~~~~~~~~~~~~~~\n\nYou may use your own hash function as demonstrated below.\n\n.. code:: python\n\n    def hash_md5(text):\n        import hashlib\n\n        hs = hashlib.md5(text)\n        hs = hs.hexdigest()\n        hs = int(hs, 16)\n\n        return hs\n\n    # Override the hash function\n    winnow.hash_function = hash_md5\n\n    winnow('The cake was a lie')\n\nLower Bound of Fingerprint Density\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n(TODO: Write this section)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuminb%2Fwinnowing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuminb%2Fwinnowing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuminb%2Fwinnowing/lists"}