sukhrobnurali commited on
Commit
9de0c3b
·
verified ·
1 Parent(s): 7659dec

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -24
README.md CHANGED
@@ -22,6 +22,10 @@ configs:
22
  data_files:
23
  - split: train
24
  path: data/constitution.jsonl
 
 
 
 
25
  ---
26
 
27
  # Constitution of the Republic of Uzbekistan (Trilingual Dataset)
@@ -35,48 +39,65 @@ This dataset contains the **Constitution of the Republic of Uzbekistan** (New Ed
35
 
36
  The data was carefully scraped and processed from the official National Database of Legislation of the Republic of Uzbekistan. It serves as a high-quality parallel corpus for legal NLP tasks, machine translation, and constitutional analysis.
37
 
38
- ## Dataset Structure
39
-
40
- The dataset is provided in **JSONL** format (`constitution.jsonl`). Each row represents a single Article of the constitution, perfectly aligned across all three languages.
41
 
42
- ### Data Fields
43
 
44
- | Field | Description | Example |
45
- | :--- | :--- | :--- |
46
- | `article_number` | The unique number of the article. | `"1"` |
47
- | `text_uz` | Content of the article in Uzbek. | `"Oʻzbekiston — boshqaruvning..."` |
48
- | `chapter_uz` | Chapter title in Uzbek (includes context). | `"I bob. Davlat suvereniteti"` |
49
- | `part_uz` | Part title in Uzbek (includes context). | `"BIRINCHI BOʻLIM. ASOSIY PRINSIPLAR"` |
50
- | `text_ru` | Content of the article in Russian. | `"Узбекистан — суверенное..."` |
51
- | `chapter_ru` | Chapter title in Russian. | `"Глава I. Государственный суверенитет"` |
52
- | `part_ru` | Part title in Russian. | `"РАЗДЕЛ ПЕРВЫЙ. ОСНОВНЫЕ ПРИНЦИПЫ"` |
53
- | `text_en` | Content of the article in English. | `"Uzbekistan is a sovereign..."` |
54
- | `chapter_en` | Chapter title in English. | `"Chapter I. State Sovereignty"` |
55
- | `part_en` | Part title in English. | `"PART ONE. FUNDAMENTAL PRINCIPLES"` |
56
-
57
- ### Sample Data
58
 
 
59
  ```json
60
  {
61
  "article_number": "1",
62
  "text_uz": "Oʻzbekiston — boshqaruvning respublika shakliga ega boʻlgan suveren, demokratik, huquqiy, ijtimoiy va dunyoviy davlat...",
 
 
63
  "text_ru": "Узбекистан — суверенное, демократическое, правовое, социальное и светское государство...",
64
- "text_en": "Uzbekistan is a sovereign democratic, legal, social and secular state...",
65
- "part_uz": "BIRINCHI BOʻLIM. ASOSIY PRINSIPLAR"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
  ```
68
 
69
  ## Usage
70
 
 
 
71
  ### Loading with Hugging Face Datasets
72
 
73
  ```python
74
  from datasets import load_dataset
75
 
76
- dataset = load_dataset("sukhrobnurali/uzbek_constitution")
77
- # dataset = load_dataset("json", data_files="data/constitution.jsonl") # For local loading
 
 
78
 
79
- print(dataset["train"][0])
 
 
 
80
  ```
81
 
82
  ### Applications
@@ -87,4 +108,4 @@ print(dataset["train"][0])
87
 
88
  ## License
89
 
90
- This dataset is a derivative work of public legal documents. According to the Law of the Republic of Uzbekistan "On Copyright and Related Rights" (Article 8), official documents (laws, resolutions, decisions, etc.) and their official translations are not objects of copyright.
 
22
  data_files:
23
  - split: train
24
  path: data/constitution.jsonl
25
+ - config_name: v2
26
+ data_files:
27
+ - split: train
28
+ path: data/constitution_v2_different_table_structure.jsonl
29
  ---
30
 
31
  # Constitution of the Republic of Uzbekistan (Trilingual Dataset)
 
39
 
40
  The data was carefully scraped and processed from the official National Database of Legislation of the Republic of Uzbekistan. It serves as a high-quality parallel corpus for legal NLP tasks, machine translation, and constitutional analysis.
41
 
42
+ ## Dataset Versions
 
 
43
 
44
+ This dataset is available in two structural variants to support different use cases.
45
 
46
+ ### 1. Default Version (Original Schema)
47
+ * **File:** `data/constitution.jsonl`
48
+ * **Description:** In this version, Chapter and Part titles are single strings that include both the numbering (Roman/Word) and the title text.
49
+ * **Fields:** `article_number`, `text_{lang}`, `chapter_{lang}`, `part_{lang}`.
 
 
 
 
 
 
 
 
 
 
50
 
51
+ **Sample Data (V1):**
52
  ```json
53
  {
54
  "article_number": "1",
55
  "text_uz": "Oʻzbekiston — boshqaruvning respublika shakliga ega boʻlgan suveren, demokratik, huquqiy, ijtimoiy va dunyoviy davlat...",
56
+ "chapter_uz": "I bob. Davlat suvereniteti",
57
+ "part_uz": "BIRINCHI BOʻLIM. ASOSIY PRINSIPLAR",
58
  "text_ru": "Узбекистан — суверенное, демократическое, правовое, социальное и светское государство...",
59
+ "chapter_ru": "Глава I. Государственный суверенитет",
60
+ "part_ru": "РАЗДЕЛ ПЕРВЫЙ. ОСНОВНЫЕ ПРИНЦИПЫ"
61
+ }
62
+ ```
63
+
64
+ ### 2. Alternative Version (Structured Schema)
65
+ * **File:** `data/constitution_v2_different_table_structure.jsonl`
66
+ * **Description:** This version provides granular metadata. The Chapter and Part numbering are separated into their own integer columns, leaving the text columns clean.
67
+ * **Fields:** `article_number`, `text_{lang}`, `chapter_number`, `chapter_{lang}` (text only), `part_number`, `part_{lang}` (text only).
68
+
69
+ **Sample Data (V2):**
70
+ ```json
71
+ {
72
+ "article_number": 1,
73
+ "text_uz": "Oʻzbekiston — boshqaruvning respublika shakliga ega boʻlgan suveren, demokratik, huquqiy, ijtimoiy va dunyoviy davlat...",
74
+ "part_number": 1,
75
+ "part_uz": "ASOSIY PRINSIPLAR",
76
+ "chapter_number": 1,
77
+ "chapter_uz": "Davlat suvereniteti",
78
+ "part_en": "FUNDAMENTAL PRINCIPLES",
79
+ "chapter_en": "State Sovereignty"
80
  }
81
  ```
82
 
83
  ## Usage
84
 
85
+ You can load specific versions of the dataset using the `data_files` argument.
86
+
87
  ### Loading with Hugging Face Datasets
88
 
89
  ```python
90
  from datasets import load_dataset
91
 
92
+ # Option 1: Load the Default Version (V1)
93
+ dataset_v1 = load_dataset("sukhrobnurali/uzbek_constitution", data_files="data/constitution.jsonl")
94
+ print(dataset_v1["train"][0]["chapter_uz"])
95
+ # Output: "I bob. Davlat suvereniteti"
96
 
97
+ # Option 2: Load the Structured Version (V2)
98
+ dataset_v2 = load_dataset("sukhrobnurali/uzbek_constitution", data_files="data/constitution_v2_different_table_structure.jsonl")
99
+ print(dataset_v2["train"][0]["chapter_number"])
100
+ # Output: 1
101
  ```
102
 
103
  ### Applications
 
108
 
109
  ## License
110
 
111
+ This dataset is a derivative work of public legal documents. According to the Law of the Republic of Uzbekistan "On Copyright and Related Rights" (Article 8), official documents (laws, resolutions, decisions, etc.) and their official translations are not objects of copyright.