You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

This dataset is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 licence (CC BY-NC-SA 4.0): research, academic, personal and other non-commercial use is permitted with attribution; adaptations must be shared under the same licence; commercial use is not permitted. The original public source data remains under the Government Open Data License - India (GODL-India). Commercial use: contact surya@judicialmind.ai or hello@judicialmind.ai.

Log in or Sign Up to review the conditions and access this dataset content.

BharatTableScribe-Data

Licence: CC BY-NC-SA 4.0 — research and non-commercial use only; derivatives must be shared under the same licence. Commercial use: contact surya@judicialmind.ai or hello@judicialmind.ai

Access is approved automatically when the email you enter matches your Hugging Face account email and belongs to the organisation you name; other requests are reviewed manually.

Raw Indian government tables paired with a clean, standardised long-format version and an executable cleaning program, built from data.gov.in (OGD) and NITI Aayog's NDAP. It is both the training data for BharatTableScribe-4B and a held-out-ministry benchmark: a model reads a messy table (flattened 'A - B - C' headers, merged header rows, unit clauses such as '(Rs. in lakh)', Indian digit grouping, total and sub-total rows, serial-number columns, footnotes, transposed layouts) and writes a JSON object with a schema (finest place level, time kind, unit scales) and a program in a small DSL (header, skip, drop_rows, fill_down, transpose, melt, number, geo, time, const, ...). The program is executed on the full raw table and the result is compared with the gold table cell by cell.

Headline result: BharatTableScribe-4B reaches cell F1 0.946 on synthetic and 0.974 on NDAP-relabelled test tables, against 0.792 and 0.535 for the rule baseline.

Quickstart

from datasets import load_dataset
import json

ds = load_dataset("judicialmind/BharatTableScribe-Data", split="test")   # train / validation / test
item = ds.filter(lambda x: x["kind"] == "synthetic")[0]
raw = json.loads(item["raw"])     # {"title", "ministry", "source", "rows": [[cell, ...], ...], "meta"}
gold = json.loads(item["gold"])   # see Schema
print(item["kind"], item["title"])
for r in raw["rows"][:3]:
    print(r)

Or with pandas / DuckDB on a local copy:

import pandas as pd, duckdb
df = pd.read_parquet("data/test.parquet")
print(df.groupby("kind").size())
print(duckdb.sql("SELECT kind, count(*) FROM 'data/test.parquet' GROUP BY kind"))

The tablescribe/ package in this repository (pure Python, no dependencies) renders the model prompt, executes programs and scores outputs:

from tablescribe import RawTable, messages, parse_output, execute, target_text
raw_t = RawTable.from_json(raw)
chat = messages(raw_t)                                  # [system, user] exactly as BharatTableScribe-4B sees them
reply = target_text(gold["schema"], gold["program"])    # the gold answer in the model's reply format
schema, program, err = parse_output(reply)
clean = execute(raw_t.rows, program)                    # CleanTable: .keys, .rows (keys + value), .roles
print(clean.keys + ["value"])
print(clean.rows[:3])

Evaluate a model

evaluate.py scores replies by executing them (needs pyarrow; run from a local copy of this repo, e.g. huggingface-cli download judicialmind/BharatTableScribe-Data --repo-type dataset --local-dir BharatTableScribe-Data):

cd BharatTableScribe-Data
python evaluate.py --all-predictions predictions/          # reproduces the Results table below
python evaluate.py --predictions my_model.jsonl           # your replies: JSONL {"id": ..., "response": ...}
python evaluate.py --solver                               # rule baseline, re-run from scratch
python evaluate.py --model judicialmind/BharatTableScribe-4B --backend vllm --save tablescribe.jsonl   # GPU

Expected output of the first command: test split, 2,149 items

model synthetic cell F1 synthetic schema acc. NDAP-relabelled cell F1 exec ok
qwen3-30b-a3b-zeroshot 0.009 0.644 0.000 0.118
qwen3-4b-zeroshot 0.001 0.487 0.000 0.034
rule-solver 0.792 0.890 0.535 0.976
tablescribe-4b 0.946 0.945 0.974 0.978

To evaluate your own model, prompt it with tablescribe.prompts.messages(raw) for every test item, save one JSON line {"id", "response"} per item and run --predictions. A missing or unparseable reply scores 0.

Item kinds

kind gold scoring
real NDAP's standardised values for the same table, verified by layout-consistent value agreement with the raw OGD table anchored cell F1 on (place, time, value)
synthetic a simple OGD table re-rendered messy with the inverse program known full cell F1 + schema accuracy
ndap_synth NDAP slices (place, LGD, year, dimensions) relabelled with matched OGD headers, re-rendered messy full cell F1
simple an OGD table as published + its rule-derived program full cell F1

Splits

Held-out ministries: whole ministries (OGD or NDAP side; Parliament answer tables by title topic) are held out for test (8%) and dev (3%); train items that share a source table or NDAP dataset with any held-out item are removed.

split ndap_synth real simple synthetic
train 1268 1402 760 20420
dev 6 7 34 759
test 61 103 68 1917

Files

path contents
data/{train,dev,test}.parquet benchmark items (schema below)
sft/{train,dev}.jsonl chat-format examples in the BharatTableScribe-4B prompt format: id, kind, split, messages (system + user), completion (target JSON)
predictions/*.jsonl test-split replies of the four models in the Results table: id, response
tablescribe/ prompt rendering, program executor (DSL), scorer, rule baseline
evaluate.py evaluation harness

Schema

data/*.parquet:

column type description
id string item id (scribe-<kind>-<hash>)
kind string real, synthetic, ndap_synth or simple
split string train, dev, test
ministry string publishing ministry / department (the held-out unit)
title string table title as published
source_uuid string data.gov.in resource id of the source table (empty when the source is NDAP-only)
ndap_id int NDAP dataset id (real and ndap_synth items)
raw string (JSON) the raw grid: {"title", "ministry", "source", "rows": [[str, ...], ...], "meta"}; every cell is text, header rows are ordinary rows
gold string (JSON) real: {"anchors": [[place, time, value], ...], "attributable", "geo_level", "schema", "program"}; other kinds: {"clean": {"keys", "roles", "rows"}, "schema", "program"}
corruptions list[string] messiness applied to synthetic items (e.g. wide, total_row, unit_scale, transposed, title_rows)
attribution string GODL-India / NDAP attribution of the source table

schema keys: geo_level (national, state, district, subdistrict, block, village, city or none), time (year, financial_year, agri_year, year_month, month, date, quarter or none), scales ({variable or "*": multiplier}).

Results

Test split (held-out ministries):

model synthetic cell F1 synthetic schema acc. NDAP-relabelled cell F1 exec ok
Qwen3-30B-A3B, zero-shot (qwen3-30b-a3b-zeroshot) 0.009 0.644 0.000 0.118
Qwen3-4B, zero-shot (qwen3-4b-zeroshot) 0.001 0.487 0.000 0.034
rule baseline (rule-solver) 0.792 0.890 0.535 0.976
BharatTableScribe-4B (tablescribe-4b) 0.946 0.945 0.974 0.978

Cell F1 compares executed outputs with gold tables. Exec ok is over all 2,149 test items. evaluate.py also scores the real NDAP-anchored items.

Coverage

26,805 items (train 23,850, dev 806, test 2,149) from Indian central-ministry, Parliament and State government tables on data.gov.in and NDAP; English titles and headers. Real pairs: 1546 verified pairs over 666 NDAP datasets (744 with at least 60% of the raw table's informative cells matched).

Source data

Derived from 9,554 resources published on the Open Government Data Platform India (data.gov.in), snapshot May 2026, under the Government Open Data License - India. Per-resource attribution (provider, title, resource URL) is in the attribution column. GODL-India does not cover personal information; tables with personal fields were excluded.

Providers: Andhra Pradesh, Central Electricity Authority, Comptroller And Auditor General of India(CAG), Department of Agriculture and Farmers Welfare, Department of Atomic Energy, Department of School Education and Literacy, Department of States, Department of Telecommunications (DOT), Election Commission of India, Gujarat, Haryana, Himachal Pradesh, Home (Police) Department, Govt of Meghalaya, Indian Council of Agricultural Research (ICAR), International Labour Organization (ILO), Karnataka, Karnataka,Law and Justice Department, Karnataka,High Court of Karnataka, Karnataka,Urban Development Department Karnataka,Karnataka Municipal Data Society, Kerala, Madhya Pradesh, and 70 more.

  • Real pairs pair a raw data.gov.in table with an NDAP (NITI Aayog) dataset whose numbers agree cell by cell.
  • Source tables with personal fields (names, phone numbers, e-mail addresses) are excluded.

NDAP data: NITI Aayog, National Data and Analytics Platform (https://ndap.niti.gov.in); per-item attribution in the attribution column.

Original data: published by the ministries, departments, State governments and Parliament named per table in the dataset's attribution column on the Open Government Data Platform India (data.gov.in) and, where marked, NITI Aayog's National Data and Analytics Platform (NDAP), under the Government Open Data License - India (GODL-India). The original public data remains under GODL-India; the CC BY-NC-SA 4.0 licence of this repository covers JudicialMind's compilation, derived fields, annotations, benchmarks and models.

Citation

@misc{judicialmind2026tablescribedata,
  title={BharatTableScribe-Data: Raw Indian Government Tables with Clean Long Tables and Executable Cleaning Programs},
  author={JudicialMind},
  year={2026},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/datasets/judicialmind/BharatTableScribe-Data}}
}

License

CC BY-NC-SA 4.0 (see LICENSE): research, academic, personal and other non-commercial use, with attribution to JudicialMind and to the original data publishers; adaptations must be shared under the same licence. Commercial use requires a separate licence.

Commercial use: contact surya@judicialmind.ai or hello@judicialmind.ai.

Downloads last month
13

Models trained or fine-tuned on judicialmind/BharatTableScribe-Data

Collection including judicialmind/BharatTableScribe-Data