{"id":16532637,"url":"https://github.com/hamedfathi/simmetricscore","last_synced_at":"2025-07-12T02:40:39.964Z","repository":{"id":90748430,"uuid":"426098336","full_name":"HamedFathi/SimMetricsCore","owner":"HamedFathi","description":"A text similarity metric library, e.g. from edit distance's (Levenshtein, Gotoh, Jaro, etc) to other metrics, (e.g Soundex, Chapman). This library is compiled based on the .NET standard with a lot of useful extension methods.","archived":false,"fork":false,"pushed_at":"2021-11-21T12:29:07.000Z","size":38,"stargazers_count":9,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-01T14:51:12.509Z","etag":null,"topics":["csharp","dotnet","fuzzy","fuzzy-search","jaro","jaro-distance","jaro-winkler","jaro-winkler-distance","levenshtein","levenshtein-distance","metric","metrics","similarity","similarity-score"],"latest_commit_sha":null,"homepage":"","language":"C#","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/HamedFathi.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":"2021-11-09T05:07:02.000Z","updated_at":"2024-07-27T19:29:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"d62bed48-b1d6-4f05-b5a7-c0a9266756ac","html_url":"https://github.com/HamedFathi/SimMetricsCore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HamedFathi%2FSimMetricsCore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HamedFathi%2FSimMetricsCore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HamedFathi%2FSimMetricsCore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HamedFathi%2FSimMetricsCore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HamedFathi","download_url":"https://codeload.github.com/HamedFathi/SimMetricsCore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238638489,"owners_count":19505612,"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":["csharp","dotnet","fuzzy","fuzzy-search","jaro","jaro-distance","jaro-winkler","jaro-winkler-distance","levenshtein","levenshtein-distance","metric","metrics","similarity","similarity-score"],"created_at":"2024-10-11T18:13:06.747Z","updated_at":"2025-02-13T10:32:15.020Z","avatar_url":"https://github.com/HamedFathi.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![opacity](https://user-images.githubusercontent.com/8418700/140907888-9ced967b-8ade-4bd5-ac1e-903b76c360ef.png)\n\n### [Nuget](https://www.nuget.org/packages/SimMetricsCore)\n\n[![Open Source Love](https://badges.frapsoft.com/os/mit/mit.svg?v=102)](https://opensource.org/licenses/MIT)\n![Nuget](https://img.shields.io/nuget/v/SimMetricsCore)\n![Nuget](https://img.shields.io/nuget/dt/SimMetricsCore)\n\n\n```\nInstall-Package SimMetricsCore\n\ndotnet add package SimMetricsCore\n```\n\n\u003chr/\u003e\n\n`SimMetricsCore` supports the following algorithms\n\n```\nBlockDistance\nChapmanLengthDeviation\nChapmanMeanLength\nCosineSimilarity\nDiceSimilarity\nEuclideanDistance\nJaccardSimilarity\nJaro \nJaroWinkler \nLevenstein // Default\nMatchingCoefficient \nMongeElkan\nNeedlemanWunch \nOverlapCoefficient\nQGramsDistance\nSmithWaterman \nSmithWatermanGotoh\nSmithWatermanGotohWindowedAffine\n```\n\n\n### Extension Methods\n\n\n```cs\n// GetSimilarity\n// [0-1] =\u003e [0%-100%] similarity \ndouble GetSimilarity(this string firstWord, string secondWord, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\nSimMetricResult GetMinSimilarityInfo(this string first, IEnumerable\u003cstring\u003e second, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\n\n// GetSimilarities\n// Get similarity score for each input.\nIEnumerable\u003cSimMetricResult\u003e GetSimilarities(this string first, IEnumerable\u003cstring\u003e second, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\nIEnumerable\u003cSimMetricResult\u003e GetSimilarities(this string first, string[] second, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\n\n// GetMinSimilarity\n// Returns the first item that has the least similarity.\nstring GetMinSimilarity(this string first, IEnumerable\u003cstring\u003e second, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\nSimMetricResult GetMinSimilarityInfo(this string first, IEnumerable\u003cstring\u003e second, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\n\n// GetMinSimilarities\n// Returns the items that have the least similarity. \n// A list can contain unique items with the same similarity score.\nIEnumerable\u003cstring\u003e GetMinSimilarities(this string first, IEnumerable\u003cstring\u003e second, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\nIEnumerable\u003cSimMetricResult\u003e GetMinSimilaritiesInfo(this string first, IEnumerable\u003cstring\u003e second, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\n\n// GetMaxSimilarity\n// Returns the first item that has the most similarity.\nstring GetMaxSimilarity(this string first, IEnumerable\u003cstring\u003e second, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\nSimMetricResult GetMaxSimilarityInfo(this string first, IEnumerable\u003cstring\u003e second, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\n\n// GetMaxSimilarities\n// Returns the items that have the most similarity. \n// A list can contain unique items with the same similarity score.\nIEnumerable\u003cstring\u003e GetMaxSimilarities(this string first, IEnumerable\u003cstring\u003e second, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\nIEnumerable\u003cSimMetricResult\u003e GetMaxSimilaritiesInfo(this string first, IEnumerable\u003cstring\u003e second, SimMetricType simMetricType = SimMetricType.Levenstein, bool convertToPercentage = false)\n\n// Contains\n// Getting closer to '1.0' for the 'threshold' increases the accuracy of the comparison.\nbool ContainsFuzzy(this string source, string search, double threshold = 0.7, SimMetricType simMetricType = SimMetricType.Levenstein)\n// Returns approved values from the 'source' items.\nIEnumerable\u003cstring\u003e ContainsFuzzy(this IEnumerable\u003cstring\u003e source, string search, double threshold = 0.7, SimMetricType simMetricType = SimMetricType.Levenstein)\nIEnumerable\u003cstring\u003e ContainsFuzzy(this string[] source, string search, double threshold = 0.7, SimMetricType simMetricType = SimMetricType.Levenstein)\n```\n\n`SimMetricResult` class contains the following data:\n\n```cs\npublic class SimMetricResult\n{\n    public string Item { get; set; }\n    // [0-1] =\u003e [0%-100%] similarity \n    public double Score { get; set; }\n}\n```\n\n\u003chr/\u003e\n\u003cdiv\u003eIcons made by \u003ca href=\"https://www.freepik.com\" title=\"Freepik\"\u003eFreepik\u003c/a\u003e from \u003ca href=\"https://www.flaticon.com/\" title=\"Flaticon\"\u003ewww.flaticon.com\u003c/a\u003e\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamedfathi%2Fsimmetricscore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamedfathi%2Fsimmetricscore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamedfathi%2Fsimmetricscore/lists"}