At a glance
token-classificationRun it — live entity tagger
Pick a grounded preset, type your own text, or load a local .txt file:
Show entity types:
Merged entities
| # | Type | Entity | Confidence | Char span | Words · pieces |
|---|---|---|---|---|---|
| Run the tagger to list entities. | |||||
See inside — every WordPiece and its BIO tag
This is the raw token-classification output (called with ignore_labels: [] so
O tokens are kept) plus the full 9-way softmax from the same model. Rows whose word's
sub-tokens disagree on entity type are tinted — that is exactly where the word strategy above changes
the answer (try the Science preset: So leans LOC while ##rbonne leans ORG).
| Index | WordPiece | BIO label | Score | Char span | Top-3 of 9 labels |
|---|---|---|---|---|---|
| No tokens yet. | |||||
Why it matters
- Private document triage: index who, which company and where in contracts or notes without uploading them.
- Newsroom tooling: auto-link people and places in drafts, build a story's cast list as the reporter types.
- Search facets: extract PER/ORG/LOC facets client-side for an offline knowledge base or PWA.
- Pre-redaction: mask names before text reaches a server or a larger model (see the Wild rung).
Use-case ladder
Basics
Cased vs ALL-CAPS vs lowercase fragility and a live WordPiece BIO merge inspector.
Open Basics →Practical
Batch news & briefing extractor with file upload, master entity index and CSV / JSON / CoNLL export.
Open Practical →Wild
Keyboard-navigable entity co-occurrence network plus one-click selective redaction by class.
Open Wild →Multi-model
Stage 1 NER feeds each entity's sentence into DeBERTa-v3 NLI for role, sentiment and topic.
Open Multi-model →How the API works
import { TRANSFORMERS_URL } from "/lib/webai.js"; // shared Transformers.js 3.7.5 pin
const { pipeline } = await import(TRANSFORMERS_URL);
const ner = await pipeline("token-classification", "onnx-community/distilbert-NER-ONNX", {
device: "wasm",
dtype: "q8", // onnx/model_quantized.onnx, 65.77 MB
});
const tokens = await ner("Marie Curie worked in Paris.", { ignore_labels: [] });
// → [{ entity: "B-PER", score: 0.997, index: 1, word: "Marie" },
// { entity: "I-PER", score: 0.995, index: 2, word: "C" }, { …, word: "##uri" }, …]
// 3.7.5 returns no character offsets, so ner-core.mjs aligns pieces and merges BIO spans.