{"id":13413563,"url":"https://github.com/osamingo/shamoji","last_synced_at":"2025-07-17T20:42:20.143Z","repository":{"id":23078621,"uuid":"98079587","full_name":"osamingo/shamoji","owner":"osamingo","description":"The shamoji (杓文字) is a word filtering package","archived":false,"fork":false,"pushed_at":"2025-03-22T17:26:47.000Z","size":45,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T02:03:03.317Z","etag":null,"topics":["go","tokenizer","word-filter"],"latest_commit_sha":null,"homepage":"","language":"Go","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/osamingo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"osamingo","custom":"https://paypal.me/osamingo"}},"created_at":"2017-07-23T06:38:42.000Z","updated_at":"2025-03-22T17:26:27.000Z","dependencies_parsed_at":"2025-05-12T13:36:56.365Z","dependency_job_id":null,"html_url":"https://github.com/osamingo/shamoji","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/osamingo/shamoji","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osamingo%2Fshamoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osamingo%2Fshamoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osamingo%2Fshamoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osamingo%2Fshamoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osamingo","download_url":"https://codeload.github.com/osamingo/shamoji/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osamingo%2Fshamoji/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265660425,"owners_count":23807140,"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":["go","tokenizer","word-filter"],"created_at":"2024-07-30T20:01:43.261Z","updated_at":"2025-07-17T20:42:20.105Z","avatar_url":"https://github.com/osamingo.png","language":"Go","funding_links":["https://github.com/sponsors/osamingo","https://paypal.me/osamingo"],"categories":["自然语言处理","Natural Language Processing","Bot Building","Microsoft Office","Relational Databases","\u003cspan id=\"自然语言处理-natural-language-processing\"\u003e自然语言处理 Natural Language Processing\u003c/span\u003e"],"sub_categories":["分词器","Strings","Tokenizers","暂未分类这些库被放在这里是因为其他类别似乎都不适合。","暂未分类","Advanced Console UIs","交流","Uncategorized","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e"],"readme":"# shamoji\n\n[![CI](https://github.com/osamingo/shamoji/actions/workflows/actions.yml/badge.svg)](https://github.com/osamingo/shamoji/actions/workflows/actions.yml)\n[![codecov](https://codecov.io/gh/osamingo/shamoji/branch/master/graph/badge.svg)](https://codecov.io/gh/osamingo/shamoji)\n[![Go Report Card](https://goreportcard.com/badge/github.com/osamingo/shamoji)](https://goreportcard.com/report/github.com/osamingo/shamoji)\n[![codebeat badge](https://codebeat.co/badges/9d9fdf3d-0c6d-455f-8444-8399a07d49ae)](https://codebeat.co/projects/github-com-osamingo-shamoji-master)\n[![GoDoc](https://godoc.org/github.com/osamingo/shamoji?status.svg)](https://godoc.org/github.com/osamingo/shamoji)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/osamingo/shamoji/master/LICENSE)\n\n## About\n\nThe shamoji (杓文字) is word filtering package.\n\n## Install\n\n```\n$ go get github.com/osamingo/shamoji@latest\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\n\t\"github.com/osamingo/shamoji\"\n\t\"github.com/osamingo/shamoji/filter\"\n\t\"github.com/osamingo/shamoji/tokenizer\"\n\t\"golang.org/x/text/unicode/norm\"\n)\n\nvar (\n\to sync.Once\n\ts *shamoji.Serve\n)\n\nfunc main() {\n\tyes, word := Contains(\"我が生涯に一片の悔い無し\")\n\tfmt.Printf(\"Result: %v, Word: %s\", yes, word)\n}\n\nfunc Contains(sentence string) (bool, string) {\n\to.Do(func() {\n\t\ttok, err := tokenizer.NewKagomeTokenizer(norm.NFKC)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\ts = \u0026shamoji.Serve{\n\t\t\tTokenizer: tok,\n\t\t\tFiler:     filter.NewCuckooFilter(\"涯に\", \"悔い\"),\n\t\t}\n\t})\n\treturn s.Do(sentence)\n}\n```\n\n## License\n\nReleased under the [MIT License](https://github.com/osamingo/shamoji/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosamingo%2Fshamoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosamingo%2Fshamoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosamingo%2Fshamoji/lists"}