CoolFace
Datasetpublic

domofon/Document-XML-100k

Document-XML-100k Noisy/unstructured text to semantically tagged XML. 118K pairs for fine-tuning document markup models. Splits Split Rows Description verified 79,067 Content-exact: byte-level match between input text and XML text content. Zero information loss guaranteed. good 38,916 High quality (word overlap >= 85%, well-formed XML, no HTML tags) but with minor whitespace normalization. What's the difference? Both splits are… See the full description on the dataset page: https://huggingface.co/datasets/domofon/Document-XML-100k.

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes55downloads
Dataset Card

Document-XML-100k

Noisy/unstructured text to semantically tagged XML. 118K pairs for fine-tuning document markup models.

Splits

SplitRowsDescription
verified79,067Content-exact: byte-level match between input text and XML text content. Zero information loss guaranteed.
good38,916High quality (word overlap >= 85%, well-formed XML, no HTML tags) but with minor whitespace normalization.

What's the difference?

Both splits are well-formed XML with high content fidelity. The good split differs only in:

  • Whitespace normalization: \n in input became a space in XML (text wrapped into <paragraph> tags)
  • Double newlines collapsed: \n\n between paragraphs became a single space inside tags
  • Quote normalization: occasional leading/trailing quotes dropped during structural markup

These are normal consequences of XML structuring. The model correctly identified paragraph boundaries and wrapped text in tags, which inherently normalizes whitespace. For most fine-tuning tasks, both splits are equally usable.

Fields

FieldDescription
input_textRaw/noisy input document
target_xmlStructured XML output
languageen or ru
schema_idcore or custom_* (554 unique schemas)
source_datasetOrigin: fineweb2_en, fineweb2_ru, cc_raw, markdown_corpus
modelTeacher model: gemma (Gemma-4-31B-it) or qwen (Qwen3.5-9B)
content_overlapWord-level overlap score (0-1)

Core XML Tags

document, section, heading(level), paragraph, list(type), item, table, row, cell, code(lang), quote, aside(role), link(href), dl, dt, dd, figure, figcaption, cite, time(datetime), address, strong, em, note, data(value), kbd, mark, ins, del

Stats

  • Languages: EN 72%, RU 28%
  • Schemas: 554 unique (1 core + 553 custom)
  • Sources: FineWeb-2 EN/RU, CommonCrawl, Wikipedia
  • Teacher models: 98% Gemma-4-31B-it, 2% Qwen3.5-9B
  • Well-formed XML: 100% (filtered)
  • Content overlap >= 95%: 97%+

Usage

python
from datasets import load_dataset, concatenate_datasets

ds = load_dataset("domofon/Document-XML-100k")

# Use both splits for training
train = concatenate_datasets([ds["verified"], ds["good"]])

# Or strict-only
train = ds["verified"]

Generation

Distilled from Gemma-4-31B-it and Qwen3.5-9B running on a TPU fleet (v5e/v6e). Source documents from FineWeb-2 and Wikipedia, converted to XML with automated verification (well-formedness, content preservation, schema adherence, HTML tag rejection).