# pemistahl/lingua-go

The most accurate natural language detection library for Go, suitable for short text and mixed-language text

Repository: https://github.com/pemistahl/lingua-go
Canonical: https://ross.abutalabs.com/products/lingua-go
Language: Go
License: Apache-2.0
License Family: permissive
Topics: natural-language-processing, language-detection, language-recognition, language-classification, language-identification, language-processing, nlp, nlp-machine-learning, golang-library, go, language-modeling, text-processing
Last push: 2025-02-06T14:21:57+00:00

## Health v2 (maintenance only)
Score: 25/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 5, release rhythm 8, longevity 100
- inputs: {"age_days": 2105, "days_push": 573, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1359, forks 81 (observed 2026-08-28T04:04:29.825440+00:00)

## What it is
Lingua is a Go library for highly accurate natural language detection, supporting 75 languages. It works well on short and mixed-language text using rule-based and statistical methods, entirely offline.

## Use cases
- detect the language of a tweet or short text snippet
- identify languages in mixed-language text
- preprocess text for NLP classification pipelines
- route customer emails by language
- detect language of single words or phrases
- add offline language identification to a Go application

## When to choose
- you need accurate detection on short text like tweets or single words
- you need offline detection without external APIs
- you work in Go and need support for many languages
- your text may mix multiple languages

## When to avoid
- you need to detect languages outside the supported 75
- you need a library in a language other than Go
- you need extremely lightweight detection where model size matters more than accuracy

## Facets
- artifact type: library
- maturity: active
- function: nlp, parser
- domain: text-editors
- platform: go, cross-platform
- tags: language-detection, language-identification, offline, short-text, mixed-language-text, natural-language-processing

## Member repositories
- pemistahl/lingua-go (main) score 25

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:29.825440+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:41:43.218621+00:00, confidence not recorded.
  - readme: https://github.com/pemistahl/lingua-go (fetched 2026-08-28T04:04:29.825440+00:00, sha eeb9733e259f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
