Basics · Cased vs Lowercased WordPiece, Fertility & ## Splits (110.34 MB WASM q8 · Apache-2.0)

Inside Cased WordPiece: Case Sensitivity, Fertility & ## Splits

Compare Proper-Cased vs Lowercased prompts across 5 minimal pairs, measure WordPiece fertility across Title-Case / ALL-CAPS / CamelCase / Financial / Accented styles in google-bert/bert-base-cased (Xenova/bert-base-cased, 110.34 MB WASM q8, Apache-2.0), and contrast whole-word vs ## continuation splits.

Why do_lower_case: false Matters: BERT Base Cased distinguishes Apple (tech firm) from apple (fruit) and Bank from bank directly in its 28,996-piece vocabulary. Stripping case erases entity cues and increases ## subword fragmentation.

1. Cased vs Lowercased Minimal Pairs (5 Scenarios)

Cased #1–
Lowercased #1–
Top-1 prob shift–
Entropy delta–
## Subword delta–
NaN score check–

Proper-Cased Top-5 + WordPiece Chips

Run comparison above to inspect cased predictions.

Lowercased Top-5 + WordPiece Chips

Run comparison above to inspect lowercased predictions.
5-pair cased vs lowercased comparison across English entity contexts
Pair Cased #1 (Prob) Lowercased #1 (Prob) Prob Shift ## Conts (Cased → Lower) Entropy Delta
Click "Benchmark All 5 Minimal Pairs" above to compare live.

2. Casing & Domain Token Fertility Probe

Measure WordPiece fertility (tokens per word), ## continuation share, and entropy across Title-Case News, All-Lowercase, ALL-CAPS Headlines, CamelCase Code, Financial Acronyms, and Accented Loanwords.

Styles scored–
Mean fertility–
Min / Max fertility–
Mean ## share–
Total [UNK] / NaN–
Total latency–
WordPiece token fertility, ## continuation ratio, entropy, and top-1 predictions across casing styles
Style Prompt ([MASK]) Top-1 Fill Fertility (tok/word) ## Conts / UNK Entropy / ms
Initialize the model above to measure casing fertility.

3. Whole-Word vs Subword-Split (## Continuation) Sensitivity

Contrast a space-separated [MASK] slot against an inline prefix-attached slot (bio[MASK], under[MASK], micro[MASK]) to watch WordPiece switch into ## continuation completions.

Whole-Word Top-5 (–)

Run comparison above.

Subword-Split Top-5 (–)

Run comparison above.

4. Inspect Case Sensitivity & Fertility Analyzers

Show the code · bert-cased-core.mjs — analyzeCaseSensitivity()
Show the code · bert-cased-core.mjs — analyzeCasingFertility()