Datasets:
The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: TypeError
Message: 'list' object is not a mapping
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 290, in _generate_tables
pa_table = paj.read_json(
io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
)
File "pyarrow/_json.pyx", line 342, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
raise convert_status(status)
pyarrow.lib.ArrowInvalid: JSON parse error: Column(/gt_parse/sub_total/etc) changed from string to array in row 19
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 489, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 304, in _generate_tables
batch = json_encode_fields_in_json_lines(original_batch, json_field_paths)
File "/usr/local/lib/python3.14/site-packages/datasets/utils/json.py", line 113, in json_encode_fields_in_json_lines
examples = [json_encode_field(example, json_field_path) for example in examples]
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/utils/json.py", line 34, in json_encode_field
return {**example, field: json_encode_field(example.get(field), json_field_path)}
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/utils/json.py", line 34, in json_encode_field
return {**example, field: json_encode_field(example.get(field), json_field_path)}
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/utils/json.py", line 34, in json_encode_field
return {**example, field: json_encode_field(example.get(field), json_field_path)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'list' object is not a mappingNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
CORD-v2 text-only — receipt OCR text → structured JSON
A text-only derivative of CORD-v2 (Consolidated Receipt Dataset; Park et al., 2019), the standard benchmark for document information extraction used by Donut and similar models. The original dataset pairs 1,000 receipt photos with a rich ground-truth schema (~30 field types across 4 groups, including menu line items). This version drops the images and pairs the OCR text of each receipt with its target parse, so text-only LLMs can be trained and evaluated on document extraction to JSON.
Format
Each line is a JSON object:
{
"system_prompt": "Extract the structured data from the following receipt OCR text. Respond with only a JSON object using these field groups:\n- menu: line items, each with nm (name), cnt (count), price, and where present num, unitprice, discountprice, itemsubtotal, vatyn, etc, sub (nested sub-items)\n- void_menu: cancelled items, each with nm, price\n- sub_total: subtotal_price, discount_price, service_price, othersvc_price, tax_price, etc\n- total: total_price, total_etc, cashprice, changeprice, creditcardprice, emoneyprice, menutype_cnt, menuqty_cnt\nAll values are strings. A group or field appears only if present on the receipt; groups with multiple entries are JSON arrays.\nOutput strict JSON exactly like this example — double-quoted keys and values, no single quotes, no code fences, no text before or after the JSON object:\n{\"menu\": [{\"nm\": \"ICE TEA\", \"cnt\": \"2\", \"price\": \"10,000\"}], \"sub_total\": {\"subtotal_price\": \"10,000\", \"tax_price\": \"1,000\"}, \"total\": {\"total_price\": \"11,000\", \"cashprice\": \"15,000\", \"changeprice\": \"4,000\"}}",
"text": "1 REAL GANACHE 16,500\n1 EGG TART 13,000\n1 PIZZA TOAST 16,000\nTOTAL 45,500\nCASH 50,000\nCHANGE 4,500",
"gt_parse": {
"menu": [
{"nm": "REAL GANACHE", "cnt": "1", "price": "16,500"},
{"nm": "EGG TART", "cnt": "1", "price": "13,000"},
{"nm": "PIZZA TOAST", "cnt": "1", "price": "16,000"}
],
"total": {"total_price": "45,500", "cashprice": "50,000", "changeprice": "4,500"}
}
}
| Field | Type | Description |
|---|---|---|
system_prompt |
string | Extraction instruction describing the CORD field groups and demonstrating the expected strict-JSON output with an example (identical on every row); the field list was derived from the keys actually observed across all splits |
text |
string | The receipt's OCR text in visual reading order, one visual line per text line |
gt_parse |
object | The original CORD ground-truth parse, unchanged: nested JSON with menu (line items: nm, cnt, price, unitprice, …), sub_total, total, and related groups |
Splits
| Split | Rows |
|---|---|
| train | 800 |
| validation | 100 |
| test | 100 |
Splits are identical to the original CORD-v2 splits; no rows were added, removed, or moved.
How this was built
CORD has no plain-text field — its raw annotation is word-level: every word with its four-corner pixel coordinates (quad), grouped by semantic field (menu.nm, menu.cnt, menu.price, …) rather than by visual line.
textwas reconstructed from those word annotations to match what an OCR engine would output: words are clustered into visual rows by vertical center (tolerance = half the median word height per receipt) and sorted left-to-right within each row. The semantic-field grouping was deliberately ignored — serializing it directly would leak the answer's field boundaries into the input.gt_parseis the original target parse, verbatim.- Dropped fields from the original
ground_truth:meta,roi,repeating_symbol,dontcare(image-specific geometry and annotation bookkeeping), plus theimagecolumn itself.
Annotations were read directly from the source dataset's parquet files (ground_truth column only); the images were never downloaded.
Caveats
- Models trained on this learn OCR text → JSON. At inference you must run OCR on new documents first; the vision step is not learned.
- Receipts are photographed, sometimes skewed or crumpled, so the coordinate-based line reconstruction can occasionally merge or split a visual row — noise comparable to what real OCR produces.
- Receipts are mostly from Indonesian shops and restaurants; item names mix Indonesian and English.
Citation
@article{park2019cord,
title = {CORD: A Consolidated Receipt Dataset for Post-OCR Parsing},
author = {Park, Seunghyun and Shin, Seung and Lee, Bado and Lee, Junyeop and Surh, Jaeheung and Seo, Minjoon and Lee, Hwalsuk},
journal = {Workshop on Document Intelligence at NeurIPS 2019},
year = {2019}
}
License
Creative Commons Attribution 4.0 International (CC BY 4.0), matching the original CORD-v2 release.
- Downloads last month
- 26