Datasets:
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: sso-terms-of-use
|
| 4 |
+
license_link: https://sso.agc.gov.sg/Terms-of-Use
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
task_categories:
|
| 8 |
+
- text-retrieval
|
| 9 |
+
- text-classification
|
| 10 |
+
- question-answering
|
| 11 |
+
tags:
|
| 12 |
+
- legal
|
| 13 |
+
- singapore
|
| 14 |
+
- statutes
|
| 15 |
+
- subsidiary-legislation
|
| 16 |
+
- acts
|
| 17 |
+
- regulations
|
| 18 |
+
- knowledge-graph
|
| 19 |
+
- legal-nlp
|
| 20 |
+
- asean
|
| 21 |
+
pretty_name: Singapore Statutes and Subsidiary Legislation (SSO)
|
| 22 |
+
size_categories:
|
| 23 |
+
- 10K<n<100K
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# Singapore Statutes and Subsidiary Legislation
|
| 27 |
+
|
| 28 |
+
A structured, section-level dataset of all Singapore statutes (Acts) and subsidiary legislation (Regulations, Rules, Orders) from [Singapore Statutes Online (SSO)](https://sso.agc.gov.sg/).
|
| 29 |
+
|
| 30 |
+
## Disclaimer
|
| 31 |
+
|
| 32 |
+
**This is an unofficial reproduction of Singapore legislation sourced from Singapore Statutes Online (sso.agc.gov.sg). It is not and should not be relied upon as the authoritative text of Singapore legislation.** The official text is the version published in the Government Gazette.
|
| 33 |
+
|
| 34 |
+
Source: Attorney-General's Chambers of Singapore via Singapore Statutes Online.
|
| 35 |
+
|
| 36 |
+
Use of this dataset is subject to SSO's [Terms of Use](https://sso.agc.gov.sg/Terms-of-Use).
|
| 37 |
+
|
| 38 |
+
## Dataset Summary
|
| 39 |
+
|
| 40 |
+
| | Count |
|
| 41 |
+
|---|---|
|
| 42 |
+
| Acts (primary legislation) | 535 |
|
| 43 |
+
| Subsidiary Legislation (regulations, rules, orders) | 1782 |
|
| 44 |
+
| Total documents | 2317 |
|
| 45 |
+
| Total sections (text chunks) | 55,221 |
|
| 46 |
+
| Act sections | 28,943 |
|
| 47 |
+
| Subsidiary Legislation sections | 26,278 |
|
| 48 |
+
|
| 49 |
+
This dataset provides **parsed, section-level text** rather than raw PDFs. Each section includes its hierarchical position (Part, Division) and parent document metadata. Subsidiary legislation is linked to its parent Act.
|
| 50 |
+
|
| 51 |
+
## Data Structure
|
| 52 |
+
|
| 53 |
+
### `documents.parquet` — Document metadata
|
| 54 |
+
|
| 55 |
+
| Column | Type | Description |
|
| 56 |
+
|--------|------|-------------|
|
| 57 |
+
| `name` | string | Act or SL name (e.g. "Employment Act 1968") |
|
| 58 |
+
| `doc_type` | string | `"act"` or `"subsidiary_legislation"` |
|
| 59 |
+
| `parent_act` | string | Parent Act name (SL only, empty for Acts) |
|
| 60 |
+
| `page_count` | int | Number of pages in source PDF |
|
| 61 |
+
| `num_sections` | int | Number of parsed sections |
|
| 62 |
+
|
| 63 |
+
### `sections.parquet` — Section-level text
|
| 64 |
+
|
| 65 |
+
| Column | Type | Description |
|
| 66 |
+
|--------|------|-------------|
|
| 67 |
+
| `doc_name` | string | Parent document name |
|
| 68 |
+
| `doc_type` | string | `"act"` or `"subsidiary_legislation"` |
|
| 69 |
+
| `parent_act` | string | Parent Act name (SL only) |
|
| 70 |
+
| `section_title` | string | Section heading (e.g. "14. Termination of contract without notice") |
|
| 71 |
+
| `part` | string | Part heading (e.g. "PART 4 REST DAYS, HOURS OF WORK AND OTHER CONDITIONS") |
|
| 72 |
+
| `division` | string | Division heading if applicable |
|
| 73 |
+
| `pages` | string | JSON array of source PDF page numbers |
|
| 74 |
+
| `text` | string | Full section text |
|
| 75 |
+
|
| 76 |
+
## Use Cases
|
| 77 |
+
|
| 78 |
+
- **Legal NLP**: Train or evaluate models on Singapore statutory text
|
| 79 |
+
- **Legal information retrieval**: Build search systems over structured legislation
|
| 80 |
+
- **Knowledge graph construction**: Act-SL hierarchies, cross-references between statutes
|
| 81 |
+
- **Statutory definition extraction**: Interpretation sections contain formal term definitions
|
| 82 |
+
- **Comparative law**: Compare Singapore legislation structure with other common law jurisdictions
|
| 83 |
+
- **RAG (Retrieval-Augmented Generation)**: Section-level chunks ready for embedding and retrieval
|
| 84 |
+
|
| 85 |
+
## How to Load
|
| 86 |
+
|
| 87 |
+
```python
|
| 88 |
+
from datasets import load_dataset
|
| 89 |
+
|
| 90 |
+
# Load both splits
|
| 91 |
+
docs = load_dataset("Kaidon-Ng/singapore-statutes", data_files="data/documents.parquet", split="train")
|
| 92 |
+
sections = load_dataset("Kaidon-Ng/singapore-statutes", data_files="data/sections.parquet", split="train")
|
| 93 |
+
|
| 94 |
+
# Filter by type
|
| 95 |
+
acts_only = sections.filter(lambda x: x["doc_type"] == "act")
|
| 96 |
+
sl_only = sections.filter(lambda x: x["doc_type"] == "subsidiary_legislation")
|
| 97 |
+
|
| 98 |
+
# Get all sections from Employment Act
|
| 99 |
+
ea = sections.filter(lambda x: x["doc_name"] == "Employment Act 1968")
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
## Source and License
|
| 103 |
+
|
| 104 |
+
- **Source**: [Singapore Statutes Online (SSO)](https://sso.agc.gov.sg/), Attorney-General's Chambers of Singapore
|
| 105 |
+
- **License**: Subject to [SSO Terms of Use](https://sso.agc.gov.sg/Terms-of-Use)
|
| 106 |
+
- **Official text**: The Government Gazette version is the authoritative text of Singapore legislation
|
| 107 |
+
- **Processing**: PDFs parsed into structured JSON, then flattened to section-level Parquet
|
| 108 |
+
|
| 109 |
+
## Limitations
|
| 110 |
+
|
| 111 |
+
- This is an **unofficial** reproduction and may contain parsing artifacts from PDF extraction
|
| 112 |
+
- Legislation text may not reflect the most recent amendments
|
| 113 |
+
- Some sections may have formatting issues from PDF-to-text conversion
|
| 114 |
+
- Does not include repealed legislation or historical versions
|
| 115 |
+
- Does not include case law or judicial interpretations
|
| 116 |
+
|
| 117 |
+
## Citation
|
| 118 |
+
|
| 119 |
+
If you use this dataset in your research, please cite:
|
| 120 |
+
|
| 121 |
+
```bibtex
|
| 122 |
+
@misc{singapore_statutes_sso,
|
| 123 |
+
title={Singapore Statutes and Subsidiary Legislation (SSO)},
|
| 124 |
+
author={LawBot Project},
|
| 125 |
+
year={2026},
|
| 126 |
+
publisher={HuggingFace},
|
| 127 |
+
url={https://huggingface.co/datasets/Kaidon-Ng/singapore-statutes}
|
| 128 |
+
}
|
| 129 |
+
```
|