Rewrite dataset card: launch post links, overview, citation
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
pretty_name: 'IndicGram:
|
| 3 |
license: other
|
| 4 |
license_name: source-specific-rights
|
| 5 |
license_link: LICENSE.md
|
|
@@ -61,96 +61,113 @@ configs:
|
|
| 61 |
|
| 62 |
# IndicGram
|
| 63 |
|
| 64 |
-
|
| 65 |
|
| 66 |
-
**
|
|
|
|
|
|
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|---|---:|---|
|
| 70 |
-
| `pages_unicode` | 1,979 | All retained pages, with raw and recovered text |
|
| 71 |
-
| `spans_unicode` | 1,006 | Only spans with recovery events; raw text, repaired text, per-character provenance and crop |
|
| 72 |
-
| `recovery_records` | 1,478 | Existing candidates with linked evidence; original parsed fields remain uncorrected |
|
| 73 |
-
| `recovery_mappings` | 32 | Used mappings scoped to exact source/font hashes |
|
| 74 |
-
| `unresolved_recovery` | 1,198 | Image-backed OCR/layout candidates requiring review |
|
| 75 |
-
|
| 76 |
-
The filtered update repairs **1,424 character occurrences on 63 pages** and provides **2,330 source-image crops**. The local recovery pass also inspected the 14 previously excluded pages; their text and images are still excluded here. Therefore the Hub counts differ from the larger local audit. The six uncertain release-mark occurrences are on excluded pages and are not silently reintroduced.
|
| 77 |
-
|
| 78 |
-
The original six configurations remain byte-identical. Sentence/gloss roles, segmentation, table layout and standalone accent placement still require review. The six-source quarantine stays in place. Standard Unicode covers every confirmed recovered symbol; no invented custom font is included.
|
| 79 |
-
|
| 80 |
-
Image paths in `spans_unicode`, `recovery_records` and `unresolved_recovery` are paths inside `evidence/source_crops.zip`. Each crop has its original page/bounding box and checksum. To inspect images:
|
| 81 |
-
|
| 82 |
-
```python
|
| 83 |
-
from huggingface_hub import hf_hub_download
|
| 84 |
-
from zipfile import ZipFile
|
| 85 |
-
archive = hf_hub_download("neuralnets/IndicGram", "evidence/source_crops.zip", repo_type="dataset", token=True)
|
| 86 |
-
with ZipFile(archive) as bundle:
|
| 87 |
-
bundle.extractall("indicgram-evidence")
|
| 88 |
-
```
|
| 89 |
|
| 90 |
-
|
| 91 |
|
|
|
|
| 92 |
|
| 93 |
-
|
| 94 |
|
| 95 |
-
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|---|---:|---|
|
| 99 |
-
| `pages` | 1,979 | One row per retained physical PDF page; readable selected-layer text and provenance. |
|
| 100 |
-
| `spans` | 127,590 | All retained native/OCR spans with coordinates; alternative layers are explicitly marked. |
|
| 101 |
-
| `examples` | 5,527 | Machine-extracted native text, segmentation, glosses and translation candidates. |
|
| 102 |
-
| `grammar_rules` | 1,842 | Machine-extracted grammatical statements with source evidence. |
|
| 103 |
-
| `sources` | 19 | Acquired editions, authors, URLs, hashes, scope notes and source-specific rights. |
|
| 104 |
-
| `languages` | 18 | Language/variety identity metadata and provisional inclusion status. |
|
| 105 |
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
-
|
| 109 |
|
| 110 |
-
## Load
|
| 111 |
|
| 112 |
```python
|
| 113 |
from datasets import load_dataset
|
| 114 |
|
| 115 |
-
pages
|
| 116 |
-
examples = load_dataset("neuralnets/IndicGram", "examples",
|
| 117 |
-
rules
|
| 118 |
|
| 119 |
-
|
| 120 |
-
milang = pages.filter(lambda row: row["language_id"] == "milang")
|
| 121 |
```
|
| 122 |
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
## Fields and relationships
|
| 126 |
|
| 127 |
-
|
| 128 |
-
- `page_id`, `pdf_page` and `source_sha256` identify exact physical source evidence. The SHA is for the PDF representation; `sources.original_sha256` distinguishes DjVu originals.
|
| 129 |
-
- `pages.text` joins the chosen native/OCR lines with newlines, in the existing geometric order. It is not a human-corrected reading-order reconstruction. `native_text` preserves the PDF text layer separately.
|
| 130 |
-
- `pages.text_span_ids` links to `spans.span_id`. Span `bbox` contains `[x0,y0,x1,y1]` in original PDF points, measured from the top left. `selected_for_page_text` distinguishes chosen lines from retained alternatives.
|
| 131 |
-
- `in_extraction_scope` identifies evidence selected by the existing grammar extraction profiles. Raw pages/spans can include frontmatter, vocabulary, comparison languages and other non-grammar content; a document's language label is not a claim that every token is in that language.
|
| 132 |
-
- Examples and rules retain `span_ids`, original wording, extraction method, confidence, quality flags and review state. Confidence is an uncalibrated heuristic. Linked record IDs are restricted to records present in this snapshot.
|
| 133 |
-
- `source_diagnostic_quarantined=true` identifies sources excluded from local diagnostic tasks for demonstrated encoding/layout errors. This flag is not a complete record-quality filter.
|
| 134 |
-
- `human_validated=false` on every content row. Full Arrow field types are in `metadata/schema.json`.
|
| 135 |
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
|
| 154 |
-
##
|
| 155 |
|
| 156 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
pretty_name: 'IndicGram: Grammar Databank for Low-Resource Indian Languages'
|
| 3 |
license: other
|
| 4 |
license_name: source-specific-rights
|
| 5 |
license_link: LICENSE.md
|
|
|
|
| 61 |
|
| 62 |
# IndicGram
|
| 63 |
|
| 64 |
+
**Grammar rules and interlinear glossed examples for 18 of India's least-resourced languages, recovered page by page from published grammars.**
|
| 65 |
|
| 66 |
+
📝 **Launch post:** [IndicGram: a grammar databank for India's least-resourced languages](https://buildingbad.xyz/blog/indicgram/)
|
| 67 |
+
🔎 **Source map:** [every number in the post, traced to its file](https://buildingbad.xyz/blog/indicgram/sources/)
|
| 68 |
+
🧪 **Lab:** [Building Bad](https://buildingbad.xyz), an independent research lab by [neuralnets](https://cneuralnets.xyz)
|
| 69 |
|
| 70 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
+
## Why this exists
|
| 73 |
|
| 74 |
+
Hundreds of India's languages have almost no text on the internet. For many of them, the richest record that exists is a grammar: a book or dissertation written by a linguist, full of rules and carefully glossed sentences. That is exactly what a model needs to learn a language it has never seen, but it is locked in PDFs and decades-old scans.
|
| 75 |
|
| 76 |
+
IndicGram pulls two things out of those grammars: **grammar rules**, and **interlinear glossed text (IGT)**, the three-line format that shows a sentence, its word-by-word meaning and its translation. Every record points back to its source, its physical page and the exact spans it was read from.
|
| 77 |
|
| 78 |
+
> *miɑʔn dubɑ pɛndɑrɛ dubʔm-ɛn=ə=ɛ*
|
| 79 |
+
> one tree under sit.down-PST.MID=FIN=3SG.ANIM
|
| 80 |
+
> ‘He sat down under a tree.’
|
| 81 |
+
> — Turi, from Peterson et al. (2024), example 51
|
| 82 |
|
| 83 |
+
## At a glance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
+
| | |
|
| 86 |
+
|---|---:|
|
| 87 |
+
| Language varieties | 18 |
|
| 88 |
+
| Source works | 19 |
|
| 89 |
+
| Pages | 1,979 |
|
| 90 |
+
| Example sentences | 5,527 |
|
| 91 |
+
| Grammar rules | 1,842 |
|
| 92 |
+
| Text spans with page coordinates | 127,590 |
|
| 93 |
+
| Character repairs from broken fonts | 1,424 on 63 pages |
|
| 94 |
+
| Human-reviewed records | 0 (review is next) |
|
| 95 |
|
| 96 |
+
**Languages:** Barman Thar, Birhor, Bugun, Gorum-Parenga, Gta / Dideyi, Gutob / Bodo Gadaba, Hakhun Tangsa, Hill Korwa of Kado Pani, Kharia, Lotha Naga, Milang, Ollari Gadaba, Purum, Bonda / Remo, Sherdukpen (Shergaon), Tangam, Turi, Yimchungru Naga. Eight are Austroasiatic (Munda), eight Sino-Tibetan, one Dravidian, and one is still unresolved.
|
| 97 |
|
| 98 |
+
## Load it
|
| 99 |
|
| 100 |
```python
|
| 101 |
from datasets import load_dataset
|
| 102 |
|
| 103 |
+
pages = load_dataset("neuralnets/IndicGram", "pages_unicode", split="train") # default
|
| 104 |
+
examples = load_dataset("neuralnets/IndicGram", "examples", split="train")
|
| 105 |
+
rules = load_dataset("neuralnets/IndicGram", "grammar_rules", split="train")
|
| 106 |
|
| 107 |
+
turi = examples.filter(lambda r: r["language_id"] == "turi")
|
|
|
|
| 108 |
```
|
| 109 |
|
| 110 |
+
`train` is only a storage split. It is not a validated training set, and no evaluation split is defined here.
|
|
|
|
|
|
|
| 111 |
|
| 112 |
+
## What's inside
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
+
| Configuration | Rows | What it holds |
|
| 115 |
+
|---|---:|---|
|
| 116 |
+
| `pages_unicode` *(default)* | 1,979 | Every retained page, with repaired text (`text`) and the original layer (`text_raw`) |
|
| 117 |
+
| `pages` | 1,979 | Page text and provenance as first extracted |
|
| 118 |
+
| `spans` | 127,590 | Native and OCR text spans with bounding boxes in PDF points |
|
| 119 |
+
| `examples` | 5,527 | Example sentences: native text, segmentation, glosses, translation |
|
| 120 |
+
| `grammar_rules` | 1,842 | Grammatical statements with their source evidence |
|
| 121 |
+
| `sources` | 19 | Editions, authors, URLs, hashes and source-specific rights |
|
| 122 |
+
| `languages` | 18 | Language and variety identities, with audit status |
|
| 123 |
+
| `spans_unicode` | 1,006 | Spans repaired from broken font encodings, with per-character provenance |
|
| 124 |
+
| `recovery_records` | 1,478 | Existing candidates linked to their repair evidence |
|
| 125 |
+
| `recovery_mappings` | 32 | Font repairs, each tied to an exact PDF and font hash |
|
| 126 |
+
| `unresolved_recovery` | 1,198 | OCR and layout candidates that still need a human eye |
|
| 127 |
+
|
| 128 |
+
Source-image crops for the recovery tables (2,330 of them) are in `evidence/source_crops.zip`.
|
| 129 |
+
|
| 130 |
+
**How the tables join:** `source_id` links content to `sources`, and `language_id` links it to `languages`. `page_id`, `pdf_page` and `source_sha256` pin the exact physical page. `span_ids` on examples and rules link back to `spans`.
|
| 131 |
+
|
| 132 |
+
## The broken-font fix
|
| 133 |
+
|
| 134 |
+
The Gutob grammar was typeset with TIPA. On the page it shows perfect IPA, but its text layer stores symbols at private font positions, so a copied ʔ turns into a stray character. IndicGram repairs these with mappings scoped to the exact PDF and font. Every recovered character is standard Unicode, so no custom font is needed. The original text is always kept next to the repair.
|
| 135 |
+
|
| 136 |
+
## Please read before using
|
| 137 |
+
|
| 138 |
+
- **Every linguistic record is machine-extracted and unreviewed.** Treat glosses, segmentations, translations and rule boundaries as candidates, not facts. Confidence values are heuristics and are not calibrated.
|
| 139 |
+
- **Known failure modes:** English OCR misses some phonetic symbols and Devanagari; columns can fuse; native, gloss and translation lines can swap. The Gutob, Gta, Remo, Tangam, Shergaon and Gorum sources are flagged with `source_diagnostic_quarantined=true`.
|
| 140 |
+
- Fourteen pages still waiting for OCR are excluded, along with everything extracted from them. Their IDs, without text, are in `metadata/skipped_pages.json`.
|
| 141 |
+
- Some of these languages already appear in ODIN, GlossLM and language archives. Being included here is not a claim of new coverage.
|
| 142 |
+
|
| 143 |
+
## Rights
|
| 144 |
+
|
| 145 |
+
The extracted text belongs to the original authors and publishers. **No blanket licence applies to it.** The Turi (2024) and Birhor (2021) sources are openly licensed under CC BY 4.0; the other works are not cleared for redistribution. Rights are listed source by source in `sources` and in [LICENSE.md](LICENSE.md). Extraction, formatting and quality annotations are IndicGram's own work and may contain errors. If you are an author or publisher and want a work handled differently, please get in touch.
|
| 146 |
+
|
| 147 |
+
## Cite
|
| 148 |
+
|
| 149 |
+
If you use IndicGram, please cite the launch post and the dataset. Please also cite the source grammar for every language you use; the full list is in the [launch post](https://buildingbad.xyz/blog/indicgram/#sources).
|
| 150 |
+
|
| 151 |
+
```bibtex
|
| 152 |
+
@misc{neuralnets2026indicgram,
|
| 153 |
+
author = {neuralnets},
|
| 154 |
+
title = {{IndicGram}: A Grammar Databank for {India}'s Least-Resourced Languages},
|
| 155 |
+
howpublished = {Building Bad},
|
| 156 |
+
year = {2026},
|
| 157 |
+
month = nov,
|
| 158 |
+
url = {https://buildingbad.xyz/blog/indicgram/}
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
@misc{neuralnets2026indicgramdata,
|
| 162 |
+
author = {neuralnets},
|
| 163 |
+
title = {{IndicGram}: Grammar Rules and Interlinear Glossed Examples for Low-Resource {Indian} Languages},
|
| 164 |
+
publisher = {Hugging Face},
|
| 165 |
+
year = {2026},
|
| 166 |
+
url = {https://huggingface.co/datasets/neuralnets/IndicGram},
|
| 167 |
+
note = {Machine-extracted candidates; not human-reviewed}
|
| 168 |
+
}
|
| 169 |
+
```
|
| 170 |
|
| 171 |
+
## Get involved
|
| 172 |
|
| 173 |
+
If you are a linguist, speak one of these languages, or work on low-resource NLP, we'd love your help reviewing and extending IndicGram. Write to **cneuralnets@gmail.com**.
|