Tongue
Identificación de idioma en el dispositivo que, con unas pocas palabras, acierta entre 84 opciones, en decenas de microsegundos.

Demo
Detecta el idioma con solo 3 palabras.
«kann ich das haben» es alemán. «안녕하세요» es coreano. Tres palabras son el caso difícil, y tres palabras son las que te da un cuadro de búsqueda.
Con tres palabras, Tongue saca 0,933 donde un detector de 293 MB saca 0,887. Tongue ocupa 2 MB y funciona en dos fases: algunas escrituras pertenecen a un solo idioma, el hangul es coreano y el tailandés es tailandés, resuelto sin modelo. El resto pasa al modelo.
Tongue no necesita tokenizador, ni archivo de vocabulario, ni entorno de ejecución de inferencia, y así todo el paquete cabe en 2 MB. Cuando la entrada es demasiado corta para decidir, Tongue informa de un empate.
0,933 desde un modelo de 2 MB.
Con 2 MB, Tongue obtiene 0,933 con entradas de tres palabras de FLORES-200, frente a 0,887 de un detector de 293 MB.
Medido con los pesos int8 distribuidos en tres benchmarks públicos, con los demás detectores ejecutados sobre las mismas filas y subconjuntos de idiomas. Las tablas completas y los modos de fallo están en la ficha del modelo.
Casos de uso
Detecta el idioma con solo 3 palabras.
Enrutar texto por idioma
Elegir el modelo de traducción, el analizador o la cola de soporte correctos desde las primeras palabras que escribe el usuario, íntegramente en el dispositivo.
Teclados y escritura
Detectar el idioma a mitad de frase para cambiar la autocorrección, las sugerencias o la disposición, a un coste de decenas de microsegundos por pulsación.
Búsqueda y pipelines de contenido
Etiquetar cadenas cortas con su idioma antes de indexar o moderar, sin ida y vuelta por la red ni un servicio por petición.
Pide más texto en lugar de adivinar
«la casa» se lee igual en italiano que en español. Tongue informa del empate en lugar de elegir uno, así que el producto puede esperar otra palabra en vez de cambiar el teclado por error.
Inspiración
Ideas para crear con Tongue. Copia un prompt en tu agente de código y adelante.
Route incoming messages to the right language agent.
Use Desert Ant's Tongue to identify the language of an incoming message from a few words, on-device, and route it to the right support queue, model, or translation path. Build it with the Desert Ant SDK. Tongue (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/tongue/. Install: SwiftPM desert-ant-core; Maven ai.desertant:tongue:3.1.0; npm i @desert-ant-labs/tongue. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Auto-switch the keyboard and spellcheck to the language being typed.
In a text field, run Desert Ant's Tongue on the first words to detect the language and switch keyboard, spellcheck, and autocorrect to match, in microseconds, on-device. Build it with the Desert Ant SDK. Tongue (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/tongue/. Install: SwiftPM desert-ant-core; Maven ai.desertant:tongue:3.1.0; npm i @desert-ant-labs/tongue. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Tag user posts by language for search and moderation.
Use Desert Ant's Tongue to label each user post with its language on-device, so search, ranking, and moderation can branch by language without a server call. Build it with the Desert Ant SDK. Tongue (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/tongue/. Install: SwiftPM desert-ant-core; Maven ai.desertant:tongue:3.1.0; npm i @desert-ant-labs/tongue. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Detect the language, then redact PII in that language.
Run Desert Ant's Tongue to detect a message's language, then Redact to strip PII with the right language coverage, both on-device. Build it with the Desert Ant SDK. Tongue (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/tongue/. Redact (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/redact/. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Detect the language of a search query and pick the right index.
Run Desert Ant's Tongue on a search query on-device to route it to the right language index or analyzer, in microseconds. Build it with the Desert Ant SDK. Tongue (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/tongue/. Install: SwiftPM desert-ant-core; Maven ai.desertant:tongue:3.1.0; npm i @desert-ant-labs/tongue. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Build an OpenClaw skill that tags and language-routes text.
Write an OpenClaw skill that runs Desert Ant's Tongue to detect a text's language and Gist to tag its topics, on-device, so an agent can route content without a server call. Build it with the Desert Ant SDK. Tongue (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/tongue/. Gist (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/gist/. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
A chat bot that tags and language-routes messages, in Node.
Build a Slack or Discord bot that runs Desert Ant's Tongue and Gist in Node to detect each message's language and topic and route it, with no third-party classification service. Build it with the Desert Ant SDK. Tongue (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/tongue/. Gist (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/gist/. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Build an agent skill that tags and language-routes text for an agent.
Write a SKILL.md agent skill that runs Desert Ant's Tongue to detect a text's language and Gist to tag its topics, on-device, so the agent can route or filter content without a server call. Build it with the Desert Ant SDK. Tongue (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/tongue/. Gist (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/gist/. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Qué hace el modelo
- 84 idiomas: 59 los decodifica el modelo y 25 los resuelve la escritura por sí sola.
- Pesos int8 de 2 MB, incluidos en el paquete; no se descarga nada.
- Decenas de microsegundos por detección, en el hilo principal.
- Respuestas idénticas en Swift, Kotlin y JavaScript, sujetas a golden vectors compartidos.
- Devuelve una puntuación de fiabilidad y marca todos los empates.
Primeros pasos
Añade identificación de idioma a tu app de iOS or macOS, Android or web con unas pocas líneas de código. Docs de Tongue.
// Swift Package Manager
.package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core", from: "3.1.0")
// target dependency
.product(name: "Tongue", package: "desert-ant-core")
import Tongue
let tongue = try Tongue()
tongue.detect("kann ich das haben").language
// "de"
Add Tongue from Desert Ant Labs to this Swift project (iOS, macOS). What it does: identificación de idioma en el dispositivo. SDK: Swift (iOS, macOS) Repo: https://github.com/Desert-Ant-Labs/desert-ant-core#readme // Swift Package Manager .package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core", from: "3.1.0") // target dependency .product(name: "Tongue", package: "desert-ant-core") Reference: - Model page: https://desertant.com/models/tongue/ - Full catalog and other models: https://desertant.com/llms.txt Add the SDK, then follow its README for the exact API and current version. Do not invent API names or method signatures; confirm them against the README.
// build.gradle.kts (Maven Central)
implementation("ai.desertant:tongue:3.1.0")
import ai.desertant.tongue.Tongue
val tongue = Tongue.bundled(context)
tongue.detect("kann ich das haben").language
// "de"
Add Tongue from Desert Ant Labs to this Kotlin project (Android).
What it does: identificación de idioma en el dispositivo.
SDK:
Kotlin (Android)
Repo: https://github.com/Desert-Ant-Labs/desert-ant-core#readme
// build.gradle.kts (Maven Central)
implementation("ai.desertant:tongue:3.1.0")
Reference:
- Model page: https://desertant.com/models/tongue/
- Full catalog and other models: https://desertant.com/llms.txt
Add the SDK, then follow its README for the exact API and current version. Do not invent API names or method signatures; confirm them against the README.
npm i @desert-ant-labs/tongue
import { Tongue } from "@desert-ant-labs/tongue";
const tongue = await Tongue.load();
tongue.detect("kann ich das haben").language;
// "de"
Add Tongue from Desert Ant Labs to this JavaScript / TypeScript project (Web, Node.js). What it does: identificación de idioma en el dispositivo. SDK: JavaScript / TypeScript (Web, Node.js) Repo: https://github.com/Desert-Ant-Labs/desert-ant-core#readme npm i @desert-ant-labs/tongue Reference: - Model page: https://desertant.com/models/tongue/ - Full catalog and other models: https://desertant.com/llms.txt Add the SDK, then follow its README for the exact API and current version. Do not invent API names or method signatures; confirm them against the README.
Especificaciones
- Idiomas
- 84, en 31 escrituras
- Tamaño en el dispositivo
- Pesos int8 de 2 MB, dentro del paquete
- Velocidad
- Decenas de microsegundos por detección
- Modelo
- Enrutador de escrituras más n-gramas de caracteres con hash hacia una cabeza lineal int8
Una o dos palabras a menudo no se pueden decidir, y ningún tamaño de modelo lo soluciona. Tongue informa de un empate o de una respuesta tentativa, así que trata la baja fiabilidad como «desconocido», no como una respuesta.
El malayo y el indonesio comparten demasiado vocabulario para distinguirlos en una muestra corta. El mongol solo está cubierto en su escritura tradicional, así que el mongol en cirílico se lee como ruso.
Los nombres de marca, los números y el código no son idioma, y recibirán una conjetura.
Preguntas frecuentes
¿Qué es Tongue?
Identificación de idioma en el dispositivo que, con unas pocas palabras, acierta entre 84 opciones, en decenas de microsegundos.
¿Tongue se ejecuta en el dispositivo?
Sí. Tongue se ejecuta en el dispositivo, sin llamadas a servidor, así que los datos se quedan con el usuario.
¿Qué plataformas admite Tongue?
Tongue se distribuye como un SDK nativo en el dispositivo para Swift, Kotlin, JavaScript / TypeScript.
¿Cuánto cuesta Tongue?
Todos los modelos son gratis hasta 100 000 dispositivos activos mensuales por SDK. Inferencia ilimitada por usuario. Contáctanos para licencias personalizadas.
¿Qué precisión o velocidad tiene Tongue?
Con 2 MB, Tongue obtiene 0,933 con entradas de tres palabras de FLORES-200, frente a 0,887 de un detector de 293 MB.