The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationError
Exception: CastError
Message: Couldn't cast
id: string
seed: int64
region: string
crossBorder: bool
seller: struct<name: string, taxId: string, address: list<item: string>, email: string, contact: string, ban (... 41 chars omitted)
child 0, name: string
child 1, taxId: string
child 2, address: list<item: string>
child 0, item: string
child 3, email: string
child 4, contact: string
child 5, bank: struct<bank: string, account: string>
child 0, bank: string
child 1, account: string
buyer: struct<name: string, taxId: string, address: list<item: string>, email: string, contact: string, ban (... 41 chars omitted)
child 0, name: string
child 1, taxId: string
child 2, address: list<item: string>
child 0, item: string
child 3, email: string
child 4, contact: string
child 5, bank: struct<bank: string, account: string>
child 0, bank: string
child 1, account: string
docs: list<item: struct<id: string, kind: string, number: string, date: timestamp[s], region: string, curr (... 1115 chars omitted)
child 0, item: struct<id: string, kind: string, number: string, date: timestamp[s], region: string, currency: strin (... 1103 chars omitted)
child 0, id: string
child 1, kind: string
child 2, number: string
child 3, date: timestamp[s]
child 4, region: string
child 5, currency: string
child 6, lang: string
child 7, seller: struct<name: string, taxId: string, address: list<item: string>, email: string, contact: string, ban (... 41 ch
...
child 3, Zero-rated export: string
child 19, signature: struct<name: string, at: timestamp[s], remarks: string>
child 0, name: string
child 1, at: timestamp[s]
child 2, remarks: string
child 20, dueDate: timestamp[s]
child 21, title: string
child 22, body: list<item: string>
child 0, item: string
packets: list<item: struct<id: string, type: string, parts: list<item: struct<docId: string, kind: string>>>>
child 0, item: struct<id: string, type: string, parts: list<item: struct<docId: string, kind: string>>>
child 0, id: string
child 1, type: string
child 2, parts: list<item: struct<docId: string, kind: string>>
child 0, item: struct<docId: string, kind: string>
child 0, docId: string
child 1, kind: string
match: struct<decision: string, reasons: list<item: null>>
child 0, decision: string
child 1, reasons: list<item: null>
child 0, item: null
invoiceApproval: list<item: struct<level: int64, role: string, name: string, decision: string, at: timestamp[s]>>
child 0, item: struct<level: int64, role: string, name: string, decision: string, at: timestamp[s]>
child 0, level: int64
child 1, role: string
child 2, name: string
child 3, decision: string
child 4, at: timestamp[s]
notes: list<item: string>
child 0, item: string
path: string
chain: string
scenario: string
outcome: string
pages: int64
decision: string
to
{'chain': Value('string'), 'region': Value('string'), 'scenario': Value('string'), 'outcome': Value('string'), 'pages': Value('int64'), 'decision': Value('string'), 'path': Value('string')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1835, in _prepare_split_single
for key, table in generator:
^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 621, in wrapped
for item in generator(*args, **kwargs):
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 361, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2309, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
id: string
seed: int64
region: string
crossBorder: bool
seller: struct<name: string, taxId: string, address: list<item: string>, email: string, contact: string, ban (... 41 chars omitted)
child 0, name: string
child 1, taxId: string
child 2, address: list<item: string>
child 0, item: string
child 3, email: string
child 4, contact: string
child 5, bank: struct<bank: string, account: string>
child 0, bank: string
child 1, account: string
buyer: struct<name: string, taxId: string, address: list<item: string>, email: string, contact: string, ban (... 41 chars omitted)
child 0, name: string
child 1, taxId: string
child 2, address: list<item: string>
child 0, item: string
child 3, email: string
child 4, contact: string
child 5, bank: struct<bank: string, account: string>
child 0, bank: string
child 1, account: string
docs: list<item: struct<id: string, kind: string, number: string, date: timestamp[s], region: string, curr (... 1115 chars omitted)
child 0, item: struct<id: string, kind: string, number: string, date: timestamp[s], region: string, currency: strin (... 1103 chars omitted)
child 0, id: string
child 1, kind: string
child 2, number: string
child 3, date: timestamp[s]
child 4, region: string
child 5, currency: string
child 6, lang: string
child 7, seller: struct<name: string, taxId: string, address: list<item: string>, email: string, contact: string, ban (... 41 ch
...
child 3, Zero-rated export: string
child 19, signature: struct<name: string, at: timestamp[s], remarks: string>
child 0, name: string
child 1, at: timestamp[s]
child 2, remarks: string
child 20, dueDate: timestamp[s]
child 21, title: string
child 22, body: list<item: string>
child 0, item: string
packets: list<item: struct<id: string, type: string, parts: list<item: struct<docId: string, kind: string>>>>
child 0, item: struct<id: string, type: string, parts: list<item: struct<docId: string, kind: string>>>
child 0, id: string
child 1, type: string
child 2, parts: list<item: struct<docId: string, kind: string>>
child 0, item: struct<docId: string, kind: string>
child 0, docId: string
child 1, kind: string
match: struct<decision: string, reasons: list<item: null>>
child 0, decision: string
child 1, reasons: list<item: null>
child 0, item: null
invoiceApproval: list<item: struct<level: int64, role: string, name: string, decision: string, at: timestamp[s]>>
child 0, item: struct<level: int64, role: string, name: string, decision: string, at: timestamp[s]>
child 0, level: int64
child 1, role: string
child 2, name: string
child 3, decision: string
child 4, at: timestamp[s]
notes: list<item: string>
child 0, item: string
path: string
chain: string
scenario: string
outcome: string
pages: int64
decision: string
to
{'chain': Value('string'), 'region': Value('string'), 'scenario': Value('string'), 'outcome': Value('string'), 'pages': Value('int64'), 'decision': Value('string'), 'path': Value('string')}
because column names don't match
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1379, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 956, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1702, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1887, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
chain string | region string | scenario string | outcome string | pages int64 | decision string | path string |
|---|---|---|---|---|---|---|
c000007 | ID | missing-page | hold | 5 | hold | fabricated/ID/c000007/degraded/missing-page |
c000007 | ID | quantity-ticks | read_same | 6 | post | fabricated/ID/c000007/degraded/quantity-ticks |
c000007 | ID | receipt-box | read_same | 6 | post | fabricated/ID/c000007/degraded/receipt-box |
c000007 | ID | shuffled-pages | hold | 6 | hold | fabricated/ID/c000007/degraded/shuffled-pages |
c000007 | ID | stamped | read_same | 6 | post | fabricated/ID/c000007/degraded/stamped |
c000019 | ID | altered-total | hold | 5 | hold | fabricated/ID/c000019/degraded/altered-total |
c000019 | ID | folded | read_same | 5 | post | fabricated/ID/c000019/degraded/folded |
c000019 | ID | worst-case | hold | 5 | hold | fabricated/ID/c000019/degraded/worst-case |
c000023 | ID | quantity-written-short | hold | 1 | hold | fabricated/ID/c000023/degraded/quantity-written-short |
c000023 | ID | receipt-box | read_same | 1 | post | fabricated/ID/c000023/degraded/receipt-box |
c000023 | ID | thermal-fade | best_effort | 1 | post | fabricated/ID/c000023/degraded/thermal-fade |
c000035 | ID | duty-stamp | read_same | 6 | post | fabricated/ID/c000035/degraded/duty-stamp |
c000035 | ID | missing-page | hold | 5 | hold | fabricated/ID/c000035/degraded/missing-page |
c000035 | ID | shuffled-pages | hold | 6 | hold | fabricated/ID/c000035/degraded/shuffled-pages |
c000035 | ID | watermark | read_same | 6 | post | fabricated/ID/c000035/degraded/watermark |
c000039 | ID | blank-page | read_same | 5 | post | fabricated/ID/c000039/degraded/blank-page |
c000039 | ID | blur-motion | best_effort | 4 | post | fabricated/ID/c000039/degraded/blur-motion |
c000039 | ID | duty-stamp | read_same | 4 | post | fabricated/ID/c000039/degraded/duty-stamp |
c000039 | ID | missing-page | hold | 3 | hold | fabricated/ID/c000039/degraded/missing-page |
c000039 | ID | shuffled-pages | hold | 4 | hold | fabricated/ID/c000039/degraded/shuffled-pages |
c000045 | ID | stamp-over-total | hold | 2 | hold | fabricated/ID/c000045/degraded/stamp-over-total |
c000045 | ID | stamped | read_same | 2 | post | fabricated/ID/c000045/degraded/stamped |
c000046 | ID | checker-total | read_same | 5 | hold | fabricated/ID/c000046/degraded/checker-total |
c000046 | ID | paid-stamp | hold | 5 | hold | fabricated/ID/c000046/degraded/paid-stamp |
c000046 | ID | receipt-box-mismatch | hold | 5 | hold | fabricated/ID/c000046/degraded/receipt-box-mismatch |
c000053 | ID | checker-total | read_same | 2 | post | fabricated/ID/c000053/degraded/checker-total |
c000053 | ID | punched-stapled | read_same | 2 | post | fabricated/ID/c000053/degraded/punched-stapled |
c000053 | ID | scan | read_same | 2 | post | fabricated/ID/c000053/degraded/scan |
c000065 | ID | cropped | hold | 4 | hold | fabricated/ID/c000065/degraded/cropped |
c000065 | ID | digital-stamp-draft | hold | 4 | hold | fabricated/ID/c000065/degraded/digital-stamp-draft |
c000065 | ID | missing-page | hold | 3 | hold | fabricated/ID/c000065/degraded/missing-page |
c000065 | ID | quantity-written-short | hold | 4 | hold | fabricated/ID/c000065/degraded/quantity-written-short |
c000065 | ID | shuffled-pages | hold | 4 | hold | fabricated/ID/c000065/degraded/shuffled-pages |
c000079 | ID | altered-total | hold | 5 | hold | fabricated/ID/c000079/degraded/altered-total |
c000079 | ID | digital-stamp | read_same | 5 | hold | fabricated/ID/c000079/degraded/digital-stamp |
c000079 | ID | receipt-box | read_same | 5 | hold | fabricated/ID/c000079/degraded/receipt-box |
c000086 | ID | blur-motion | best_effort | 11 | post | fabricated/ID/c000086/degraded/blur-motion |
c000086 | ID | missing-page | hold | 10 | hold | fabricated/ID/c000086/degraded/missing-page |
c000086 | ID | shuffled-pages | hold | 11 | hold | fabricated/ID/c000086/degraded/shuffled-pages |
c000086 | ID | stained | best_effort | 11 | post | fabricated/ID/c000086/degraded/stained |
c000086 | ID | two-up | read_same | 6 | post | fabricated/ID/c000086/degraded/two-up |
c000087 | ID | blank-page | read_same | 6 | post | fabricated/ID/c000087/degraded/blank-page |
c000087 | ID | low-res | best_effort | 5 | post | fabricated/ID/c000087/degraded/low-res |
c000087 | ID | multi-signatures | read_same | 5 | post | fabricated/ID/c000087/degraded/multi-signatures |
c000090 | ID | approval-level-missing | hold | 5 | hold | fabricated/ID/c000090/degraded/approval-level-missing |
c000090 | ID | duplicate-page | read_same | 6 | post | fabricated/ID/c000090/degraded/duplicate-page |
c000090 | ID | folded | read_same | 5 | post | fabricated/ID/c000090/degraded/folded |
c000096 | ID | blank-page | read_same | 6 | post | fabricated/ID/c000096/degraded/blank-page |
c000096 | ID | crossed-out-line | hold | 5 | hold | fabricated/ID/c000096/degraded/crossed-out-line |
c000096 | ID | scan | read_same | 5 | post | fabricated/ID/c000096/degraded/scan |
c000012 | MY | annotated | read_same | 2 | post | fabricated/MY/c000012/degraded/annotated |
c000012 | MY | missing-page | hold | 1 | hold | fabricated/MY/c000012/degraded/missing-page |
c000012 | MY | multi-signatures | read_same | 2 | post | fabricated/MY/c000012/degraded/multi-signatures |
c000012 | MY | shuffled-pages | hold | 2 | hold | fabricated/MY/c000012/degraded/shuffled-pages |
c000012 | MY | watermark | read_same | 2 | post | fabricated/MY/c000012/degraded/watermark |
c000018 | MY | received-stamp | read_same | 1 | post | fabricated/MY/c000018/degraded/received-stamp |
c000018 | MY | skewed | read_same | 1 | post | fabricated/MY/c000018/degraded/skewed |
c000018 | MY | watermark | read_same | 1 | post | fabricated/MY/c000018/degraded/watermark |
c000024 | MY | altered-total | hold | 2 | hold | fabricated/MY/c000024/degraded/altered-total |
c000024 | MY | office-workflow | read_same | 2 | post | fabricated/MY/c000024/degraded/office-workflow |
c000024 | MY | photo-hard | best_effort | 2 | post | fabricated/MY/c000024/degraded/photo-hard |
c000027 | MY | paid-stamp | hold | 2 | hold | fabricated/MY/c000027/degraded/paid-stamp |
c000027 | MY | receipt-box | read_same | 2 | post | fabricated/MY/c000027/degraded/receipt-box |
c000027 | MY | stamp-over-total | hold | 2 | hold | fabricated/MY/c000027/degraded/stamp-over-total |
c000028 | MY | crossed-out-line | hold | 1 | hold | fabricated/MY/c000028/degraded/crossed-out-line |
c000028 | MY | punched-stapled | read_same | 1 | post | fabricated/MY/c000028/degraded/punched-stapled |
c000028 | MY | received-stamp | read_same | 1 | post | fabricated/MY/c000028/degraded/received-stamp |
c000032 | MY | blur-motion | best_effort | 11 | post | fabricated/MY/c000032/degraded/blur-motion |
c000032 | MY | missing-page | hold | 10 | hold | fabricated/MY/c000032/degraded/missing-page |
c000032 | MY | receipt-box | read_same | 11 | post | fabricated/MY/c000032/degraded/receipt-box |
c000032 | MY | shuffled-pages | hold | 11 | hold | fabricated/MY/c000032/degraded/shuffled-pages |
c000049 | MY | digital-stamp-void | hold | 1 | hold | fabricated/MY/c000049/degraded/digital-stamp-void |
c000049 | MY | photo-hard | best_effort | 1 | post | fabricated/MY/c000049/degraded/photo-hard |
c000049 | MY | quantity-written-short | hold | 1 | hold | fabricated/MY/c000049/degraded/quantity-written-short |
c000059 | MY | missing-page | hold | 4 | hold | fabricated/MY/c000059/degraded/missing-page |
c000059 | MY | office-workflow | hold | 5 | hold | fabricated/MY/c000059/degraded/office-workflow |
c000059 | MY | raster | read_same | 5 | hold | fabricated/MY/c000059/degraded/raster |
c000059 | MY | shuffled-pages | hold | 5 | hold | fabricated/MY/c000059/degraded/shuffled-pages |
c000059 | MY | watermark | read_same | 5 | hold | fabricated/MY/c000059/degraded/watermark |
c000060 | MY | office-workflow | read_same | 5 | post | fabricated/MY/c000060/degraded/office-workflow |
c000060 | MY | photo | read_same | 5 | post | fabricated/MY/c000060/degraded/photo |
c000060 | MY | thermal-fade | best_effort | 5 | post | fabricated/MY/c000060/degraded/thermal-fade |
c000068 | MY | duplicate-page | read_same | 2 | hold | fabricated/MY/c000068/degraded/duplicate-page |
c000068 | MY | quantity-written-short | hold | 1 | hold | fabricated/MY/c000068/degraded/quantity-written-short |
c000068 | MY | redacted | best_effort | 1 | hold | fabricated/MY/c000068/degraded/redacted |
c000077 | MY | annotated | read_same | 5 | post | fabricated/MY/c000077/degraded/annotated |
c000077 | MY | approval-stamps | read_same | 5 | post | fabricated/MY/c000077/degraded/approval-stamps |
c000077 | MY | multi-signatures | read_same | 5 | post | fabricated/MY/c000077/degraded/multi-signatures |
c000001 | PH | duplicate-page | read_same | 7 | hold | fabricated/PH/c000001/degraded/duplicate-page |
c000001 | PH | folded | read_same | 6 | hold | fabricated/PH/c000001/degraded/folded |
c000001 | PH | missing-page | hold | 5 | hold | fabricated/PH/c000001/degraded/missing-page |
c000001 | PH | shuffled-pages | hold | 6 | hold | fabricated/PH/c000001/degraded/shuffled-pages |
c000001 | PH | stamp-over-total | hold | 6 | hold | fabricated/PH/c000001/degraded/stamp-over-total |
c000005 | PH | cropped | hold | 1 | hold | fabricated/PH/c000005/degraded/cropped |
c000005 | PH | paid-stamp | hold | 1 | hold | fabricated/PH/c000005/degraded/paid-stamp |
c000005 | PH | stained | best_effort | 1 | post | fabricated/PH/c000005/degraded/stained |
c000016 | PH | altered-total | hold | 1 | hold | fabricated/PH/c000016/degraded/altered-total |
c000016 | PH | crossed-out-line | hold | 1 | hold | fabricated/PH/c000016/degraded/crossed-out-line |
c000016 | PH | stamp-over-total | hold | 1 | hold | fabricated/PH/c000016/degraded/stamp-over-total |
c000017 | PH | blank-page | read_same | 3 | post | fabricated/PH/c000017/degraded/blank-page |
Fabricated business documents
Every document here is fabricated: companies, people, addresses, tax numbers, bank accounts and amounts are invented. Tax numbers have the shape of
the real ones but are drawn at random, so one may by chance equal a real number; e-mail addresses end in .example. No real company's document was used.
They are made by a seeded generator (fabricate/ in the Tern repository), so the same arguments give the same files.
What is in a chain
One buying-and-selling story per folder, from a request for quotation to the invoice and its match:
rfq → quotation → purchase_order (with its approval levels) → sales_order → proforma_invoice (some) → delivery_note → proof_of_delivery (signed) →
goods_receipt → invoice → tax_invoice (Indonesia) → credit_note (some), and the packet the supplier sends: the invoice alone, with a tax invoice, with
a proof of delivery, or bundled with the order, the delivery note and an attachment, as one multi-page PDF.
Layout
fabricated/<REGION>/<chain id>/
chain.json the whole story: parties, every document, the expected match, notes on what was done to it
packet.pdf what the supplier sends, one file
packet.json the parts of packet.pdf with their page ranges, and the expected decision (post or hold, with reasons)
documents/NN-<kind>.pdf each document on its own
documents/NN-<kind>.json its ground truth: every field and every line
degraded/<scenario>/packet.pdf the same packet as a bad document: scan, fax, phone photo, blur, scratches, stains, stamps, a struck-through line, an altered total, a missing page...
degraded/<scenario>/degrade.json what was done to which page, where each page came from, and the right handling (read_same, best_effort or hold, with reasons)
manifest.jsonl one line per chain
degraded.jsonl one line per bad-document packet
real/ reserved; empty unless real files have been cleared for publication, and then marked as such
Regions and what varies
Indonesia, Singapore, Malaysia, Thailand, Philippines, Vietnam, United States. Five page layouts, long tables over several pages with the sum carried forward, labels in the local language or English, local number formats,
tax rules (a separate tax invoice in Indonesia, zero-rated cross-border sales in USD). About a quarter of the invoices have something wrong on purpose:
a price above the order, more billed than received, a missing order number, a total that does not add up, a notice changing the bank account, an order missing its last approval.
packet.json says what is wrong, so a system's decision can be scored.
Limits
These are drawn documents. The degraded/ packets add drawn damage (blur, stains, strikes, stamps, missing pages), which is not the same as photographs of real paper: real stamps, handwriting and odd layouts are the hard part and are only partly here.
This release: 100 chains, 18 of them with something wrong, 40 with an invoice of more than 12 lines, packet types full_bundle, single, invoice_support, invoice_tax.
- Downloads last month
- 243