{"id":13413378,"url":"https://github.com/eaigner/shield","last_synced_at":"2026-03-11T02:03:36.928Z","repository":{"id":7957490,"uuid":"9354270","full_name":"eaigner/shield","owner":"eaigner","description":"Bayesian text classifier with flexible tokenizers and storage backends for Go","archived":false,"fork":false,"pushed_at":"2020-03-04T03:41:47.000Z","size":225,"stargazers_count":158,"open_issues_count":5,"forks_count":33,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-12-18T07:59:19.632Z","etag":null,"topics":[],"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/eaigner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-10T19:38:16.000Z","updated_at":"2024-11-10T03:46:58.000Z","dependencies_parsed_at":"2022-09-04T22:11:45.755Z","dependency_job_id":null,"html_url":"https://github.com/eaigner/shield","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eaigner/shield","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaigner%2Fshield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaigner%2Fshield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaigner%2Fshield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaigner%2Fshield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eaigner","download_url":"https://codeload.github.com/eaigner/shield/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaigner%2Fshield/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30367810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"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":[],"created_at":"2024-07-30T20:01:38.952Z","updated_at":"2026-03-11T02:03:36.900Z","avatar_url":"https://github.com/eaigner.png","language":"Go","readme":"Shield is a bayesian text classifier with flexible tokenizer and backend store support\n\nCurrently implemented:\n\n- Redis backend\n- English tokenizer\n\n## Example\n\n```go\npackage main\n\nimport (\n  \"github.com/eaigner/shield\"\n)\n\nfunc main() {\n  sh := shield.New(\n    shield.NewEnglishTokenizer(),\n    shield.NewRedisStore(\"127.0.0.1:6379\", \"\", 0),\n  )\n\n  sh.Learn(\"good\", \"sunshine drugs love sex lobster sloth\")\n  sh.Learn(\"bad\", \"fear death horror government zombie god\")\n\n  c, _ := sh.Classify(\"sloths are so cute i love them\")\n  if c != \"good\" {\n    panic(c)\n  }\n\n  c, _ = sh.Classify(\"i fear god and love the government\")\n  if c != \"bad\" {\n    panic(c)\n  }\n}\n```","funding_links":[],"categories":["機器學習","Machine Learning","Relational Databases","机器学习","\u003cspan id=\"机器学习-machine-learning\"\u003e机器学习 Machine Learning\u003c/span\u003e"],"sub_categories":["高級控制台界面","Advanced Console UIs","Search and Analytic Databases","SQL 查询语句构建库","检索及分析资料库","Middlewares","交流","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","高级控制台界面"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feaigner%2Fshield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feaigner%2Fshield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feaigner%2Fshield/lists"}