getlang and lingua-go
These are direct competitors offering mutually exclusive solutions for language detection in Go, with lingua-go providing significantly superior accuracy through probabilistic n-gram analysis compared to getlang's simpler statistical approach.
About getlang
rylans/getlang
Natural language detection package in pure Go
About lingua-go
pemistahl/lingua-go
The most accurate natural language detection library for Go, suitable for short text and mixed-language text
Combines rule-based and statistical methods with pre-trained language models across 75 languages, requiring no external API calls or dictionaries. Supports both single-language and polyglot detection with configurable accuracy modes optimized for varying text lengths. Designed as a lightweight preprocessing component for NLP pipelines, offering offline functionality with minimal configuration overhead.
Related comparisons
Scores updated daily from GitHub, PyPI, and npm data. How scores work