Datasets:

nguha commited on
Commit
709d11b
Β·
1 Parent(s): 192f2c0

Changed data

Browse files
.ipynb_checkpoints/demo-checkpoint.ipynb CHANGED
@@ -20,7 +20,7 @@
20
  },
21
  {
22
  "cell_type": "code",
23
- "execution_count": 11,
24
  "id": "2cb75e7c-b7eb-4601-85f3-cc27c1f5ff94",
25
  "metadata": {},
26
  "outputs": [
@@ -28,20 +28,21 @@
28
  "name": "stderr",
29
  "output_type": "stream",
30
  "text": [
31
- "Downloading builder script: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3.63k/3.63k [00:00<00:00, 5.25MB/s]\n"
32
  ]
33
  },
34
  {
35
  "name": "stdout",
36
  "output_type": "stream",
37
  "text": [
38
- "Downloading and preparing dataset housing_qa/questions to /Users/neelguha/.cache/huggingface/datasets/reglab___housing_qa/questions/1.0.0/c3f397c8b54111729d49ff66d6145d407a535b137643491f86e3dc7b858cf34a...\n"
39
  ]
40
  },
41
  {
42
  "name": "stderr",
43
  "output_type": "stream",
44
  "text": [
 
45
  " \r"
46
  ]
47
  },
@@ -49,7 +50,7 @@
49
  "name": "stdout",
50
  "output_type": "stream",
51
  "text": [
52
- "Dataset housing_qa downloaded and prepared to /Users/neelguha/.cache/huggingface/datasets/reglab___housing_qa/questions/1.0.0/c3f397c8b54111729d49ff66d6145d407a535b137643491f86e3dc7b858cf34a. Subsequent calls will reuse this data.\n"
53
  ]
54
  },
55
  {
@@ -173,19 +174,19 @@
173
  "4 [A landlord waives their right to evict by acc... "
174
  ]
175
  },
176
- "execution_count": 11,
177
  "metadata": {},
178
  "output_type": "execute_result"
179
  }
180
  ],
181
  "source": [
182
- "questions = load_dataset(\"reglab/housing_qa\", \"questions\", split=\"test\")\n",
183
  "questions.to_pandas().head(5)"
184
  ]
185
  },
186
  {
187
  "cell_type": "code",
188
- "execution_count": 13,
189
  "id": "3931e731-006f-4731-8350-a7f83ea3f298",
190
  "metadata": {},
191
  "outputs": [
@@ -204,7 +205,7 @@
204
  " 'caveats': ['']}"
205
  ]
206
  },
207
- "execution_count": 13,
208
  "metadata": {},
209
  "output_type": "execute_result"
210
  }
 
20
  },
21
  {
22
  "cell_type": "code",
23
+ "execution_count": 17,
24
  "id": "2cb75e7c-b7eb-4601-85f3-cc27c1f5ff94",
25
  "metadata": {},
26
  "outputs": [
 
28
  "name": "stderr",
29
  "output_type": "stream",
30
  "text": [
31
+ "Downloading builder script: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3.64k/3.64k [00:00<00:00, 13.8MB/s]\n"
32
  ]
33
  },
34
  {
35
  "name": "stdout",
36
  "output_type": "stream",
37
  "text": [
38
+ "Downloading and preparing dataset housing_qa/questions to /Users/neelguha/.cache/huggingface/datasets/reglab___housing_qa/questions/1.0.0/8bf686206d753eb1bc023c1aa0b7841398d312cdf6a0e537f27fb74f6eab4eef...\n"
39
  ]
40
  },
41
  {
42
  "name": "stderr",
43
  "output_type": "stream",
44
  "text": [
45
+ "Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 987k/987k [00:00<00:00, 6.72MB/s]\n",
46
  " \r"
47
  ]
48
  },
 
50
  "name": "stdout",
51
  "output_type": "stream",
52
  "text": [
53
+ "Dataset housing_qa downloaded and prepared to /Users/neelguha/.cache/huggingface/datasets/reglab___housing_qa/questions/1.0.0/8bf686206d753eb1bc023c1aa0b7841398d312cdf6a0e537f27fb74f6eab4eef. Subsequent calls will reuse this data.\n"
54
  ]
55
  },
56
  {
 
174
  "4 [A landlord waives their right to evict by acc... "
175
  ]
176
  },
177
+ "execution_count": 17,
178
  "metadata": {},
179
  "output_type": "execute_result"
180
  }
181
  ],
182
  "source": [
183
+ "questions = load_dataset(\"reglab/housing_qa\", \"questions\", split=\"test\", download_mode=\"force_redownload\")\n",
184
  "questions.to_pandas().head(5)"
185
  ]
186
  },
187
  {
188
  "cell_type": "code",
189
+ "execution_count": 18,
190
  "id": "3931e731-006f-4731-8350-a7f83ea3f298",
191
  "metadata": {},
192
  "outputs": [
 
205
  " 'caveats': ['']}"
206
  ]
207
  },
208
+ "execution_count": 18,
209
  "metadata": {},
210
  "output_type": "execute_result"
211
  }
data/.DS_Store CHANGED
Binary files a/data/.DS_Store and b/data/.DS_Store differ
 
demo.ipynb CHANGED
@@ -20,7 +20,7 @@
20
  },
21
  {
22
  "cell_type": "code",
23
- "execution_count": 15,
24
  "id": "2cb75e7c-b7eb-4601-85f3-cc27c1f5ff94",
25
  "metadata": {},
26
  "outputs": [
@@ -28,21 +28,21 @@
28
  "name": "stderr",
29
  "output_type": "stream",
30
  "text": [
31
- "Downloading builder script: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3.63k/3.63k [00:00<00:00, 13.7MB/s]\n"
32
  ]
33
  },
34
  {
35
  "name": "stdout",
36
  "output_type": "stream",
37
  "text": [
38
- "Downloading and preparing dataset housing_qa/questions (download: 963.72 KiB, generated: 18.27 MiB, post-processed: Unknown size, total: 19.21 MiB) to /Users/neelguha/.cache/huggingface/datasets/reglab___housing_qa/questions/1.0.0/c3f397c8b54111729d49ff66d6145d407a535b137643491f86e3dc7b858cf34a...\n"
39
  ]
40
  },
41
  {
42
  "name": "stderr",
43
  "output_type": "stream",
44
  "text": [
45
- "Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 987k/987k [00:00<00:00, 10.3MB/s]\n",
46
  " \r"
47
  ]
48
  },
@@ -50,7 +50,7 @@
50
  "name": "stdout",
51
  "output_type": "stream",
52
  "text": [
53
- "Dataset housing_qa downloaded and prepared to /Users/neelguha/.cache/huggingface/datasets/reglab___housing_qa/questions/1.0.0/c3f397c8b54111729d49ff66d6145d407a535b137643491f86e3dc7b858cf34a. Subsequent calls will reuse this data.\n"
54
  ]
55
  },
56
  {
@@ -174,7 +174,7 @@
174
  "4 [A landlord waives their right to evict by acc... "
175
  ]
176
  },
177
- "execution_count": 15,
178
  "metadata": {},
179
  "output_type": "execute_result"
180
  }
@@ -186,7 +186,7 @@
186
  },
187
  {
188
  "cell_type": "code",
189
- "execution_count": 16,
190
  "id": "3931e731-006f-4731-8350-a7f83ea3f298",
191
  "metadata": {},
192
  "outputs": [
@@ -205,7 +205,7 @@
205
  " 'caveats': ['']}"
206
  ]
207
  },
208
- "execution_count": 16,
209
  "metadata": {},
210
  "output_type": "execute_result"
211
  }
 
20
  },
21
  {
22
  "cell_type": "code",
23
+ "execution_count": 21,
24
  "id": "2cb75e7c-b7eb-4601-85f3-cc27c1f5ff94",
25
  "metadata": {},
26
  "outputs": [
 
28
  "name": "stderr",
29
  "output_type": "stream",
30
  "text": [
31
+ "Downloading builder script: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3.64k/3.64k [00:00<00:00, 14.5MB/s]\n"
32
  ]
33
  },
34
  {
35
  "name": "stdout",
36
  "output_type": "stream",
37
  "text": [
38
+ "Downloading and preparing dataset housing_qa/questions (download: 963.72 KiB, generated: 18.27 MiB, post-processed: Unknown size, total: 19.21 MiB) to /Users/neelguha/.cache/huggingface/datasets/reglab___housing_qa/questions/1.0.0/8bf686206d753eb1bc023c1aa0b7841398d312cdf6a0e537f27fb74f6eab4eef...\n"
39
  ]
40
  },
41
  {
42
  "name": "stderr",
43
  "output_type": "stream",
44
  "text": [
45
+ "Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 987k/987k [00:00<00:00, 5.73MB/s]\n",
46
  " \r"
47
  ]
48
  },
 
50
  "name": "stdout",
51
  "output_type": "stream",
52
  "text": [
53
+ "Dataset housing_qa downloaded and prepared to /Users/neelguha/.cache/huggingface/datasets/reglab___housing_qa/questions/1.0.0/8bf686206d753eb1bc023c1aa0b7841398d312cdf6a0e537f27fb74f6eab4eef. Subsequent calls will reuse this data.\n"
54
  ]
55
  },
56
  {
 
174
  "4 [A landlord waives their right to evict by acc... "
175
  ]
176
  },
177
+ "execution_count": 21,
178
  "metadata": {},
179
  "output_type": "execute_result"
180
  }
 
186
  },
187
  {
188
  "cell_type": "code",
189
+ "execution_count": 23,
190
  "id": "3931e731-006f-4731-8350-a7f83ea3f298",
191
  "metadata": {},
192
  "outputs": [
 
205
  " 'caveats': ['']}"
206
  ]
207
  },
208
+ "execution_count": 23,
209
  "metadata": {},
210
  "output_type": "execute_result"
211
  }
housing_qa.py CHANGED
@@ -1,7 +1,7 @@
1
  import csv
2
 
3
  import datasets
4
- from datasets import Features, Value, Sequence
5
  import json
6
  from io import StringIO
7
  from pathlib import Path
@@ -26,7 +26,7 @@ _CONFIGS["questions"] = {
26
  "question": Value("string"),
27
  "answer": Value("string"),
28
  "question_group": Value("int32"),
29
- "statutes": Sequence(feature={
30
  "statute_idx": Value("int32"),
31
  "citation": Value("string"),
32
  "excerpt": Value("string")
@@ -46,7 +46,7 @@ _CONFIGS["questions_aux"] = {
46
  "question": Value("string"),
47
  "answer": Value("string"),
48
  "question_group": Value("int32"),
49
- "statutes": Sequence({
50
  "citation": Value("string"),
51
  "excerpt": Value("string")
52
  }),
 
1
  import csv
2
 
3
  import datasets
4
+ from datasets import Features, Value, Sequence, features
5
  import json
6
  from io import StringIO
7
  from pathlib import Path
 
26
  "question": Value("string"),
27
  "answer": Value("string"),
28
  "question_group": Value("int32"),
29
+ "statutes": features.Sequence(feature={
30
  "statute_idx": Value("int32"),
31
  "citation": Value("string"),
32
  "excerpt": Value("string")
 
46
  "question": Value("string"),
47
  "answer": Value("string"),
48
  "question_group": Value("int32"),
49
+ "statutes": features.Sequence({
50
  "citation": Value("string"),
51
  "excerpt": Value("string")
52
  }),