Datasets:
id stringlengths 64 64 | split stringclasses 1
value | family_id stringclasses 15
values | clean_xml stringlengths 5.19k 24.5k | corrupt_xml stringlengths 5.19k 24.5k | errors stringlengths 2 275 | metadata stringlengths 895 3.98k |
|---|---|---|---|---|---|---|
895c13cb96ab511c8765eb349c0eda2808c476264a6153fc1263a682927c1458 | train | usda_branded_catalog | <table rows="500" columns="13" encoding="utf-8">
<schema>
<locales encoding="json">[]</locales>
<column index="0" name="fdcId" type="identifier" language="" nullable="unknown">
<accepted_formats encoding="json">["identifier"]</accepted_formats>
<constraints encoding="json">{}</constraints>
<null_markers encod... | <table rows="500" columns="13" encoding="utf-8">
<schema>
<locales encoding="json">[]</locales>
<column index="0" name="fdcId" type="identifier" language="" nullable="unknown">
<accepted_formats encoding="json">["identifier"]</accepted_formats>
<constraints encoding="json">{}</constraints>
<null_markers encod... | [{"row":387,"column":7,"start":1,"end":2,"replacement":"","category":"text.invisible","mechanism":"invisible_characters"}] | {"source":"retail/usda_branded/danone.csv","origin":"real","languages":["en"],"domains":["food","retail"],"license":{"identifier":"us-pd-govt","evidence":"scripts/fetch_usda_branded.py; original API record licensing metadata was not retained","status":"fetch_script_evidence"},"source_family_id":"usda_branded_catalog","... |
a50e9ab99c020ee0a1b1305869af42e55bce9f9de8b24e6ac5398ba7a29e54d0 | train | usda_branded_catalog | <table rows="500" columns="13" encoding="utf-8">
<schema>
<locales encoding="json">[]</locales>
<column index="0" name="fdcId" type="identifier" language="" nullable="unknown">
<accepted_formats encoding="json">["identifier"]</accepted_formats>
<constraints encoding="json">{}</constraints>
<null_markers encod... | <table rows="500" columns="13" encoding="utf-8">
<schema>
<locales encoding="json">[]</locales>
<column index="0" name="fdcId" type="identifier" language="" nullable="unknown">
<accepted_formats encoding="json">["identifier"]</accepted_formats>
<constraints encoding="json">{}</constraints>
<null_markers encod... | [] | {"source":"retail/usda_branded/danone.csv","origin":"real","languages":["en"],"domains":["food","retail"],"license":{"identifier":"us-pd-govt","evidence":"scripts/fetch_usda_branded.py; original API record licensing metadata was not retained","status":"fetch_script_evidence"},"source_family_id":"usda_branded_catalog","... |
685924b5f7b99e8b18f8cb699eda9d685dbaf513b2ead3ad22540371e8cff965 | train | usda_branded_catalog | <table rows="500" columns="13" encoding="utf-8">
<schema>
<locales encoding="json">[]</locales>
<column index="0" name="fdcId" type="identifier" language="" nullable="unknown">
<accepted_formats encoding="json">["identifier"]</accepted_formats>
<constraints encoding="json">{}</constraints>
<null_markers encod... | <table rows="500" columns="13" encoding="utf-8">
<schema>
<locales encoding="json">[]</locales>
<column index="0" name="fdcId" type="identifier" language="" nullable="unknown">
<accepted_formats encoding="json">["identifier"]</accepted_formats>
<constraints encoding="json">{}</constraints>
<null_markers encod... | [{"row":189,"column":7,"start":1,"end":2,"replacement":"","category":"text.invisible","mechanism":"invisible_characters"}] | {"source":"retail/usda_branded/danone.csv","origin":"real","languages":["en"],"domains":["food","retail"],"license":{"identifier":"us-pd-govt","evidence":"scripts/fetch_usda_branded.py; original API record licensing metadata was not retained","status":"fetch_script_evidence"},"source_family_id":"usda_branded_catalog","... |
9e1a8b25f0f9728127cf95e5c399bb751924291255cb4d429e8c42056474b513 | train | usda_branded_catalog | <table rows="500" columns="13" encoding="utf-8">
<schema>
<locales encoding="json">[]</locales>
<column index="0" name="fdcId" type="identifier" language="" nullable="unknown">
<accepted_formats encoding="json">["identifier"]</accepted_formats>
<constraints encoding="json">{}</constraints>
<null_markers encod... | <table rows="500" columns="13" encoding="utf-8">
<schema>
<locales encoding="json">[]</locales>
<column index="0" name="fdcId" type="identifier" language="" nullable="unknown">
<accepted_formats encoding="json">["identifier"]</accepted_formats>
<constraints encoding="json">{}</constraints>
<null_markers encod... | [] | {"source":"retail/usda_branded/danone.csv","origin":"real","languages":["en"],"domains":["food","retail"],"license":{"identifier":"us-pd-govt","evidence":"scripts/fetch_usda_branded.py; original API record licensing metadata was not retained","status":"fetch_script_evidence"},"source_family_id":"usda_branded_catalog","... |
f7490b322ee08e0a4b16e3168c98bcd81f6bcf5c60fdf320e722c7f54fea55f6 | train | usda_branded_catalog | <table rows="500" columns="13" encoding="utf-8">
<schema>
<locales encoding="json">[]</locales>
<column index="0" name="fdcId" type="identifier" language="" nullable="unknown">
<accepted_formats encoding="json">["identifier"]</accepted_formats>
<constraints encoding="json">{}</constraints>
<null_markers encod... | <table rows="500" columns="13" encoding="utf-8">
<schema>
<locales encoding="json">[]</locales>
<column index="0" name="fdcId" type="identifier" language="" nullable="unknown">
<accepted_formats encoding="json">["identifier"]</accepted_formats>
<constraints encoding="json">{}</constraints>
<null_markers encod... | [{"row":6,"column":7,"start":1,"end":2,"replacement":"","category":"text.invisible","mechanism":"invisible_characters"}] | {"source":"retail/usda_branded/danone.csv","origin":"real","languages":["en"],"domains":["food","retail"],"license":{"identifier":"us-pd-govt","evidence":"scripts/fetch_usda_branded.py; original API record licensing metadata was not retained","status":"fetch_script_evidence"},"source_family_id":"usda_branded_catalog","... |
6983bde3a9796bf3c21921bad99bfa782ea6bd2b113afb460111808c10c4b5da | train | usda_branded_catalog | "<table rows=\"500\" columns=\"13\" encoding=\"utf-8\">\n<schema>\n<locales encoding=\"json\">[]</lo(...TRUNCATED) | "<table rows=\"500\" columns=\"13\" encoding=\"utf-8\">\n<schema>\n<locales encoding=\"json\">[]</lo(...TRUNCATED) | [] | "{\"source\":\"retail/usda_branded/danone.csv\",\"origin\":\"real\",\"languages\":[\"en\"],\"domains(...TRUNCATED) |
7dcaf81d0a770f06677de8324d3ab4d16dc7dfe88e6badb8ae447ba2d3fb8d47 | train | usda_branded_catalog | "<table rows=\"500\" columns=\"13\" encoding=\"utf-8\">\n<schema>\n<locales encoding=\"json\">[]</lo(...TRUNCATED) | "<table rows=\"500\" columns=\"13\" encoding=\"utf-8\">\n<schema>\n<locales encoding=\"json\">[]</lo(...TRUNCATED) | "[{\"row\":256,\"column\":7,\"start\":1,\"end\":2,\"replacement\":\"\",\"category\":\"text.invisible(...TRUNCATED) | "{\"source\":\"retail/usda_branded/danone.csv\",\"origin\":\"real\",\"languages\":[\"en\"],\"domains(...TRUNCATED) |
3084b2c2bf0a2788a0644922b00368d4e9725c54ae70f9e518a36d7e4e3c5ac5 | train | usda_branded_catalog | "<table rows=\"500\" columns=\"13\" encoding=\"utf-8\">\n<schema>\n<locales encoding=\"json\">[]</lo(...TRUNCATED) | "<table rows=\"500\" columns=\"13\" encoding=\"utf-8\">\n<schema>\n<locales encoding=\"json\">[]</lo(...TRUNCATED) | [] | "{\"source\":\"retail/usda_branded/danone.csv\",\"origin\":\"real\",\"languages\":[\"en\"],\"domains(...TRUNCATED) |
9f95c1c59e65dbea7096b3b149873f916666c9c7f66f912abbb481b3a1dda990 | train | usda_branded_catalog | "<table rows=\"500\" columns=\"13\" encoding=\"utf-8\">\n<schema>\n<locales encoding=\"json\">[]</lo(...TRUNCATED) | "<table rows=\"500\" columns=\"13\" encoding=\"utf-8\">\n<schema>\n<locales encoding=\"json\">[]</lo(...TRUNCATED) | "[{\"row\":57,\"column\":7,\"start\":5,\"end\":7,\"replacement\":\"\",\"category\":\"format.unit\",\(...TRUNCATED) | "{\"source\":\"retail/usda_branded/danone.csv\",\"origin\":\"real\",\"languages\":[\"en\"],\"domains(...TRUNCATED) |
15c1c053868ff9fa043cfd86a45cc02d59306f49bf5bdb894b115c1ebb01166a | train | usda_branded_catalog | "<table rows=\"500\" columns=\"13\" encoding=\"utf-8\">\n<schema>\n<locales encoding=\"json\">[]</lo(...TRUNCATED) | "<table rows=\"500\" columns=\"13\" encoding=\"utf-8\">\n<schema>\n<locales encoding=\"json\">[]</lo(...TRUNCATED) | [] | "{\"source\":\"retail/usda_branded/danone.csv\",\"origin\":\"real\",\"languages\":[\"en\"],\"domains(...TRUNCATED) |
TabFix multilingual table error pairs — version 1.1.0
69,207 context-rich XML pairs for tabular error detection and correction, across seven languages and 18 configurable error categories. Each pair contains the same schema and selected rows. Corrupted examples have exact cell-level character repairs; clean controls and hard negatives have identical XML and no errors.
Coverage
There are 30,736 corrupted examples and 38,471 clean examples, including 22,446 explicitly evidenced hard negatives. The corrupted examples include 14,698 multi-category compounds and 227 same-cell compounds. Sources comprise 263 tables grouped into 38 families.
| Split | Examples | Source families | Structural formats |
|---|---|---|---|
| train | 24,688 | 15 | 15 |
| validation | 15,283 | 9 | 8 |
| test | 29,236 | 14 | 10 |
Every language in every split contains positives and explicit hard negatives for all 18 categories. Coverage does not imply equal counts or real-world representativeness. Origin counts: 299 examples with real USDA context and 68,908 synthetic examples. Detailed category, domain and language intersections are in audit.json.
Held-out table formats
Families and their translations remain in one split. In addition, a conservative structural fingerprint groups tables by the multiset of column types, nullability states, constraint kinds, and machine-readable relation kinds/arities. It ignores header names, language, column order, and literal constraint values. Families connected through any shared fingerprint stay together.
No structural fingerprint crosses train, validation or test. Grouping takes precedence over domain quotas. Validation contains seven primary domains (education is absent); training and test contain all eight. The evaluation sets therefore test unseen table formats under this documented definition, rather than merely unseen rows or renamed headers. This does not prove model generalization: shared primitive rules, generator conventions, vocabulary and error mechanisms remain, and independent real-world evaluation is still valuable. These splits supersede the earlier release; do not mix old training rows into this version's evaluation protocol.
Files and loading
dataset.parquet contains seven string columns:
| Column | Meaning |
|---|---|
id |
Deterministic example identifier |
split |
train, validation, or test |
family_id |
Source or authored template family |
clean_xml |
Reference clean context |
corrupt_xml |
Detector input |
errors |
JSON list of repair annotations |
metadata |
JSON provenance, context selection, schema-format ID, supervision policies, hard-negative evidence and optional sampling weight |
import json
import pyarrow.parquet as pq
rows = pq.read_table("dataset.parquet").to_pylist()
train = [row for row in rows if row["split"] == "train"]
errors = json.loads(train[0]["errors"])
metadata = json.loads(train[0]["metadata"])
The default Hugging Face configuration exposes named train, validation and test splits through data/train.parquet, data/validation.parquet and data/test.parquet. When reading the combined dataset.parquet directly, filter its split column explicitly. audit.json, balance.json, provenance.json and release.json provide validation, sampling diagnostics, source terms and artifact checksums. examples.json provides readable examples; qa_review.json records the seeded visual inspection of 18 examples (197 context rows), including findings and scope.
Context and coordinates
XML contains the full schema and complete selected rows, combining initial, neighboring and randomly selected rows. Original indices and half-open <gap start="..." end="..."/> ranges identify omissions. Nullability explicitly distinguishes allowed, forbidden, conditional and unknown; CSV observations alone do not establish requiredness. Declared formats and relational rules are visible in the schema.
Both strings fit 8,192 tokens including special tokens, measured with jhu-clsp/mmBERT-base revision c5955035435e2bf121cde7f3c8863ef52ff35d82. The observed maximum is 7,951. Optional context rows may be removed to fit; cells are never truncated. XML 1.0 references preserve tabs, CR and LF; <empty/> represents the empty string.
Each error has row, column, start, end, replacement, category and mechanism. Row indices are original table indices; columns use schema order. Offsets are zero-based Unicode codepoints in the decoded final corrupt cell, with half-open [start,end) ranges. Empty-cell insertion is [0,0). These are neither XML byte offsets nor tokenizer positions. Apply selected edits right to left within each cell. Exclude disabled categories before applying edits; repair all spans of a linked structural swap together.
Categories and correction supervision
- Text:
text.encoding,text.invisible,text.spelling. - Formatting:
format.number,format.date,format.boolean,format.case,format.whitespace,format.unit. - Schema:
schema.type,schema.identifier,schema.category. - Context:
consistency.unit,consistency.dependency,consistency.temporal. - Missingness:
missing.required,missing.conditional. - Structure:
structure.shift.
Categories identify the primary injected defect; mechanisms describe its generation. They are not an exhaustive list of overlapping logical consequences. Restore malformed lexical values before testing relationships that depend on them.
metadata.repair_policies separates a known historical reference repair from what can be inferred from the input. detection_only conservatively marks missing values whose exact contents have not been certified recoverable by the classifier; exclude them from exact correction loss unless additional evidence is checked. This is not an impossibility claim: for example, a missing invoice unit price may be inferred from total divided by nonzero quantity. target_conditioned means a relation supplies a repair given the designated target, but the offending field is not necessarily uniquely identifiable. reference_repair and linked_reference_repair are supervised reference targets without a uniqueness guarantee; schema_determined identifies a uniquely permitted value. Character-to-token alignment and fill-in-middle prompt construction are downstream training choices. Do not feed clean references, labels, or generation metadata to the detector.
Hard negatives and sampling
Explicit negatives carry category-specific row evidence. They include equivalent quantities in different units, per-item versus package totals, valid mixed scripts and whitespace, optional or conditional blanks, leading-zero identifiers, accepted formatting alternatives and same-day dates. Matched clean controls are not automatically counted as hard negatives.
metadata.sampling_weight is an optional split-local sampling probability. The declared profile targets 50% corrupted, 25% explicit hard negatives and 25% ordinary controls; it balances language and primary generated category, then adjusts the primary-domain marginal. balance.json reports convergence, missing strata, effective sample size and weight concentration. Weights do not create new independent examples or estimate deployment error prevalence. Raw evaluation metrics and weighted diagnostics answer different questions; report the policy used.
Validation and scope
Every emitted record is checked for valid XML, identical paired context/schema, valid nonoverlapping spans, exact clean reconstruction and absence of unlabelled changed cells. Independent Parquet readback repeats these checks, reconstructs structural fingerprints from XML, verifies split separation and sampling-weight totals, and retokenizes a deterministic sample. The published audit checksum matches the published Parquet.
Synthetic facts and hard-negative evidence are checked against explicit contracts. Real USDA prose is context, not a universal clean-text guarantee: respect metadata.label_scope and supervised_columns. Empty labels do not certify unrelated cells or unknown semantic constraints. Validation establishes tested integrity properties, not perfect natural-language truth or model performance.
Licensing and attribution
Project-authored synthetic content, annotations and documentation are licensed under CC BY-NC 4.0. Commercial use of that content requires permission from the project owner.
USDA FoodData Central data is public domain and published under CC0 1.0, as described in the FoodData Central API guide. Its source terms remain applicable independently of the project-authored portions. Attribution: U.S. Department of Agriculture, Agricultural Research Service. FoodData Central, 2019. fdc.nal.usda.gov. Source-specific provenance and terms are recorded in provenance.json.
- Downloads last month
- 32