
演示
三个词就能说出是哪种语言。
「kann ich das haben」是德语。「안녕하세요」是韩语。三个词是最难的情况,而搜索框给你的恰恰就是三个词。
只凭三个词,Tongue 得到 0.933,而一个 293 MB 的检测器只有 0.887。Tongue 只有 2 MB,分两步走:有些文字只属于一种语言,谚文就是韩语,泰文就是泰语,不用模型即可判定。其余才交给模型。
Tongue 不需要分词器、词表文件或推理运行时,整个包因此只有 2 MB。输入短到判不出来时,Tongue 会如实报告平局。
2 MB 的模型,得 0.933。
仅 2 MB,Tongue 在三个词的 FLORES-200 输入上取得 0.933,而一个 293 MB 的检测器为 0.887。
在三个公开基准上以实际发布的 int8 权重测得,其他检测器在完全相同的数据行和语言子集上运行。完整表格与失败模式见模型卡片。
应用场景
三个词就能说出是哪种语言。.
按语言路由文本
从用户输入的前几个词就选对翻译模型、分析器或客服队列,完全在设备上完成。
键盘与输入
在句子中途检测语言,切换自动纠错、联想或键盘布局,每次按键只花几十微秒。
搜索与内容管线
在索引或审核之前为短字符串标注语言,无需网络往返,也无需按请求计费的服务。
与其乱猜,不如多要几个字
「la casa」既像意大利语,也像西班牙语。Tongue 会如实报告这个平局,产品因此可以再等一个词,而不是把键盘切错。
灵感
用 Tongue 构建的点子。把提示词复制到你的编码 agent 里就能开始。
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.
模型能做什么
- 84 种语言:59 种由模型解码,25 种仅凭文字系统即可判定。
- 2 MB int8 权重,随包内置;无需任何下载。
- 每次检测只需几十微秒,可在主线程运行。
- Swift、Kotlin 和 JavaScript 三端答案完全一致,由共享的黄金向量测试约束。
- 报告可靠度分数,并标出每一次平局。
快速上手
只需几行代码,即可为你的 iOS or macOS, Android or web 应用加上 语言识别。 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: Tongue:设备端语言识别. 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: Tongue:设备端语言识别.
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: Tongue:设备端语言识别. 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.
规格
- 语言
- 84 种,覆盖 31 种文字系统
- 设备端体积
- 2 MB int8 权重,内置于包中
- 速度
- 每次检测几十微秒
- 模型
- 文字系统路由器加哈希字符 n-gram,接入 int8 线性头
一两个词常常是真的判不出来,再大的模型也解决不了。Tongue 这时会报告平局或一个不确定的答案,所以请把低可靠度当作「未知」,而不是一个答案。马来语和印尼语共用的词汇太多,短样本无法区分。蒙古语只覆盖传统蒙古文,因此用西里尔字母书写的蒙古语会被判成俄语。品牌名、数字和代码不属于语言,得到的只会是一个猜测。
常见问题
Tongue 是什么?
设备端语种识别,凭几个词判定语言,覆盖 84 种语言,用时数十微秒。
Tongue 在设备上运行吗?
是的。Tongue 在设备上运行,不调用任何服务器,因此数据始终留在用户手中。
Tongue 支持哪些平台?
Tongue 以面向 Swift, Kotlin, JavaScript / TypeScript 的原生设备端 SDK 形式提供。
Tongue 的价格是多少?
每个模型的每个 SDK 均可免费支持最多 10 万台月活跃设备。每位用户调用模型的次数不设上限。 如需定制授权,请联系我们。
Tongue 的准确度和速度如何?
仅 2 MB,Tongue 在三个词的 FLORES-200 输入上取得 0.933,而一个 293 MB 的检测器为 0.887。