1 · Sentence & model loader
2 · Side-by-side aggregation_strategy comparison (none vs simple vs first)
Because Transformers.js 3.7.5 returns per-WordPiece predictions with ignore_labels: [], we
compare three real decoding strategies on the exact same forward-pass tokens and softmax probabilities:
none · Raw WordPieces
No ## folding or BIO span merging — subwords appear individually.
simple · BIO Span Merge
Folds ## pieces into whole words and merges consecutive B-/I- runs.
first · First Subword Wins
Assigns each word the label & score of its leading WordPiece, then BIO-merges.
WordPiece boundary anatomy
3 · Original-Case vs lowercase vs ALL-CAPS Case-Invariance Test
BertTokenizer runs with do_lower_case: true (verified on
Xenova/bert-base-NER-uncased), so Original-Case, all-lowercase, and ALL-CAPS strings map to
bit-identical input_ids and identical output logits.
| Variant | WordPieces | Entities | input_ids identical? | Max |Δlogit| | Span parity | Latency |
|---|---|---|---|---|---|---|
| Run the probe to verify case invariance. | ||||||
4 · CoNLL-2003 9-tag BIO schema (config.json id2label)
| ID | BIO Tag | Meaning |
|---|