token-classification · text · WASM · ~111 MB
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 French and hands back each person, organisation, location and miscellaneous name it finds, 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 Xenova/camembert-ner, the ONNX export of Jean-Baptiste/camembert-ner — a French NER model (CamemBERT fine-tuned on WikiNER-fr). The showcase already has English and multilingual BERT NER; this is the French CamemBERT family, so the examples are in French with an English gloss. The capability — finding typed names in running text — is the same in any language.
| Model | Xenova/camembert-ner (ONNX q8 of Jean-Baptiste/camembert-ner) |
|---|---|
| Task / pipeline | token-classification |
| Labels | WikiNER tag set — O, I-PER, I-ORG, I-LOC, I-MISC — aggregated here into typed entity spans |
| Architecture | CamemBERT (RoBERTa-based, SentencePiece, ~110M params) fine-tuned for NER on ~170k French WikiNER sentences |
| Language | French (validated on emails/chat; handles lower-case entity starts well) |
| Quantization | q8 (8-bit) ONNX |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~111 MB, cached after first load |
| License | MIT |
| Web APIs | WebAssembly, Web Workers — all Baseline widely available |
Type or paste a French sentence. Each detected entity is coloured by its type a moment after you stop typing; hover an entity for its raw label and confidence.
“Marie Curie joined the Sorbonne in Paris for her research on radium.”
The model doesn't see whole words — it labels each SentencePiece sub-token independently
(the ▁, shown here as ·, marks where a new word begins) with one of
O, I-PER, I-ORG, I-LOC, I-MISC.
We merge the pieces back into words, then group consecutive same-type words into entity spans —
so Los · Al · tos becomes one location "Los Altos". 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 French sentence and see every person, place, organisation and misc name 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.
NER finds the entities; CamemBERT fill-mask reimagines each one in context into a fresh sentence.
Token classification is one pipeline call:
import { pipeline } from "@huggingface/transformers";
const ner = await pipeline("token-classification", "Xenova/camembert-ner");
const out = await ner("Apple est créée par Steve Jobs à Los Altos.");
// → [{ entity: "I-ORG", word: "▁Apple", score: 0.85, index: 1 },
// { entity: "I-PER", word: "▁Steve", score: 0.96, index: 5 },
// { entity: "I-PER", word: "▁Job", score: 0.99, index: 6 },
// { entity: "I-PER", word: "s", score: 0.99, index: 7 },
// { entity: "I-LOC", word: "▁Los", score: 0.75, index: 9 },
// { entity: "I-LOC", word: "▁Al", score: 0.99, index: 10 },
// { entity: "I-LOC", word: "tos", score: 0.97, index: 11 }, …]
The pipeline returns one label per SentencePiece sub-token — with a ▁ marking each
word start but no character offsets. We merge sub-word pieces into whole words (taking the
word-initial label), map each word back to its span in the original text so highlights land
exactly, and aggregate consecutive same-type words into entity spans. It all runs in a Web Worker
so typing stays smooth.