Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    TypeError
Message:      Couldn't cast array of type string to null
Traceback:    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 343, 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 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2303, in cast_table_to_schema
                  cast_array_to_feature(
                  ~~~~~~~~~~~~~~~~~~~~~^
                      table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      feature,
                      ^^^^^^^^
                  )
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1852, in wrapper
                  return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
                                           ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2059, in cast_array_to_feature
                  _c(array.field(name) if name in array_fields else null_array, subfeature)
                  ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1854, in wrapper
                  return func(array, *args, **kwargs)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
                  casted_array_values = _c(array.values, feature.feature)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1854, in wrapper
                  return func(array, *args, **kwargs)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2059, in cast_array_to_feature
                  _c(array.field(name) if name in array_fields else null_array, subfeature)
                  ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1854, in wrapper
                  return func(array, *args, **kwargs)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2143, in cast_array_to_feature
                  return array_cast(
                      array,
                  ...<2 lines>...
                      allow_decimal_to_str=allow_decimal_to_str,
                  )
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1854, in wrapper
                  return func(array, *args, **kwargs)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2005, in array_cast
                  raise TypeError(f"Couldn't cast array of type {_short_str(array.type)} to {_short_str(pa_type)}")
              TypeError: Couldn't cast array of type string to null

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

OCR Demo Documents — state court opinions

Public state appellate opinions parsed with baidu/Unlimited-OCR, served on vLLM. Each document is published as the original PDF, the raw model output, the converted HTML, and the PDF's own text layer.

Layout

Path Contents
pdf/ Source PDFs, exactly as downloaded from the court
pages/ Page images fed to the model (PNG, 300 dpi)
raw/ Unmodified model output, including <|det|> layout markers
html/ Converted HTML — the deliverable
text/ The PDF's embedded text layer, used as ground truth
layout/ One JSON record per block: text plus its position on the page
cases/ Structured case JSON: caption facts, panel, disposition, grounded citations
manifest.jsonl One row per document: provenance, parameters, scores

Documents

id Case Court Pages Text-layer match
2968s18 Evans v. Jean-Charles, No. 2968 Maryland Court of Special Appeals 4 91.95%
0260s20 Johnson v. Secretary of Public Safety, No. 260 Maryland Court of Special Appeals 3 89.10%
CAAP-11-0000713conada CAAP-11-0000713 (concurring opinion) Hawaii Intermediate Court of Appeals 3 99.65%

Method

Pages are rendered at 300 dpi with PyMuPDF, then all pages of a document are sent in a single Multi page parsing. request — the long-horizon capability the model is named for. Multi-image input puts the model in base mode; window_size is 1024 (rather than the single-image 128) and skip_special_tokens is false so the layout markers survive.

The <|det|> markers are parsed rather than stripped: block categories drive the HTML structure (titles become headings, tables stay tables) and bounding boxes are preserved as data-bbox attributes.

Text with coordinates

The model grounds every block it emits, so each piece of text can be traced back to where it sits on the page. layout/<doc_id>.jsonl carries one record per block with the text, its category, its page number, and its bounding box in four coordinate spaces:

Field Space Matches
bbox_norm 0-1000, origin top-left the model's own output
bbox_pt PDF points, origin top-left PyMuPDF, pdfplumber
bbox_pt_pdf PDF points, origin bottom-left the PDF specification
bbox_px pixels at 300 dpi the rendered page images

The normalized origin was verified against the PDF text layer rather than assumed: a heading the model reports at 0.306/0.085 of the page is measured by PyMuPDF at 0.312/0.086.

Two limits worth knowing. Granularity is block level — paragraphs, headings, footnotes — not per word or per character. And coverage is not exhaustive: occasional blocks have boxes that stop short of all the text they transcribed, so the text is more complete than the geometry.

Structured case data

cases/<doc_id>.json is a layout-aware reading of each opinion. Caption facts are taken from the page geometry — on a Maryland caption page the left column carries the originating court, the right column carries docket, term, the parties around the standalone "V." block, the panel between the appellee and "JJ.", and the filed date. The extraction covers:

  • court, docket number, term, publication status, parties, panel (with senior-judge annotations), opinion type/author, filed date, originating court and case number;
  • the disposition, found as an indented mostly-uppercase block with an outcome keyword, classified into outcomes and cost allocation;
  • every case citation, parsed into name / volume / reporter / first page / pinpoint / year, with parallel citations grouped, signals (See, Cf.) and trailing parentheticals captured;
  • rule and statute citations (Md. Rules, HRS §§, Code articles).

Every extracted property carries a grounding object — page, block index, and bounding box (plus character offsets for citations) — so each fact can be traced to the exact place on the page it was read from.

This extraction is heuristic: it was built and verified against state appellate opinions of this shape. On the three documents here it recovers 12/12 case citations with names and years; fields it cannot find are null rather than guessed. OCR misreads pass through verbatim by design (e.g. a reporter rendered as Hawaii'), so the JSON reflects what the model read, not a cleaned-up ideal.

On the accuracy numbers

These opinions are born-digital PDFs with real embedded text, which is why a text-layer match score is available at all — it is a genuine character-level comparison, not an estimate. It also means they are an easy OCR target: they validate the pipeline end to end, but they do not demonstrate performance on scanned or degraded documents.

Licensing

US state court opinions are government edicts and are not subject to copyright. The pipeline that produced the derived files lives in the accompanying demo repository.

Downloads last month
34