{"id":16035251,"url":"https://github.com/foxcroftjn/polars-strsim","last_synced_at":"2026-04-08T19:31:09.036Z","repository":{"id":257340717,"uuid":"617970784","full_name":"foxcroftjn/polars-strsim","owner":"foxcroftjn","description":"Polars extension for string similarity","archived":false,"fork":false,"pushed_at":"2025-04-25T14:08:15.000Z","size":108,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-16T15:56:28.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/polars-strsim/","language":"Rust","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/foxcroftjn.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-23T13:45:57.000Z","updated_at":"2025-12-05T08:16:48.000Z","dependencies_parsed_at":"2024-09-16T05:35:51.600Z","dependency_job_id":"45b6b6c9-2e28-4971-83be-0f95f9dd7292","html_url":"https://github.com/foxcroftjn/polars-strsim","commit_stats":null,"previous_names":["foxcroftjn/polars-strsim"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/foxcroftjn/polars-strsim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcroftjn%2Fpolars-strsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcroftjn%2Fpolars-strsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcroftjn%2Fpolars-strsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcroftjn%2Fpolars-strsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxcroftjn","download_url":"https://codeload.github.com/foxcroftjn/polars-strsim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcroftjn%2Fpolars-strsim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31571599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"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":[],"created_at":"2024-10-08T22:01:31.819Z","updated_at":"2026-04-08T19:31:09.004Z","avatar_url":"https://github.com/foxcroftjn.png","language":"Rust","funding_links":[],"categories":["Recently Updated","Libraries/Packages/Scripts"],"sub_categories":["[Oct 08, 2024](/content/2024/10/08/README.md)","Polars plugins"],"readme":"\u003ca href=\"https://pypi.org/project/polars-strsim/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/polars-strsim.svg\" alt=\"PyPi Latest Release\"/\u003e\n\u003c/a\u003e\n\n# String Similarity Measures for Polars\n\nThis package provides python bindings to compute various string similarity measures directly on a polars dataframe. All string similarity measures are implemented in rust and computed in parallel.\n\nThe similarity measures that have been implemented are:\n\n- Levenshtein\n- Jaro\n- Jaro-Winkler\n- Jaccard\n- Sørensen-Dice\n\nEach similarity measure returns a value normalized between 0.0 and 1.0 (inclusive), where 0.0 indicates the inputs are maximally different and 1.0 means the strings are maximally similar.\n\n## Installing the Library\n\n### With pip\n\n```bash\npip install polars-strsim\n```\n\n### From Source\n\nTo build and install this library from source, first ensure you have [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) installed. You will also need maturin, which you can install via `pip install 'maturin[patchelf]'`\n\npolars-strsim can then be installed in your current python environment by running `maturin develop --release`\n\n## Using the Library\n\n**Input:**\n\n```python\nimport polars as pl\nfrom polars_strsim import levenshtein, jaro, jaro_winkler, jaccard, sorensen_dice\n\ndf = pl.DataFrame(\n    {\n        \"name_a\": [\"phillips\", \"phillips\", \"\"        , \"\", None      , None],\n        \"name_b\": [\"phillips\", \"philips\" , \"phillips\", \"\", \"phillips\", None],\n    }\n).with_columns(\n    levenshtein=levenshtein(\"name_a\", \"name_b\"),\n    jaro=jaro(\"name_a\", \"name_b\"),\n    jaro_winkler=jaro_winkler(\"name_a\", \"name_b\"),\n    jaccard=jaccard(\"name_a\", \"name_b\"),\n    sorensen_dice=sorensen_dice(\"name_a\", \"name_b\"),\n)\n\nwith pl.Config(ascii_tables=True):\n    print(df)\n```\n**Output:**\n```\nshape: (6, 7)\n+----------+----------+-------------+----------+--------------+---------+---------------+\n| name_a   | name_b   | levenshtein | jaro     | jaro_winkler | jaccard | sorensen_dice |\n| ---      | ---      | ---         | ---      | ---          | ---     | ---           |\n| str      | str      | f64         | f64      | f64          | f64     | f64           |\n+=======================================================================================+\n| phillips | phillips | 1.0         | 1.0      | 1.0          | 1.0     | 1.0           |\n| phillips | philips  | 0.875       | 0.958333 | 0.975        | 0.875   | 0.933333      |\n|          | phillips | 0.0         | 0.0      | 0.0          | 0.0     | 0.0           |\n|          |          | 1.0         | 1.0      | 1.0          | 1.0     | 1.0           |\n| null     | phillips | null        | null     | null         | null    | null          |\n| null     | null     | null        | null     | null         | null    | null          |\n+----------+----------+-------------+----------+--------------+---------+---------------+\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcroftjn%2Fpolars-strsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxcroftjn%2Fpolars-strsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcroftjn%2Fpolars-strsim/lists"}