{"id":13541300,"url":"https://github.com/fdncred/nu_plugin_str_similarity","last_synced_at":"2025-11-01T15:30:20.734Z","repository":{"id":169844035,"uuid":"645910800","full_name":"fdncred/nu_plugin_str_similarity","owner":"fdncred","description":"A nushell plugin that helps you calculate the edit distance between two strings using a variety of algorithms.","archived":true,"fork":false,"pushed_at":"2024-09-19T16:30:51.000Z","size":98,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-28T12:40:39.742Z","etag":null,"topics":["distance","edit","similarity","string"],"latest_commit_sha":null,"homepage":"https://github.com/fdncred/nu_plugin_str_similarity","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/fdncred.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}},"created_at":"2023-05-26T18:28:18.000Z","updated_at":"2024-09-19T16:31:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"37af3e6a-5d50-4943-b373-a0cbf7eb3a92","html_url":"https://github.com/fdncred/nu_plugin_str_similarity","commit_stats":null,"previous_names":["fdncred/nu_plugin_str_similarity"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdncred%2Fnu_plugin_str_similarity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdncred%2Fnu_plugin_str_similarity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdncred%2Fnu_plugin_str_similarity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdncred%2Fnu_plugin_str_similarity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fdncred","download_url":"https://codeload.github.com/fdncred/nu_plugin_str_similarity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239297764,"owners_count":19615750,"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":["distance","edit","similarity","string"],"created_at":"2024-08-01T10:00:43.446Z","updated_at":"2025-11-01T15:30:20.702Z","avatar_url":"https://github.com/fdncred.png","language":"Rust","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"I'm archiving this repo because I combined this functionality in the `nu_plugin_strutils` nushell plugin at https://github.com/fdncred/nu_plugin_strutils\n\n# nu_plugin_str_similarity\n\nThis plugin uses the [textdistance.rs](https://crates.io/crates/textdistance) crate to calculate edit distance\n\n## Usage:\n\n### Single Algorithm Usage\n\n```shell\n❯ \"nushell\" | str similarity \"nutshell\" --algorithm levenshtein\n1\n```\n\n### All Algorithms Usage\n\n```bash\n❯ \"nushell\" | str similarity \"nutshell\" -all\n```\n```\n╭────┬────────────────────────────┬──────────╮\n│  # │         algorithm          │ distance │\n├────┼────────────────────────────┼──────────┤\n│  0 │ bag                        │        1 │\n│  1 │ cosine                     │     0.94 │\n│  2 │ damerau_levenshtein        │        1 │\n│  3 │ entropy_ncd                │     0.05 │\n│  4 │ hamming                    │        5 │\n│  5 │ jaccard                    │     0.88 │\n│  6 │ jaro                       │     0.96 │\n│  7 │ jaro_winkler               │     0.97 │\n│  8 │ levenshtein                │        1 │\n│  9 │ longest_common_subsequence │        7 │\n│ 10 │ longest_common_substring   │        5 │\n│ 11 │ length                     │        1 │\n│ 12 │ lig3                       │     0.86 │\n│ 13 │ mlipns                     │        0 │\n│ 14 │ overlap                    │        1 │\n│ 15 │ prefix                     │        2 │\n│ 16 │ ratcliff_obershelp         │     0.93 │\n│ 17 │ roberts                    │     0.93 │\n│ 18 │ sift4_common               │        1 │\n│ 19 │ sift4_simple               │        1 │\n│ 20 │ smith_waterman             │        6 │\n│ 21 │ sorensen_dice              │     0.93 │\n│ 22 │ suffix                     │        5 │\n│ 23 │ tversky                    │     0.88 │\n│ 24 │ yujian_bo                  │     0.12 │\n├────┼────────────────────────────┼──────────┤\n│  # │         algorithm          │ distance │\n╰────┴────────────────────────────┴──────────╯\n```\n\n### All Algorithms Normalized Usage\n\nThe output is normalized between 0 and 1\n\n```shell\n❯ \"nushell\" | str similarity \"nutshell\" --all --normalize\n```\n```\n╭────┬────────────────────────────┬──────────╮\n│  # │         algorithm          │ distance │\n├────┼────────────────────────────┼──────────┤\n│  0 │ bag                        │     0.12 │\n│  1 │ cosine                     │     0.94 │\n│  2 │ damerau_levenshtein        │     0.12 │\n│  3 │ entropy_ncd                │     0.05 │\n│  4 │ hamming                    │     0.62 │\n│  5 │ jaccard                    │     0.88 │\n│  6 │ jaro                       │     0.96 │\n│  7 │ jaro_winkler               │     0.97 │\n│  8 │ levenshtein                │     0.12 │\n│  9 │ longest_common_subsequence │     0.88 │\n│ 10 │ longest_common_substring   │     0.62 │\n│ 11 │ length                     │     0.12 │\n│ 12 │ lig3                       │     0.86 │\n│ 13 │ mlipns                     │        0 │\n│ 14 │ overlap                    │        1 │\n│ 15 │ prefix                     │     0.25 │\n│ 16 │ ratcliff_obershelp         │     0.93 │\n│ 17 │ roberts                    │     0.93 │\n│ 18 │ sift4_common               │     0.12 │\n│ 19 │ sift4_simple               │     0.12 │\n│ 20 │ smith_waterman             │     0.75 │\n│ 21 │ sorensen_dice              │     0.93 │\n│ 22 │ suffix                     │     0.62 │\n│ 23 │ tversky                    │     0.88 │\n│ 24 │ yujian_bo                  │     0.12 │\n├────┼────────────────────────────┼──────────┤\n│  # │         algorithm          │ distance │\n╰────┴────────────────────────────┴──────────╯\n```\n\n## List the available algorithms and aliases\n\n```\n❯ \"nushell\" | str similarity \"nutshell\" --list\n╭────┬────────────────────────────┬──────────╮\n│  # │         algorithm          │  alias   │\n├────┼────────────────────────────┼──────────┤\n│  0 │ bag                        │ bag      │\n│  1 │ cosine                     │ cos      │\n│  2 │ damerau_levenshtein        │ dlev     │\n│  3 │ entropy_ncd                │ entncd   │\n│  4 │ hamming                    │ ham      │\n│  5 │ jaccard                    │ jac      │\n│  6 │ jaro                       │ jar      │\n│  7 │ jaro_winkler               │ jarw     │\n│  8 │ levenshtein                │ lev      │\n│  9 │ longest_common_subsequence │ lcsubseq │\n│ 10 │ longest_common_substring   │ lcsubstr │\n│ 11 │ length                     │ len      │\n│ 12 │ lig3                       │ lig      │\n│ 13 │ mlipns                     │ mli      │\n│ 14 │ overlap                    │ olap     │\n│ 15 │ prefix                     │ pre      │\n│ 16 │ ratcliff_obershelp         │ rat      │\n│ 17 │ roberts                    │ rob      │\n│ 18 │ sift4_common               │ scom     │\n│ 19 │ sift4_simple               │ ssim     │\n│ 20 │ smith_waterman             │ smithw   │\n│ 21 │ sorensen_dice              │ soredice │\n│ 22 │ suffix                     │ suf      │\n│ 23 │ tversky                    │ tv       │\n│ 24 │ yujian_bo                  │ ybo      │\n├────┼────────────────────────────┼──────────┤\n│  # │         algorithm          │  alias   │\n╰────┴────────────────────────────┴──────────╯\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdncred%2Fnu_plugin_str_similarity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdncred%2Fnu_plugin_str_similarity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdncred%2Fnu_plugin_str_similarity/lists"}