{"id":23408510,"url":"https://github.com/michurin/ngramindex","last_synced_at":"2025-06-12T22:32:56.200Z","repository":{"id":269150177,"uuid":"906572540","full_name":"michurin/ngramindex","owner":"michurin","description":"Golang ngram index implementation","archived":false,"fork":false,"pushed_at":"2025-06-04T01:33:03.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-12T22:32:42.287Z","etag":null,"topics":["go","golang","index","ngram","ngrams","search","trigram","trigrams"],"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/michurin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-21T09:23:23.000Z","updated_at":"2025-06-04T01:33:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"00fc881a-68bc-45cf-8ed1-46171aa663e8","html_url":"https://github.com/michurin/ngramindex","commit_stats":null,"previous_names":["michurin/ngramindex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/michurin/ngramindex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michurin%2Fngramindex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michurin%2Fngramindex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michurin%2Fngramindex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michurin%2Fngramindex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michurin","download_url":"https://codeload.github.com/michurin/ngramindex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michurin%2Fngramindex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259541662,"owners_count":22873725,"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","golang","index","ngram","ngrams","search","trigram","trigrams"],"created_at":"2024-12-22T15:15:12.435Z","updated_at":"2025-06-12T22:32:56.165Z","avatar_url":"https://github.com/michurin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# N-gram Indexing and Searching\n\n[![lint](https://github.com/michurin/ngramindex/actions/workflows/lint.yaml/badge.svg)](https://github.com/michurin/ngramindex/actions/workflows/lint.yaml)\n[![test](https://github.com/michurin/ngramindex/actions/workflows/test.yaml/badge.svg)](https://github.com/michurin/ngramindex/actions/workflows/test.yaml)\n[![codecov](https://github.com/michurin/ngramindex/actions/workflows/codecov.yaml/badge.svg)](https://github.com/michurin/ngramindex/actions/workflows/codecov.yaml)\n[![codecov](https://codecov.io/gh/michurin/ngramindex/graph/badge.svg?token=E9VIN7R58G)](https://codecov.io/gh/michurin/ngramindex)\n[![Go Report Card](https://goreportcard.com/badge/github.com/michurin/ngramindex)](https://goreportcard.com/report/github.com/michurin/ngramindex)\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/michurin/ngramindex)\n[![go.dev play](https://shields.io/badge/go.dev-play-089?logo=go\u0026logoColor=white\u0026style=flat)](https://go.dev/play/p/QClnrDlruau)\n\nN-gram indexing is a simple and powerful lookup technique. It is based on approximate (fuzzy) string matching.\n\n## Motivation\n\nThe package offers advantages:\n\n- Document type agnostic, thanks to generics.\n- Rune based and Unicode friendly.\n- Adjustable text normalization to manage things like case sensibility, spaces and punctuation handling, extra typos tolerance etc.\n- Simple ranking algorithm out of the box.\n- Ability to customize ranking algorithm entirely up to your implementation of less-function for sorting.\n- Ability to associate one document with several texts and lookup by several texts\n\n## Examples\n\n- [Life example](https://go.dev/play/p/QClnrDlruau).\n- [Examples in documentation](https://pkg.go.dev/github.com/michurin/ngramindex), [the same examples right in this repository](https://github.com/michurin/ngramindex/blob/master/example_test.go).\n\n## Known issues\n\n- Beware: index modification is not thread safe.\n- It is in-memory implementation.\n- There is no way to import/export/save/restore the index.\n- It is impossible to remove document from index.\n\n## Related links\n\n- [Russ Cox - Regular Expression Matching with a Trigram Index or How Google Code Search Worked](https://swtch.com/~rsc/regexp/regexp4.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichurin%2Fngramindex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichurin%2Fngramindex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichurin%2Fngramindex/lists"}