{"id":15718538,"url":"https://github.com/dav009/flash","last_synced_at":"2025-04-30T07:08:38.481Z","repository":{"id":57497043,"uuid":"103946182","full_name":"dav009/flash","owner":"dav009","description":"Golang Keyword extraction/replacement Datastructure using Tries instead of regexes","archived":false,"fork":false,"pushed_at":"2017-12-15T08:13:20.000Z","size":8,"stargazers_count":89,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-30T07:08:30.207Z","etag":null,"topics":["data-extraction","go","golang","search","text","text-search","trie"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dav009.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":"2017-09-18T13:59:43.000Z","updated_at":"2024-08-17T17:15:36.000Z","dependencies_parsed_at":"2022-09-03T23:51:02.682Z","dependency_job_id":null,"html_url":"https://github.com/dav009/flash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dav009%2Fflash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dav009%2Fflash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dav009%2Fflash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dav009%2Fflash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dav009","download_url":"https://codeload.github.com/dav009/flash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251658208,"owners_count":21622820,"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":["data-extraction","go","golang","search","text","text-search","trie"],"created_at":"2024-10-03T21:53:19.278Z","updated_at":"2025-04-30T07:08:38.457Z","avatar_url":"https://github.com/dav009.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Flash\n\n![](https://raw.githubusercontent.com/dav009/flash/master/ico.png)\n\nFast Keyword extraction using [Aho–Corasick algorithm](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm)  and Tries.\n\nFlash is a Golang reimplementation of [Flashtext](https://github.com/vi3k6i5/flashtext),\n\nThis is meant to be used when you have a large number of words that you want to:\n - extract from text\n - search and replace\n\nFlash is meant as a replacement for Regex, which in such cases can be extremely slow.\n\n## Usage\n\n```go\n\nimport \"github.com/dav009/flash\"\n\nwords := flash.NewKeywords()\nwords.Add(\"New York\")\nwords.Add(\"Hello\")\nwords.Add(\"Tokyo\")\nfoundKeywords := words.Extract(\"New York and Tokyo are Cities\")\nfmt.Println(foundKeywords)\n// [New York, Tokyo]\n```\n\n\n## Benchmarks\n\nAs a reference using go-flash with 10K keywords in a 1000 sentence text, took 7.3ms,\nwhile using regexes took 1minute 37s.\n\n\n| Sentences | Keywords | String.Contains | Regex    | Go-Flash |\n|-----------|----------|-----------------|----------|----------|\n| 1000      | 10K      | 1.0035s         | 1min 37s | 2.72ms \n\n\n## Warning\n\nThis is a toy-project for me to get more familiar with Golang\nPlease be-aware of potential issues.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdav009%2Fflash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdav009%2Fflash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdav009%2Fflash/lists"}