Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
11
29
category
stringlengths
5
25
text
stringlengths
1
402
latin-diacritics-french
latin-diacritics
café résumé naïve façade — crème brûlée was excellent.
latin-diacritics-mixed
latin-diacritics
Hügel über Brücke. Mañana voy a la peña con José.
latin-diacritics-portuguese
latin-diacritics
São Paulo é uma cidade interessante; Köln auch.
cyrillic-greeting
cyrillic
Привет, мир! Это тест токенизатора.
cyrillic-prose
cyrillic
Москва — столица России. Население более 12 миллионов.
greek-greeting
greek
Καλημέρα κόσμε! Η γλώσσα είναι όμορφη.
cjk-simplified-greeting
cjk-simplified
你好,世界!这是分词器测试。
cjk-simplified-prose
cjk-simplified
中文是世界上使用人口最多的语言之一。
cjk-traditional-compare
cjk-traditional
繁體中文與簡體中文有所不同。
cjk-traditional-hongkong
cjk-traditional
香港的繁體中文有獨特的詞彙。
japanese-voiced-kana-greeting
japanese-voiced-kana
こんにちは、世界。トークナイザーのテストです。
japanese-voiced-kana-prose
japanese-voiced-kana
東京タワーはとても賑やかな観光地です。
hangul-syllables-greeting
hangul-syllables
안녕하세요, 세계! 토크나이저 테스트입니다.
hangul-syllables-prose
hangul-syllables
한국어는 한글로 표기합니다.
arabic-greeting
arabic-rtl
مرحبا بالعالم! هذا اختبار للمحلل اللغوي.
arabic-prose
arabic-rtl
اللغة العربية لغة سامية تكتب من اليمين إلى اليسار.
hebrew-greeting
hebrew-rtl
שלום עולם! זה מבחן של הטוקנייזר.
devanagari-hindi
devanagari
नमस्ते दुनिया! यह टोकनाइज़र परीक्षण है।
devanagari-sanskrit
devanagari
संस्कृत भारत की एक प्राचीन भाषा है।
thai-combining-marks-greeting
thai-combining-marks
สวัสดีชาวโลก! นี่คือการทดสอบเครื่องตัดคำ
thai-combining-marks-prose
thai-combining-marks
ภาษาไทยไม่ใช้ช่องว่างระหว่างคำ
mixed-script-cjk-latin
mixed-script
The 北京 trip in 2026 — très bien!
mixed-script-katakana-code
mixed-script
コードレビュー: bug fixed in commit a3f9c2b.
math-symbols-summation
math-symbols
Result: Σ x_i = 42 (where x ∈ ℝ).
math-symbols-epsilon-delta
math-symbols
Theorem: ∀ε>0 ∃δ>0 such that |x-x₀|<δ ⇒ |f(x)-f(x₀)|<ε.
currency-symbols-multi
currency-symbols
Cost: €12.50 → ¥1,820 ≈ £10.75 (approx, plus ₿0.0004).
box-drawing
box-drawing-dingbats
Box: ┌───────┐ │ Hello │ └───────┘ — done.
dingbats-chess
box-drawing-dingbats
Pieces: ★ ☆ ♠ ♣ ♥ ♦ ♔ ♕ ♖ ♘ ♙ — chess set.
math-astral-bold-script
math-astral-glyphs
Math bold: 𝐀𝐁𝐂𝐃 𝟎𝟏𝟐𝟑 — math script: 𝓐𝓑𝓒𝓓.
astral-egyptian-hieroglyphs
astral-plane-historic
Egyptian hieroglyphs: 𓀀 𓂀 𓃀 𓆎𓅓𓏏𓊖.
astral-cuneiform
astral-plane-historic
Cuneiform: 𒀭 𒈠 𒂗 𒆠 — sign list samples.
astral-mahjong
astral-plane-game-symbols
Mahjong tiles: 🀀 🀁 🀂 🀃 🀄 🀅 🀆 🀇.
astral-cards
astral-plane-game-symbols
Cards: 🃁 🃂 🃃 🂡 🂢 🂣.
emoji-bmp-and-astral
emoji-basic
👋 Hello! 🌍 World 🚀 launch 🎉 party 🎂.
emoji-zwj-family-pride-skin
emoji-zwj-sequence
Family: 👨‍👩‍👧‍👦 — Pride flag: 🏳️‍🌈 — Skin-tone: 👍🏽 ✊🏿 👶🏻.
emoji-zwj-with-text-prefix
emoji-zwj-sequence
🏳️‍🌈Pride+👨‍👩‍👧‍👦Family+🇩🇪🇯🇵🇺🇸flags+test
emoji-keycap-and-flags
emoji-keycap
Keycaps: 1️⃣ 2️⃣ 3️⃣ — flag: 🇯🇵 🇩🇪 🇺🇸.
url-with-query-fragment
url-hex-base64
url=https://example.com/path/to/resource?q=foo&bar=baz&n=42#section-3
hex-and-base64
url-hex-base64
hex=0xDEADBEEFCAFEBABE base64=YWJjZGVmZ2hpamtsbW5vcA==
sha256-hash
url-hex-base64
sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
code-javascript-functional
programming-code
arr.map(x => x * 2).filter(x => x > 0).reduce((a, b) => a + b);
code-cplusplus-template
programming-code
template<T,U> auto f(T&&t, U&&u) -> decltype(t+u) { return t + u; }
code-bitops
programming-code
result = (a >> 2) | (b << 4) & 0xFF;
code-javascript-modern
programming-code
if (x !== null && y >= 0) { return x?.foo ?? defaultValue; }
code-python-def
programming-code
def fibonacci(n):
code-python-if
programming-code
if n < 2:
code-python-return
programming-code
return n
code-python-recurse
programming-code
return fibonacci(n - 1) + fibonacci(n - 2)
code-go-func
programming-code
func greet(name string) {
code-go-tab-if
programming-code
if name != "" {
code-go-tab-printf
programming-code
fmt.Printf("Hello, %s!\n", name)
code-go-tab-close
programming-code
}
code-go-close
programming-code
}
programming-identifiers-mixed
programming-identifiers
get_user_id MAX_BUFFER_SIZE T_pad_token_id NSURLSessionConfiguration
programming-identifiers-cases
programming-identifiers
camelCaseVar PascalCase snake_case_var SCREAMING_SNAKE k8s_pod_count_v2
code-string-multiscript
programming-code
greeting = "Привет, мир!" + " — from " + "東京"
code-comment-diacritics
programming-code
// résumé — Swift comment with diacritics
code-comment-greek-math
programming-code
/* α + β = γ — Greek-letter math comment */
code-string-multiscript-emoji
programming-code
let title = "🚀 Launch — пуск — 起動"
ipa-phonetic-transcription
ipa-phonetic
The IPA transcription /fɪʃ/ for "fish" — with stress: ˈfɪʃ.
mandarin-tones
ipa-phonetic
Tones: má mǎ mà mā (Mandarin tones — high, rising, dipping, falling).
whitespace-runs
whitespace-edge
hello world . end
whitespace-trailing-tabs
whitespace-edge
trailing whitespace before newline: (tab) (spaces)
punctuation-period
punctuation-edge
.
punctuation-comma
punctuation-edge
,
punctuation-exclamation
punctuation-edge
!
punctuation-nested-quotes
punctuation-edge
"What?" she asked — "really?!" — yes...
punctuation-dash-variants
punctuation-edge
... and ‒ also – and — and ―.
multiscript-greetings
multiscript-stress
Hello 你好 안녕 こんにちは नमस्ते مرحبا שלום สวัสดี Привет Καλημέρα.
multiscript-no-spaces
multiscript-stress
α你β안γनδस💫ع👋ש🚀ت∀∃∈⇒
multiscript-zwj-mixed
multiscript-stress
中文한글日本語混👋합니다🎉text混合
multiscript-string-concat
multiscript-stress
greeting="你好"+🌍+"안녕"+नमस्ते+👨‍👩‍👧
multiscript-emoji-arrows
multiscript-stress
Σ x_i 🇯🇵 ≠ 北京 → München · Tōkyō · 上海 ✨ end.
multiscript-arrow-chain
multiscript-stress
🚀नमस्ते→Привет→你好→안녕→مرحبا→❤️
multiscript-function-call
multiscript-stress
foo(中文,한글,日本語,हिन्दी,русский)→{∀:∃,⊕:⊗}
multiscript-legacy-symbols
multiscript-stress
№42 ™️ © ® ¶ § €¥£₿ Σ∀ 你好 안녕 ال
escape-sequences-with-zwj
escape-sequences
NULL\0and\ttab\nnewline混入‍ZWJ️selectors
german-compound-short
german-compound
Natürlich. Deutsch zieht jetzt den Kompositahammer aus der Grammatikwerkzeugschublade. 😄
german-compound-long-1
german-compound
Im Morgennebelgedankenverästelungswald stand ein Kaffeetassenrandphilosophiebeobachter neben einer Regenschirmvergesslichkeitsstation und notierte in sein Sonntagmorgenideenfangnotizbuch die erstaunliche Häufigkeit von Fensterbankstaubsonnenlichtreflexionen.
german-compound-long-2
german-compound
Neben ihm summte eine Kühlschrankinnenbeleuchtungserinnerungsmaschine, während ein Marmeladenglasdeckelöffnungsoptimierungsbeauftragter mit einer Treppenhausakustiküberraschungsanalyse beschäftigt war. Aus der Ferne näherte sich ein Wolkenkratzerfahrstuhlmusikkomponist auf einem Einradverkehrsregelmissachtungsgerät und...
german-compound-long-3
german-compound
Plötzlich öffnete sich ein Zeitungsseitenumblätterwindstoßportal, und heraus purzelten drei Büroklammernsortierweltmeisterschaftsteilnehmerinnen, ein Gartenzwergmützenfarbenberater und ein hochgradig verwirrter Suppenlöffelreflexionsmetaphysiker. Gemeinsam gründeten sie den Bundesverband für Nachmittagslichtschattenkan...
german-compound-long-4
german-compound
Am Abend versammelten sich alle im Mondscheinfensterrahmenstaubglitzerzimmer, wo der Kaffeetassenrandphilosophiebeobachter eine feierliche Schlussrede über die Wichtigkeit von Unsinnsproduktionsfreude, Sprachmuskeldehnübungen und Donaudampfschifffahrtsgesellschaftskapitänsmützenknopfersatzteilbeschaffungsproblemen hiel...
german-compound-long-5
german-compound
Danach herrschte allgemeine Zufriedenheit, außer bei der Kühlschrankinnenbeleuchtungserinnerungsmaschine, die sich über mangelnde Türöffnungsaufmerksamkeitswertschätzung beklagte.

Tokenizer conformance fixtures

Reference inputs and Python fast-tokenizer outputs for tokenizer implementations. The initial corpus contains 83 inputs in 30 categories, with 498 reference encodings across six tokenizers. This is a regression dataset, not a model-quality benchmark.

Provenance and attribution

The input corpus and reference entries come from apocryphx's swift-transformers PR #360, at commit ce847085784bacd8c3c15180c976b17c8ce73e31. The corpus originated in ObjCTokenizer and diagnosed the Unicode tokenization bugs documented in swift-transformers #352. Daisuke Majima (john-rocky) contributed test-design ideas in PR #357, including stored decoded forms and the ungated TinyLlama reference model. The original contributor documented AI assistance in the linked issue and PR. The Apache 2.0 license from the source repository is included in LICENSE.

The 83 input records are unchanged. All six original baseline entry arrays were reproduced exactly with the versions and model commits listed here before publication. Baseline metadata was expanded to record those commits, the input file hash, and the Rust tokenizers version. Tools/generate_tokenizer_baselines.py is adapted from the contributor's generator.

Layout and schema (version 1)

  • manifest.json: corpus IDs, input paths, and baseline paths with model IDs and immutable model revisions.
  • multilingual/inputs.json: records {id, category, text}; IDs are stable within the corpus. Preserve text exactly, including combining marks and whitespace.
  • multilingual/baselines/*.json: {metadata, entries} for each tokenizer.
  • Tools/generate_tokenizer_baselines.py and Tools/requirements.txt: regeneration and verification.

Each baseline entry has id, input_ids, tokens, decoded_with_special, and decoded_skip_special. Metadata records model_id, model_revision, transformers_version, tokenizers_version, generated_at, input_count, inputs_sha256, and add_special_tokens. Generation uses transformers.AutoTokenizer with use_fast=True and add_special_tokens=True. The Swift conformance test currently compares token IDs; tokens aid diagnostics and decoded forms are retained for future decoder tests.

Model Tokenizer family
BAAI/bge-small-en-v1.5 WordPiece
google-t5/t5-small Unigram
openai-community/gpt2 Byte-level BPE
FacebookAI/roberta-base Byte-level BPE with RoBERTa postprocessing
Qwen/Qwen2.5-0.5B Byte-level BPE
TinyLlama/TinyLlama-1.1B-Chat-v1.0 BPE with byte fallback

Reproduce or verify

From a checkout or downloaded snapshot of this dataset, using Python 3.12 and uv:

uv run --python 3.12 --with-requirements Tools/requirements.txt python Tools/generate_tokenizer_baselines.py --check
uv run --python 3.12 --with-requirements Tools/requirements.txt python Tools/generate_tokenizer_baselines.py

--check compares every generated entry (IDs, tokens and both decoded forms), returns nonzero on a mismatch, and writes nothing. It ignores metadata such as the generation timestamp. Omit --check to regenerate files with fresh provenance metadata. Use --corpus multilingual to restrict generation. Models are loaded at the immutable revisions in manifest.json, never implicitly at main. The first run downloads tokenizer files; model weights are not needed.

Swift consumption and expansion

Download a pinned dataset commit with HubApi.snapshot(from: Hub.Repo(id: "pcuenq/tokenizer-conformance", type: .datasets), revision: ..., matching: "*.json"). The Swift suite reads the manifest and validates unique IDs, exact corpus coverage, model revisions, and reference lengths before comparing output. Hub caching avoids downloading unchanged files on each run. Network or malformed-data errors fail tests rather than silently skipping coverage.

To add cases, append stable IDs to a corpus and regenerate all its baselines. To add a model or a separate corpus, extend the manifest and run the generator. Review the reference diff, publish a new dataset commit, and explicitly update the consumer's pinned revision. Keep schema version 1 for compatible additions; bump it for incompatible structure or semantic changes.

Do not replace Python expectations with Swift output. Implementation-specific known divergences belong in the consuming test suite. At initial verification, Swift matched 490/498 encodings; the eight already tracked in PR #360 remain (three Qwen Thai cases and five TinyLlama whitespace cases). All entries remain in this dataset, including those eight, with the original Python expectations.

Downloads last month
36