Runs fully offline
Inference happens in-process inside the Rust binary. No sockets, no telemetry, no accounts — safe for air-gapped machines.
Linguae trains a character-level CNN from scratch with Candle and ships a standalone Rust binary. Your text never leaves your machine — no cloud APIs, no pretrained weights, no network calls.
$ linguae "Bonjour tout le monde"
fra
$ linguae --format json "Это тест"
{
"language": "rus",
"confidence": 0.98
}
A single static binary that does one thing well — identify languages — without phoning home.
Inference happens in-process inside the Rust binary. No sockets, no telemetry, no accounts — safe for air-gapped machines.
A character-level CNN trained with Candle on Tatoeba, WiLI-2018, and a curated word dataset. No pretrained weights to trust or audit.
Character-level encoding keeps the model compact. Detection of a sentence completes in milliseconds on CPU.
Pass text as an argument, a file with --file, or pipe it through stdin — it composes with standard Unix tools.
--confidence prints per-language scores and --format json emits structured output for scripts.
Detect languages across whole files or streams line by line — built for corpus-scale workloads.
Real output from the CLI — no mockups.
$ linguae "Bonjour tout le monde, comment allez-vous ?"
fra
$ linguae --format json "Это тестовый пример текста"
{
"language": "rus",
"confidence": 0.98
}
$ linguae --file texts.txt
fra
eng
rus
deu
From raw text to a language code in three steps.
Text is lowercased, stripped of diacritics variation, and mapped onto a fixed character vocabulary.
"Bonjour" → char indices
Characters become indices fed into a CharCNN — small kernels capture local n-gram patterns, global pooling summarizes the text.
CharCNN · Candle
The model emits a probability per language; the CLI prints the top ISO 639-3 code, or scores with --confidence.
fra 0.98 → "fra"
Requires Rust 1.85+. No Python runtime needed for the CLI.
$ git clone https://github.com/hieudoanm/linguae
$ cd linguae
$ cargo build --release -p linguae
$ ./target/release/linguae "Bonjour tout le monde"
fra
See the README for dataset and server details.