{"id":28436455,"url":"https://github.com/syyongx/go-wordsfilter","last_synced_at":"2025-06-27T18:31:13.468Z","repository":{"id":57482563,"uuid":"129337144","full_name":"syyongx/go-wordsfilter","owner":"syyongx","description":"A high performance sensitive word filter.","archived":false,"fork":false,"pushed_at":"2020-05-19T08:30:23.000Z","size":12,"stargazers_count":124,"open_issues_count":4,"forks_count":31,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-05T22:09:13.078Z","etag":null,"topics":["go","words-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/syyongx.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":"2018-04-13T02:33:16.000Z","updated_at":"2025-01-15T03:55:10.000Z","dependencies_parsed_at":"2022-09-02T06:20:23.989Z","dependency_job_id":null,"html_url":"https://github.com/syyongx/go-wordsfilter","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/syyongx/go-wordsfilter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syyongx%2Fgo-wordsfilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syyongx%2Fgo-wordsfilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syyongx%2Fgo-wordsfilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syyongx%2Fgo-wordsfilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syyongx","download_url":"https://codeload.github.com/syyongx/go-wordsfilter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syyongx%2Fgo-wordsfilter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262310771,"owners_count":23291619,"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","words-filter"],"created_at":"2025-06-05T22:09:13.041Z","updated_at":"2025-06-27T18:31:13.454Z","avatar_url":"https://github.com/syyongx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-wordsfilter\nA high performance text filter.\n\n## Download \u0026 Install\n```shell\ngo get github.com/syyongx/go-wordsfilter\n```\n\n## Quick Start\n```go\nimport (\n    \"github.com/syyongx/go-wordsfilter\"\n)\n\nfunc main() {\n    texts := []string{\n        \"Miyamoto Musashi\",\n        \"妲己\",\n        \"アンジェラ\",\n        \"ความรุ่งโรจน์\",\n    }\n    wf := wordsfilter.New()\n\n    // Generate\n    root := wf.Generate(texts)\n    // Generate with file\n    // root := wf.GenerateWithFile(path)\n\n    // Contains\n    c1 := wf.Contains(\"アン\", root)\n    // c1: false\n    c2 := wf.Contains(\"アンジェラ\", root)\n    // c2: true\n\n    // Remove\n    wf.Remove(\"アンジェラ\", root)\n    c3 := wf.Contains(\"アンジェラ\", root)\n    // c3: false\n\n    // Replace\n    r1 := wf.Replace(\"Game ความรุ่งโรจน์ i like 妲己 heroMiyamotoMusashi\", root)\n    // r1: Game*************ilike**hero***************\n}\n```\n\n## Apis\n```go\nNew() *WordsFilter\nGenerate(texts []string) map[string]*Node\nGenerateWithFile(path string) (map[string]*Node, error)\nAdd(text string, root map[string]*Node)\nReplace(text string, root map[string]*Node) string\nContains(text string, root map[string]*Node) bool\nRemove(text string, root map[string]*Node)\n```\n\n## LICENSE\ngo-wordsfilter source code is licensed under the [MIT](https://github.com/syyongx/go-wordsfilter/blob/master/LICENSE) Licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyyongx%2Fgo-wordsfilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyyongx%2Fgo-wordsfilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyyongx%2Fgo-wordsfilter/lists"}