token-classification · text · WASM · ~420 MiB
Where POS tagging labels every word's grammatical role, named-entity recognition (NER) hunts a narrower quarry: the proper names. Who is this text about? Which companies, which places? This model reads Turkish and hands back each person, organisation, location name it finds in its trained PER / ORG / LOC label set, with a confidence. Type below and watch the entities light up inline, then look inside at the raw per-token labels. All on your device.
Honest note on language: this runs
akdeniz27/bert-base-turkish-cased-ner,
the canonical Turkish BERTurk NER repository at immutable revision 99995f7…. The showcase already has
English and
multilingual BERT NER; this is the Turkish
BERTurk family, so the examples are in Turkish with an English gloss. The capability —
finding typed names in running text — is the same in any language.
| Model | akdeniz27/bert-base-turkish-cased-ner at revision 99995f7d2be4b3a28c74f0d36ee97f8c04ee0571 |
|---|---|
| Task / pipeline | token-classification |
| Labels | BIO tag set — O, B/I-PER, B/I-ORG, B/I-LOC — aggregated here into aligned spans |
| Architecture | BERT base (12 layers, hidden size 768, 12 heads; cased 32k WordPiece vocabulary) fine-tuned for Turkish NER |
| Language | Turkish, cased — Turkish dotted/dotless I and capitalisation are semantically significant |
| Quantization | fp32 ONNX (not quantised) |
| Backend | ORT-Web WebAssembly; expect roughly 1–1.5 GiB transient memory while loading |
| Download | fp32 model.onnx: exactly 440,394,743 bytes (420.0 MiB), SHA-256 a8f8a685d1a3dbf4a22a0c3ec9810f12a7035062fd61d79cadb759c24ace4482; length and hash are verified before use or caching and on every cache hit; large for phones |
| License | MIT |
| Limit | Entity highlighting is assistive, not a security boundary: review every redaction; names can be missed or mis-typed. |
| Web APIs | WebAssembly, Web Workers — all Baseline widely available |
Type or paste a Turkish sentence. Each detected entity is coloured by its type a moment after you stop typing; hover an entity for its raw label and confidence.
“Mustafa Kemal Atatürk founded the Republic of Türkiye in Ankara.”
The model doesn't see whole words — it labels each WordPiece sub-token independently
(a ## prefix, shown here as ·, marks a continuation) with one of
O plus BIO person, organisation and location labels.
We merge the pieces back into words, then group consecutive same-type words into entity spans —
so Tan · pınar becomes one person word before BIO spans are formed. Below are the
raw per-token labels straight from the model, and the spans they aggregate into.
Named entities are the skeleton of meaning in news, mail, documents and chat. Once you know who and where a text talks about, you can index it, redact it, link it or summarise around it — and doing it in the browser means the text never leaves the device.
Tag any Turkish sentence and see every person, place and organisation colour-coded inline, with confidences.
Build an entity index of a long text (with JSON export) and redact names for privacy — two runnable workflows.
Recast the story: swap every detected name with your own cast and rebuild the text.
Language identification checks whether the text is Turkish before NER extracts its entities.
The canonical repository uses a root model.onnx, so this demo pairs the exact
cased tokenizer with raw ORT-Web rather than pretending it has a Transformers.js ONNX layout:
const tokenizer = await AutoTokenizer.from_pretrained(
"akdeniz27/bert-base-turkish-cased-ner",
{ revision: "99995f7d2be4b3a28c74f0d36ee97f8c04ee0571" }
);
const session = await ort.InferenceSession.create(modelBytes, {
executionProviders: ["wasm"]
});
const logits = (await session.run(toOrtFeeds(await tokenizer(text)))).logits;
// logits shape: [batch, WordPieces, 7 BIO labels]
The worker aligns exact cased WordPieces back to the original Turkish string,
merges ## continuations, and aggregates BIO labels. Raw pieces, labels, scores and
exact character spans remain inspectable. Loading is intentionally explicit because 420 MiB is
not a polite surprise on a phone.