{"id":24277633,"url":"https://github.com/nikdon/similaritymeasure","last_synced_at":"2026-06-06T11:31:48.955Z","repository":{"id":80099547,"uuid":"18240111","full_name":"nikdon/SimilarityMeasure","owner":"nikdon","description":"TF-IDF and similarity measure in C#","archived":false,"fork":false,"pushed_at":"2014-03-31T06:26:40.000Z","size":540,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T11:24:56.361Z","etag":null,"topics":["article","c-sharp","cosine-similarity","similarity-measures","tf-idf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikdon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-29T11:38:27.000Z","updated_at":"2020-10-26T21:17:33.000Z","dependencies_parsed_at":"2023-02-25T10:30:15.795Z","dependency_job_id":null,"html_url":"https://github.com/nikdon/SimilarityMeasure","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nikdon/SimilarityMeasure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikdon%2FSimilarityMeasure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikdon%2FSimilarityMeasure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikdon%2FSimilarityMeasure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikdon%2FSimilarityMeasure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikdon","download_url":"https://codeload.github.com/nikdon/SimilarityMeasure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikdon%2FSimilarityMeasure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33981122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-06T02:00:07.033Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["article","c-sharp","cosine-similarity","similarity-measures","tf-idf"],"created_at":"2025-01-15T23:58:28.166Z","updated_at":"2026-06-06T11:31:48.919Z","avatar_url":"https://github.com/nikdon.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Similarity Measure\n\n## Summary\nContent based similarity measure of the articles at given urls. Idea is based on representaton of each article as numerical statistic as per http://en.wikipedia.org/wiki/Tf%E2%80%93idf\n\nTerm frequency is modified as per http://nlp.stanford.edu/IR-book/html/htmledition/sublinear-tf-scaling-1.html\n\nAfter the representation of two articles as vectors similarity measures as cosine of the angle between them (see http://en.wikipedia.org/wiki/Cosine_similarity).\n\n## Example of usage\nFor comparison of two articles instance of SimilarityCalculator should be created:\n\n```csharp\nSimilarityCalculator sc = new SimilarityCalculator();\n```\n\nAfter that two urls can be passed as variables as well as threshold for vocabulary:\n\n```csharp\nstring url1 = \"http://www.dailymail.co.uk/news/article-2592103/Minister-faces-censure-expenses-abuse.html\";\nstring url2 = \"http://www.telegraph.co.uk/news/newstopics/mps-expenses/10729984/Maria-Miller-to-have-to-repay-thousands-of-pounds-and-apologise-over-expenses-claims.html\";\n\nint threshold = 3;\n\nsc.Compare(url1, url2, vocabularyThreshold: threshold);\n```\n\nAfter executing program will return something like:\n\n\u003e url1 consists of 424 words, url2 consists of 301 words.\n\u003e\n\u003e Vocabulary contains 41 words after tokenization and thresholding.\n\u003e\n\u003e Similarity is 0.8897\n\u003e\n\u003e Press any key","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikdon%2Fsimilaritymeasure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikdon%2Fsimilaritymeasure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikdon%2Fsimilaritymeasure/lists"}