{"id":32954994,"url":"https://github.com/Lazin/go-ngram","last_synced_at":"2025-11-13T03:00:56.459Z","repository":{"id":16189546,"uuid":"18936165","full_name":"Lazin/go-ngram","owner":"Lazin","description":"Ngram index for golang","archived":false,"fork":false,"pushed_at":"2016-05-27T14:42:31.000Z","size":27,"stargazers_count":114,"open_issues_count":0,"forks_count":17,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-06-20T13:31:55.989Z","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/Lazin.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":"2014-04-19T07:25:58.000Z","updated_at":"2024-06-02T20:25:45.000Z","dependencies_parsed_at":"2022-08-04T08:15:08.465Z","dependency_job_id":null,"html_url":"https://github.com/Lazin/go-ngram","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lazin/go-ngram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lazin%2Fgo-ngram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lazin%2Fgo-ngram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lazin%2Fgo-ngram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lazin%2Fgo-ngram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lazin","download_url":"https://codeload.github.com/Lazin/go-ngram/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lazin%2Fgo-ngram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284145006,"owners_count":26954846,"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","status":"online","status_checked_at":"2025-11-13T02:00:06.582Z","response_time":61,"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":"2025-11-12T22:00:41.096Z","updated_at":"2025-11-13T03:00:56.450Z","avatar_url":"https://github.com/Lazin.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":["Tools","[Tools](#tools-1)","Speech Recognition"],"readme":"go-ngram [![Build Status](https://travis-ci.org/Lazin/go-ngram.svg)](https://travis-ci.org/Lazin/go-ngram)\n========\n\nN-gram index for Go.\n\n## Key features\n\n* Unicode support.\n* Append only. Data can't be deleted from index.\n* GC friendly (all strings are pooled and compressed)\n* Application agnostic (there is no notion of document or something that user needs to implement)\n \n\n## Usage\n\n```go\nindex, err := ngram.NewNGramIndex(ngram.SetN(3))\ntokenId, err := index.Add(\"hello\") \nstr, err := index.GetString(tokenId)  // str == \"hello\"\nresultsList, err := index.Search(\"world\")\n```\n\n## TODO:\n\n* Smoothing functions (Laplace etc)\n\n[![GoDoc](https://godoc.org/github.com/Lazin/go-ngram?status.png)](https://godoc.org/github.com/Lazin/go-ngram)\n\n[![docs examples](https://sourcegraph.com/api/repos/github.com/Lazin/go-ngram/.badges/docs-examples.png)](https://sourcegraph.com/github.com/Lazin/go-ngram)\n\n[![library users](https://sourcegraph.com/api/repos/github.com/Lazin/go-ngram/.badges/library-users.png)](https://sourcegraph.com/github.com/Lazin/go-ngram)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLazin%2Fgo-ngram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLazin%2Fgo-ngram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLazin%2Fgo-ngram/lists"}