Thinking global, living local

How to use gazette-translated-indexed: a citation index of Indian gazette notifications

October 19, 2026

gazette-translated-indexed (Gazette Trail) tells you what an Indian gazette notification amends, what amended it before, and what superseded it, which you cannot see by reading one notification alone. It is a SQLite citation graph built from quoted primary-source text.

Open-Source Tools · How-To · Govt data & research ops

How to use gazette-translated-indexed: a citation index of Indian gazette notifications

Skip to article content
Text Size

Revised · v1.0.0 · what changed

2,637notifications in the rebuilt database
2,150cross-references (1,655 'amends')
53ministries modelled
197tests passed in the run

Code: github.com/herrrickshaw/gazette-translated-indexed

Watch the walkthrough

Watch on YouTube: youtu.be/wJMHJzOV_UM

Why it is useful

  • Who benefits: trade, tax and compliance researchers, legal-data builders and journalists who must trace a notification through its amendment chain.
  • What it replaces: manually hunting for 'in the notification number X, dated Y' references across separate PDFs on egazette.gov.in.
  • Evidence from the run: the seed SQL files rebuilt a database of 2,637 notifications and 2,150 cross-references across 53 ministries, with an empty foreign-key check.
  • Evidence from the run: the repo's own test suite passed (197 tests, 0.3 seconds) and one Customs notification (45/2025) showed 9 incoming links, including 2 corrigenda.

What it is for

Gazette Trail is a citation index. Each notification is a row; each 'amends', 'supersedes', 'corrigendum', 'rescinds', 'repeals' or 'cites' link is a row in a cross_reference table. Reading the links in both directions gives you the lineage of a rule: what it changed and what changed it later.

The links are drawn from real quoted notification text, recurring sentence shapes are matched by shared regex templates, and each ministry module has its own tests. The pilot is CBIC customs notifications, extended to 53 central ministries.

This demo used only the committed SQL seed files and ran no live fetch. Nothing was downloaded from egazette.gov.in, and no PDFs or OCR were used.

Who it is for

  • Researchers and compliance teams tracing amendments to Indian rules
  • Developers building legal or regulatory knowledge graphs
  • Data journalists who need an amendment chain for a notification
Not for.
  • Legal advice. This is an index of public notifications, not a legal opinion; read the official notification before acting.
  • A complete or up-to-date record. Coverage is bounded and the repo says new notifications must be checked with its freshness script.
  • Reading the full legal text. The database stores citations and summaries, not the PDFs.

What you need

RequirementWhyHow to get it
Python 3 and a virtual environmentto run the tests and the CRUD helperspython3 -m venv .venv
pymupdf, requests, pytestlisted in requirements.txt (pymupdf is only needed for PDF extraction)pip install -r requirements.txt
sqlite3 command lineto load the schema and seed filespreinstalled on macOS and most Linux
Network access (optional)only to fetch PDFs by gazette ID from egazette.gov.in, not needed for this demonone

Get the code and an AI assistant

You do not have to be a programmer. Get the repository, give it to an AI assistant, and ask in plain language. Any of these routes works:

ToolWhat you needBest for
GitHubFree account to fork or star; git to clone, or the green Code button, then Download ZIP, or open in CodespacesGetting the code and keeping up with updates
Claude CodeClaude subscription or API key; run claude inside the cloned folderLetting the AI read and run the whole repo
Gemini CLIGoogle account; run gemini inside the cloned folderThe same hands-on workflow with Gemini
Claude.ai, Gemini or ChatGPT in the browserA chat account; upload README.md and the files you care about (or paste the output of git ls-files)Understanding the project and asking questions without installing anything
Other tools (Copilot Chat, Cursor, Codex CLI)Open the cloned folder in the tool and point it at README.md firstEditing and extending the code
git clone https://github.com/herrrickshaw/gazette-translated-indexed.git
cd gazette-translated-indexed
claude      # or: gemini

Install

  1. Clone the repo and create a virtual environment.
    git clone https://github.com/herrrickshaw/gazette-translated-indexed.git
    cd gazette-translated-indexed
    python3 -m venv .venv && source .venv/bin/activate
    pip install -r requirements.txt

Quick start: commands and what you should see

Build the database from the seed files.

sqlite3 gazette.db < db/schema.sql
for f in db/seed_*.sql; do sqlite3 gazette.db < "$f"; done
sqlite3 gazette.db "PRAGMA foreign_key_check;"

The foreign-key check prints nothing, which is the pass condition.

Run the test suite.

pytest tests/

In the 19 October 2026 run: 197 passed in 0.30s (the README still says 141 tests, so its counts lag).

Read one notification's lineage.

python3 -c "
import sqlite3
from db.crud import get_lineage
c=sqlite3.connect('gazette.db'); c.execute('PRAGMA foreign_keys = ON')
print(get_lineage(c,'power-so-5852-2022'))"

A dictionary with 'points_at' and 'pointed_at_by'; here one later power-ministry notification amends it.

Sample outputs

Real output from a run on the date shown in the sources line; trimmed to fit.

Relation types across the whole index

sqlite3 -header -column gazette.db "select relation_type, count(*) n from cross_reference group by 1 order by n desc;"
relation_type   n
-------------  ----
amends         1655
cites           213
supersedes      155
corrigendum      90
rescinds         32
repeals           5

Amendments dominate; supersession and corrigenda are the minority.

Everything that points at Customs notification 45/2025

sqlite3 -header -column gazette.db "select g.gazette_id, g.publish_date, g.gsr_or_so, x.relation_type from cross_reference x join gazette_notification g on g.gazette_id=x.source_gazette_id where x.target_gazette_id='cus-45-2025';"
    gazette_id      publish_date    gsr_or_so    relation_type
------------------  ------------  -------------  -------------
cus-2-2026          2026-02-01    G.S.R. 83(E)            amends
cus-corr-45-2025-a  2025-10-31    G.S.R. 807(E)           corrigendum
cus-48-2025         2025-11-14    G.S.R. 847(E)           amends
cus-6-2026          2026-03-12    G.S.R. 181(E)           amends
cus-14-2026         2026-04-30    G.S.R. 330(E)           amends
cus-15-2026         2026-05-12    G.S.R. 358(E)           amends
cus-corr-45-2025-b  2026-06-12    G.S.R. 476(E)           corrigendum
cus-25-2026         2026-07-08    G.S.R. 600(E)           amends
cus-44-2025         2025-10-24    G.S.R. 782(E)           cites

Nine later or related notifications link to one 2025 customs notification: the amendment chain a single PDF does not show.

Most-amended targets

sqlite3 -header -column gazette.db "select target_gazette_id, count(*) n from cross_reference group by 1 order by n desc limit 3;"
target_gazette_id   n
------------------  --
dopt-gsr-730-1986   26
dopt-gsr-152-1954   23
dopt-gsr-610-1985   15

Personnel (DoPT) rules from the 1950s to 1980s are the most-amended targets.

Ways to use it

MethodHow it works
SQLite directlyQuery gazette_notification and cross_reference with any SQLite client.
db/crud.pylist_notifications and get_lineage are the supported read path; deletes are soft by default.
LLM corpus exportpython3 -m render.llm_export --db gazette.db writes a JSONL with one notification per line and one-hop lineage.
Via an AI assistantPoint an assistant at README.md and the database and ask it to trace a notification.

Sample prompts for your AI assistant

Copy, paste and edit the parts in [brackets].

  • Read README.md and explain the Gazette Trail pipeline from fetching a PDF to a cross-reference row, in a short table.
  • Using gazette.db, list every notification that amends or supersedes cus-45-2025 in date order and explain each relation.
  • Write a read-only SQLite query that finds notifications with no incoming or outgoing cross-references and explain what that might mean.
  • Which ministries have the most cross-references, and what does the repo's MINISTRY_COVERAGE_PLAN say about the three abandoned ones?
  • Explain how the five shared extraction templates in extract/common_templates.py differ, with one example sentence each.
  • Check the README totals against the built database and list the numbers that have drifted.

Limits and honest caveats

  • Citation index of public notifications, not legal advice. Verify against the official egazette.gov.in notification.
  • README counts lag the data: it says 2,591 notifications, 2,113 cross-references and 141 tests; the 19 October 2026 build gave 2,637, 2,150 and 197.
  • Coverage is bounded: 53 ministries are modelled, 3 are documented as abandoned, and new notifications need the freshness check.
  • The demo did not fetch any PDFs, run OCR or translation, and did not use the optional Colab notebooks (not run).
  • The built-in page renderer (render.pages) was not run in this demo.

Sources: Repo README, SQL seed files and tests in github.com/herrrickshaw/gazette-translated-indexed; commands and counts captured in a throwaway virtual environment on 19 October 2026. The database was built in a scratch folder and nothing was committed.

Revision history.
  • v1.0.0 — 20 October 2026 — first published.

About this article: Researched, written and edited by Umashankar Triplicane Dwarakanathan, with AI research assistance; every figure is meant to trace to the primary source cited. See the Editorial Policy for how sourcing, AI use and corrections work.

Umashankar Triplicane Dwarakanathan
Contact Us
Umashankar Triplicane Dwarakanathan
Investment Promotion & Energy-Sector Leader · Chennai, Tamil Nadu, India
LinkedIn → GitHub → Email +91 78273 81696
How this site works

Data-led analysis of India's trade, currency and industrial policy. Every article is built from primary official sources, and every figure links back to the release, table or filing it came from.

Sources. DGCI&S TradeStat (imports/exports, HSN-wise) · PIB (government press releases, January 2017 to today, refreshed daily) · RBI (circulars, balance of payments) · MoSPI (CPI/WPI, IIP) · PARIVESH (environmental clearances) · CCIL (bond yields) · BIS (policy rates) · SEBI, NSE/BSE and SEC filings for company data.

Interpretation. Figures carry their vintage and retrieval date; estimates and press-reported numbers are labelled as such; where sources disagree, both are shown. Corrections are made visibly, never silently. Articles are written with AI assistance from the cited sources — AI-generated text can misstate figures even when working from real material, so verify any number that matters to a decision against the linked primary source.

footer

Browse all articles by topic

Every piece on this blog, grouped. Or read the full index.

Agriculture & FertilisersAI ToolsChemicalsClimate & CarbonEnergy & FuelsGas & LNGImport SubstitutionIndustrial PolicyMarkets & FinanceMobility & EVPrices & InflationTextilesTrade & Tariffs

Each topic is a live archive page that updates itself as pieces are labelled. It replaces a hand-kept list that had fallen 18 articles behind.