
デモ
3 語で、言語を言い当てる。
「kann ich das haben」はドイツ語です。「안녕하세요」は韓国語です。3 語というのがいちばん難しいケースで、検索ボックスから届くのはまさにその 3 語です。
3 語だけで Tongue は 0.933、293MB の検出器は 0.887 です。Tongue は 2MB で、処理は二段階です。ある文字体系は一つの言語にしか属さないため、ハングルは韓国語、タイ文字はタイ語と、モデルを使わずに決まります。残りだけがモデルに回ります。
Tongue はトークナイザーも語彙ファイルも推論ランタイムも必要とせず、そのおかげでパッケージ全体が 2MB に収まります。入力が短すぎて判定できないときは、Tongue は引き分けを返します。
2MB のモデルで 0.933。
2MB の Tongue は、3 語の FLORES-200 入力で 0.933。293MB の検出器は 0.887 です。
3 つの公開ベンチマークで、実際に出荷している int8 重みを測定。他の検出器も同一の行・同一の言語サブセットで実行しています。完全な表と失敗モードはモデルカードに記載しています。
ユースケース
3 語で、言語を言い当てる。.
言語でテキストを振り分ける
ユーザーが打ち込んだ最初の数語から、適切な翻訳モデル、アナライザー、サポート窓口を選択。すべてデバイス上で完結します。
キーボードと入力
文の途中で言語を検出し、自動修正・変換候補・レイアウトを切り替え。1 打鍵あたり数十マイクロ秒で済みます。
検索とコンテンツパイプライン
インデックス化やモデレーションの前に短い文字列へ言語タグを付与。ネットワーク往復もリクエスト単位のサービスも不要です。
推測せず、もう少し入力してもらう
「la casa」はイタリア語ともスペイン語とも等しく読めます。Tongue は引き分けとして返すので、プロダクトはキーボードを誤って切り替えるかわりに、次の一語を待てます。
インスピレーション
Tongue で作るためのアイデア。プロンプトをコーディングエージェントにコピーして始めましょう。
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 は文字体系だけで確定。
- 2MB の int8 重みをパッケージに同梱。ダウンロードは一切ありません。
- 1 回の判定は数十マイクロ秒。メインスレッドで動かせます。
- 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 の文字体系
- オンデバイスサイズ
- 2MB の int8 重み、パッケージに同梱
- 速度
- 1 回の判定あたり数十マイクロ秒
- モデル
- 文字体系ルーターとハッシュ化文字 n-gram を int8 線形ヘッドへ
1〜2 語では判定できないことが多く、これはモデルの大きさでは解決しません。Tongue は引き分けや暫定的な答えを返すので、信頼度が低いものは答えではなく「不明」として扱ってください。マレー語とインドネシア語は語彙の共通部分が多すぎて、短いサンプルでは分けられません。モンゴル語は伝統的な文字のみに対応しているため、キリル文字のモンゴル語はロシア語として読まれます。ブランド名、数字、コードは言語ではないので、当て推量になります。
FAQ
Tongue とは?
オンデバイスの言語判定。数語からその言語を特定します。84 言語対応、数十マイクロ秒で完了。
Tongue はオンデバイスで動作しますか?
はい。Tongue はデバイス上で動作し、サーバーへの通信は発生しません。データはユーザーの手元に残ります。
Tongue はどのプラットフォームに対応していますか?
Tongue は Swift, Kotlin, JavaScript / TypeScript 向けのネイティブなオンデバイス SDK として提供されます。
Tongue の料金はいくらですか?
すべてのモデルは、SDK ごとに月間アクティブデバイス 100k 台まで無料です。各ユーザーがモデルを実行する回数に制限はありません。 カスタムライセンスについては、お問い合わせください。
Tongue の精度や速度はどれくらいですか?
2MB の Tongue は、3 語の FLORES-200 入力で 0.933。293MB の検出器は 0.887 です。