{"id":41977667,"url":"https://github.com/lqdc/pysimstr","last_synced_at":"2026-01-25T23:33:42.917Z","repository":{"id":32422219,"uuid":"35999548","full_name":"lqdc/pysimstr","owner":"lqdc","description":"Fast(ish) string similarity for one vs many comparisons.","archived":false,"fork":false,"pushed_at":"2016-06-27T09:54:21.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-09T17:54:26.132Z","etag":null,"topics":["string-distance","string-matching","string-search","string-similarity"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lqdc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-21T08:02:58.000Z","updated_at":"2020-07-23T01:45:53.000Z","dependencies_parsed_at":"2022-09-19T07:50:46.681Z","dependency_job_id":null,"html_url":"https://github.com/lqdc/pysimstr","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lqdc/pysimstr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lqdc%2Fpysimstr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lqdc%2Fpysimstr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lqdc%2Fpysimstr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lqdc%2Fpysimstr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lqdc","download_url":"https://codeload.github.com/lqdc/pysimstr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lqdc%2Fpysimstr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28761814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T23:06:19.311Z","status":"ssl_error","status_checked_at":"2026-01-25T23:03:50.555Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["string-distance","string-matching","string-search","string-similarity"],"created_at":"2026-01-25T23:33:42.858Z","updated_at":"2026-01-25T23:33:42.908Z","avatar_url":"https://github.com/lqdc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/lqdc/pysimstr.svg?branch=master)](https://travis-ci.org/lqdc/pysimstr)\n\n#PySimStr\n\n*Fast(ish) string similarity for one vs many comparisons.*\n\n\nSolves the problem of fuzzy searching many different (unknown in advance)\nstrings, one at a time, against a relatively large constant collection\nof strings that fits in memory many times over.\n\nExample problem:\n```py\nsome_big_collection = ['Foo', 'bar', 'Something Else' ...]\n\nimport Levenshtein\n\ndef compare_bruteforce(s_to_compare, some_big_collection, threshold):\n    for element in some_big_collection:\n        score = Levenshtein.jaro_winkler(s_to_compare, element)\n        if score \u003e= threshold:\n            return True\n    return False\n```\n\nAs an example of real-world performance, this library speeds up string\nlookup ~10^4 times when searching for a string in a collection of 10^5\nentities with a trigram index and plus-minus 3-letter length\ndifference when using Jaro-Winkler comparison function.\n\nUsage Example:\n```py\n    \u003e\u003e\u003e from pysimstr import SimStr\n    \u003e\u003e\u003e db = SimStr(idx_size=3, plus_minus=8, cutoff=0.85)\n    \u003e\u003e\u003e db.insert(('Harry Potter And The Big Wizard Guy',  # I have not read HP\n                   'Game Of Thrones',\n                   'Mad Max'))\n    \u003e\u003e\u003e db.check(\"Harry Potter and the Sorcerer's Stone\")  # True\n    \u003e\u003e\u003e db.check(\"Harry Something\")  # False\n    \u003e\u003e\u003e db.retrieve(\"Mad Monkey\")  # ['Mad Max']\n    \u003e\u003e\u003e db.retrieve_with_score('Mad Monkey')  # [('Mad Max',\n                                              #   0.8690476190476191)]\n```\n\nSpeedup is achieved by an n-gram indexing strategy\nand only comparing strings of similar length.\n\nMost useful with Levenshtein-like distance functions that take a while to compute.\n\n####Note\nComparisons can take a lot longer if the new strings are large compared to\nindex size. If your incoming dataset has variable sized strings such as strings\nof only 3 characters in length and strings of 20 characters in length,\nyou should make several instances of the SimStr class with different\nindex sizes.\n\nCompare the larger strings against instances with larger index sizes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flqdc%2Fpysimstr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flqdc%2Fpysimstr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flqdc%2Fpysimstr/lists"}