{"id":18903763,"url":"https://github.com/bububa/cilin","last_synced_at":"2025-08-02T02:35:50.931Z","repository":{"id":57649130,"uuid":"383408475","full_name":"bububa/cilin","owner":"bububa","description":"基于哈工大同义词词林扩展版的单词相似度计算方法","archived":false,"fork":false,"pushed_at":"2021-07-06T09:15:58.000Z","size":422,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T11:41:27.790Z","etag":null,"topics":["cilin","nlp","similarity","word-similarity"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bububa.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}},"created_at":"2021-07-06T09:11:35.000Z","updated_at":"2024-07-11T03:37:29.000Z","dependencies_parsed_at":"2022-09-26T20:30:46.248Z","dependency_job_id":null,"html_url":"https://github.com/bububa/cilin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bububa/cilin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bububa%2Fcilin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bububa%2Fcilin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bububa%2Fcilin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bububa%2Fcilin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bububa","download_url":"https://codeload.github.com/bububa/cilin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bububa%2Fcilin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268328177,"owners_count":24232821,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":["cilin","nlp","similarity","word-similarity"],"created_at":"2024-11-08T09:06:17.900Z","updated_at":"2025-08-02T02:35:50.901Z","avatar_url":"https://github.com/bububa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 同义词词林扩展版\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/bububa/cilin.svg)](https://pkg.go.dev/github.com/bububa/cilin)\n[![Go](https://github.com/bububa/cilin/actions/workflows/go.yml/badge.svg)](https://github.com/bububa/cilin/actions/workflows/go.yml)\n[![goreleaser](https://github.com/bububa/cilin/actions/workflows/goreleaser.yml/badge.svg)](https://github.com/bububa/cilin/actions/workflows/goreleaser.yml)\n[![GitHub go.mod Go version of a Go module](https://img.shields.io/github/go-mod/go-version/bububa/cilin.svg)](https://github.com/bububa/cilin)\n[![GoReportCard](https://goreportcard.com/badge/github.com/bububa/cilin)](https://goreportcard.com/report/github.com/bububa/cilin)\n[![GitHub license](https://img.shields.io/github/license/bububa/cilin.svg)](https://github.com/bububa/cilin/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/bububa/cilin.svg)](https://GitHub.com/bububa/cilin/releases/)\n\n\nWord similarity computation based on Tongyici Cilin.\n这是一个基于哈工大同义词词林扩展版的单词相似度计算方法的golang实现，参考论文如下：\n2010 田久乐等，吉林大学学报（信息科学版），基于同义词词林的词语相似度计算方法。\n\n## Install\ngo get -u github.com/bububa/cilin\n\n## Usage \n```golang\nimport \"github.com/bububa/cilin\"\n\ncs := cilin.NewSimilarity()\nw1 := \"抄袭\"\nw2 := \"克隆\"\nsim := cs.Calculate(w1, w2)\nfmt.Printf(\"%s %s 相似度为 %f\\n\", w1, w2, sim)\n// 抄袭 克隆 相似度为 0.585642777645155\n\nw1 = \"人民\"\nlst := []string{\"国民\", \"群众\", \"党群\", \"良民\", \"同志\", \"成年人\", \"市民\", \"亲属\", \"志愿者\", \"先锋\"}\nfor _, w2 := range lst {\n    sim := s.Calculate(w1, w2)\n    fmt.Printf(\"%s %s, 相似度:%f\\n\", w1, w2, sim)\n}\n\n// 人民 国民, 相似度:1.000000\n// 人民 群众, 相似度:0.957661\n// 人民 党群, 相似度:0.897808\n// 人民 良民, 相似度:0.718246\n// 人民 同志, 相似度:0.663015\n// 人民 成年人, 相似度:0.630692\n// 人民 市民, 相似度:0.540593\n// 人民 亲属, 相似度:0.360396\n// 人民 志愿者, 相似度:0.225247\n// 人民 先锋, 相似度:0.180198\n```\n\n## 同类项目\n\n- \n- https://github.com/ashengtx/CilinSimilarity  实现了三种计算方法。\n- https://github.com/Xls1994/Cilin\n- http://www.codepub.cn/2015/08/04/Based-on-the-extended-version-of-synonyms-Cilin-word-similarity-computing/  Java实现\n\n## 致谢\n\n本代码的实现要感谢下面几位作者：\n* 哈工大信息检索研究室所著的《哈工大信息检索研究室同义词词林扩展版》\n* 田久乐  赵 蔚在2010年所发表论文\u003c基于同义词词林的词语相似度计算方法\u003e\n* http://codepub.cn/2015/08/04/Based-on-the-extended-version-of-synonyms-Cilin-word-similarity-computing/\n* http://www.cnblogs.com/einyboy/archive/2012/09/09/2677265.html?from=singlemessage\u0026isappinstalled=0\n* 本代码参考了https://github.com/ashengtx/CilinSimilarity 部分实现\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbububa%2Fcilin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbububa%2Fcilin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbububa%2Fcilin/lists"}