{"id":13413535,"url":"https://github.com/abadojack/whatlanggo","last_synced_at":"2026-02-22T04:04:34.147Z","repository":{"id":48412423,"uuid":"82584355","full_name":"abadojack/whatlanggo","owner":"abadojack","description":"Natural language detection library for Go","archived":false,"fork":false,"pushed_at":"2023-03-28T08:08:05.000Z","size":246,"stargazers_count":640,"open_issues_count":13,"forks_count":66,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-10-25T05:24:22.061Z","etag":null,"topics":["go","language","nlp","text-processing"],"latest_commit_sha":null,"homepage":null,"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/abadojack.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":"SUPPORTED_LANGUAGES.md","governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-20T17:32:01.000Z","updated_at":"2024-10-21T18:34:02.000Z","dependencies_parsed_at":"2024-01-08T15:34:45.086Z","dependency_job_id":null,"html_url":"https://github.com/abadojack/whatlanggo","commit_stats":{"total_commits":29,"total_committers":7,"mean_commits":4.142857142857143,"dds":0.3448275862068966,"last_synced_commit":"9a096a12270b527608792719d6e75e68a8bbfb03"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/abadojack/whatlanggo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abadojack%2Fwhatlanggo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abadojack%2Fwhatlanggo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abadojack%2Fwhatlanggo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abadojack%2Fwhatlanggo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abadojack","download_url":"https://codeload.github.com/abadojack/whatlanggo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abadojack%2Fwhatlanggo/sbom","scorecard":{"id":159781,"data":{"date":"2025-08-11","repo":{"name":"github.com/abadojack/whatlanggo","commit":"9a096a12270b527608792719d6e75e68a8bbfb03"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":2,"reason":"Found 6/21 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T13:01:06.764Z","repository_id":48412423,"created_at":"2025-08-16T13:01:06.764Z","updated_at":"2025-08-16T13:01:06.764Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29704420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T03:17:42.375Z","status":"ssl_error","status_checked_at":"2026-02-22T03:17:31.622Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["go","language","nlp","text-processing"],"created_at":"2024-07-30T20:01:42.632Z","updated_at":"2026-02-22T04:04:34.129Z","avatar_url":"https://github.com/abadojack.png","language":"Go","readme":"# Whatlanggo\n\n[![Build Status](https://travis-ci.org/abadojack/whatlanggo.svg?branch=master)](https://travis-ci.org/abadojack/whatlanggo)  [![Go Report Card](https://goreportcard.com/badge/github.com/abadojack/whatlanggo)](https://goreportcard.com/report/github.com/abadojack/whatlanggo)  [![GoDoc](https://godoc.org/github.com/abadojack/whatlanggo?status.png)](https://godoc.org/github.com/abadojack/whatlanggo) [![Coverage Status](https://coveralls.io/repos/github/abadojack/whatlanggo/badge.svg)](https://coveralls.io/github/abadojack/whatlanggo)\n\nNatural language detection for Go.\n## Features\n* Supports [84 languages](https://github.com/abadojack/whatlanggo/blob/master/SUPPORTED_LANGUAGES.md)\n* 100% written in Go\n* No external dependencies\n* Fast\n* Recognizes not only a language, but also a script (Latin, Cyrillic, etc)\n\n## Getting started\nInstallation:\n```sh\n    go get -u github.com/abadojack/whatlanggo\n```\n\nSimple usage example:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/abadojack/whatlanggo\"\n)\n\nfunc main() {\n\tinfo := whatlanggo.Detect(\"Foje funkcias kaj foje ne funkcias\")\n\tfmt.Println(\"Language:\", info.Lang.String(), \" Script:\", whatlanggo.Scripts[info.Script], \" Confidence: \", info.Confidence)\n}\n```\n\n## Blacklisting and whitelisting\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/abadojack/whatlanggo\"\n)\n\nfunc main() {\n\t//Blacklist\n\toptions := whatlanggo.Options{\n\t\tBlacklist: map[whatlanggo.Lang]bool{\n\t\t\twhatlanggo.Ydd: true,\n\t\t},\n\t}\n\n\tinfo := whatlanggo.DetectWithOptions(\"האקדמיה ללשון העברית\", options)\n\n\tfmt.Println(\"Language:\", info.Lang.String(), \"Script:\", whatlanggo.Scripts[info.Script])\n\n\t//Whitelist\n\toptions1 := whatlanggo.Options{\n\t\tWhitelist: map[whatlanggo.Lang]bool{\n\t\t\twhatlanggo.Epo: true,\n\t\t\twhatlanggo.Ukr: true,\n\t\t},\n\t}\n\n\tinfo = whatlanggo.DetectWithOptions(\"Mi ne scias\", options1)\n\tfmt.Println(\"Language:\", info.Lang.String(), \" Script:\", whatlanggo.Scripts[info.Script])\n}\n```\nFor more details, please check the [documentation](https://godoc.org/github.com/abadojack/whatlanggo).\n\n## Requirements\nGo 1.8 or higher\n\n## How does it work?\n\n### How does the language recognition work?\n\nThe algorithm is based on the trigram language models, which is a particular case of n-grams.\nTo understand the idea, please check the original whitepaper [Cavnar and Trenkle '94: N-Gram-Based Text Categorization'](https://www.researchgate.net/publication/2375544_N-Gram-Based_Text_Categorization).\n\n### How _IsReliable_ calculated?\n\nIt is based on the following factors:\n* How many unique trigrams are in the given text\n* How big is the difference between the first and the second(not returned) detected languages? This metric is called `rate` in the code base.\n\nTherefore, it can be presented as 2d space with threshold functions, that splits it into \"Reliable\" and \"Not reliable\" areas.\nThis function is a hyperbola and it looks like the following one:\n\n\u003cimg alt=\"Language recognition whatlang rust\" src=\"https://raw.githubusercontent.com/abadojack/whatlanggo/master/images/whatlang_is_reliable.png\" width=\"450\" height=\"300\" /\u003e\n\nFor more details, please check a blog article [Introduction to Rust Whatlang Library and Natural Language Identification Algorithms](https://www.greyblake.com/blog/2017-07-30-introduction-to-rust-whatlang-library-and-natural-language-identification-algorithms/).\n\n## License\n[MIT](https://github.com/abadojack/whatlanggo/blob/master/LICENSE)\n\n## Derivation\nwhatlanggo is a derivative of [Franc](https://github.com/wooorm/franc) (JavaScript, MIT) by [Titus Wormer](https://github.com/wooorm).\n\n## Acknowledgements\nThanks to [greyblake](https://github.com/greyblake) (Potapov Sergey) for creating [whatlang-rs](https://github.com/greyblake/whatlang-rs) from where I got the idea and algorithms.\n","funding_links":[],"categories":["开源类库","Natural Language Processing","Open source library","自然语言处理","Relational Databases","\u003cspan id=\"自然语言处理-natural-language-processing\"\u003e自然语言处理 Natural Language Processing\u003c/span\u003e","语言检测和处理","Microsoft Office","Bot Building"],"sub_categories":["文本处理","Uncategorized","Word Processing","暂未分类","Strings","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","交互工具","Language Detection","Advanced Console UIs","语言检测","暂未分类这些库被放在这里是因为其他类别似乎都不适合。","交流"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabadojack%2Fwhatlanggo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabadojack%2Fwhatlanggo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabadojack%2Fwhatlanggo/lists"}