|
Download README.md from QomSSLab/Legal_Qavanin: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/datasets/QomSSLab/Legal_Qavanin/resolve/main/README.md
- Command line
-
hf download hf://datasets/QomSSLab/Legal_Qavanin/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/QomSSLab/Legal_Qavanin/resolve/main/README.md
1.39 kB
| dataset_info: | |
| features: | |
| - name: id | |
| dtype: string | |
| - name: url | |
| dtype: string | |
| - name: title | |
| dtype: string | |
| - name: approve_date | |
| dtype: string | |
| - name: approver | |
| dtype: string | |
| - name: status | |
| dtype: string | |
| - name: text | |
| dtype: string | |
| - name: tanqih | |
| dtype: string | |
| splits: | |
| - name: train | |
| num_bytes: 186652588 | |
| num_examples: 10499 | |
| download_size: 71597292 | |
| dataset_size: 186652588 | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: train | |
| path: data/train-* | |
| # QomSSLab/Legal_Qavanin | |
| Majlis laws from qavanin.ir. The text column marks تنقیح on a section, for example [منسوخه]. The page JSON keeps every crawled field. | |
| Each row has the main fields and `id`. The crawled page, with every field kept, is a separate JSON file in this repo. The file name is the same id. | |
| ## Load one row | |
| ```python | |
| import json | |
| from datasets import load_dataset | |
| from huggingface_hub import hf_hub_download | |
| ds = load_dataset("QomSSLab/Legal_Qavanin", split="train") | |
| row = ds[0] | |
| record_id = str(row["id"]) | |
| path = hf_hub_download( | |
| "QomSSLab/Legal_Qavanin", | |
| f"pages/{record_id[:2]}/{record_id}.json", | |
| repo_type="dataset", | |
| ) | |
| page = json.loads(open(path, encoding="utf-8").read()) | |
| ``` | |
| `page` is the full saved record. `record_id` selects its file: `pages/` + the first two characters of the id + `/` + the id + `.json`. | |