
デモ
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.
Auto-switch the keyboard and spellcheck to the language being typed.
Tag user posts by language for search and moderation.
Detect the language, then redact PII in that language.
Detect the language of a search query and pick the right index.
Build an OpenClaw skill that tags and language-routes text.
A chat bot that tags and language-routes messages, in Node.
Build an agent skill that tags and language-routes text for an agent.
モデルができること
- 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.5.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.5.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.5.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.5.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 の料金はいくらですか?
各モデルは月間アクティブデバイス 100k 台まで無料です。推論は無制限です。 カスタムライセンスについては、お問い合わせください。
Tongue の精度や速度はどれくらいですか?
2MB の Tongue は、3 語の FLORES-200 入力で 0.933。293MB の検出器は 0.887 です。