Datasets:

nguha commited on
Commit
c0395cb
Β·
1 Parent(s): bd2366b

Updating demo

Browse files
Files changed (1) hide show
  1. demo.ipynb +100 -16
demo.ipynb CHANGED
@@ -320,31 +320,115 @@
320
  },
321
  {
322
  "cell_type": "code",
323
- "execution_count": null,
324
  "id": "b4ce7ae9-618f-4594-be69-b53a58e580e4",
325
  "metadata": {},
326
  "outputs": [
327
  {
328
- "name": "stderr",
329
- "output_type": "stream",
330
- "text": [
331
- "Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 732M/732M [00:27<00:00, 26.4MB/s]\n",
332
- "Generating test split: 0 examples [00:00, ? examples/s]"
333
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  }
335
  ],
336
  "source": [
337
  "statutes = load_dataset(\"reglab/housing_qa\", \"statutes\")\n",
338
- "statutes[\"test\"].to_pandas().head(5)"
339
  ]
340
- },
341
- {
342
- "cell_type": "code",
343
- "execution_count": null,
344
- "id": "c6958462-4f76-4a2d-8a6b-f379fc70095a",
345
- "metadata": {},
346
- "outputs": [],
347
- "source": []
348
  }
349
  ],
350
  "metadata": {
 
320
  },
321
  {
322
  "cell_type": "code",
323
+ "execution_count": 12,
324
  "id": "b4ce7ae9-618f-4594-be69-b53a58e580e4",
325
  "metadata": {},
326
  "outputs": [
327
  {
328
+ "data": {
329
+ "text/html": [
330
+ "<div>\n",
331
+ "<style scoped>\n",
332
+ " .dataframe tbody tr th:only-of-type {\n",
333
+ " vertical-align: middle;\n",
334
+ " }\n",
335
+ "\n",
336
+ " .dataframe tbody tr th {\n",
337
+ " vertical-align: top;\n",
338
+ " }\n",
339
+ "\n",
340
+ " .dataframe thead th {\n",
341
+ " text-align: right;\n",
342
+ " }\n",
343
+ "</style>\n",
344
+ "<table border=\"1\" class=\"dataframe\">\n",
345
+ " <thead>\n",
346
+ " <tr style=\"text-align: right;\">\n",
347
+ " <th></th>\n",
348
+ " <th>citation</th>\n",
349
+ " <th>path</th>\n",
350
+ " <th>state</th>\n",
351
+ " <th>text</th>\n",
352
+ " <th>idx</th>\n",
353
+ " </tr>\n",
354
+ " </thead>\n",
355
+ " <tbody>\n",
356
+ " <tr>\n",
357
+ " <th>0</th>\n",
358
+ " <td>MO Rev Stat Β§ 1.010 (2021)</td>\n",
359
+ " <td>2021 Missouri Revised Statutes|Title I - Laws ...</td>\n",
360
+ " <td>missouri</td>\n",
361
+ " <td>Effective - 28 Aug 2015 1.010. Common law in...</td>\n",
362
+ " <td>0</td>\n",
363
+ " </tr>\n",
364
+ " <tr>\n",
365
+ " <th>1</th>\n",
366
+ " <td>MO Rev Stat Β§ 1.020 (2021)</td>\n",
367
+ " <td>2021 Missouri Revised Statutes|Title I - Laws ...</td>\n",
368
+ " <td>missouri</td>\n",
369
+ " <td>Effective - 28 Aug 2009 1.020. Definitions. ...</td>\n",
370
+ " <td>1</td>\n",
371
+ " </tr>\n",
372
+ " <tr>\n",
373
+ " <th>2</th>\n",
374
+ " <td>MO Rev Stat Β§ 1.025 (2021)</td>\n",
375
+ " <td>2021 Missouri Revised Statutes|Title I - Laws ...</td>\n",
376
+ " <td>missouri</td>\n",
377
+ " <td>Effective - 28 Aug 1958 1.025. Registered ma...</td>\n",
378
+ " <td>2</td>\n",
379
+ " </tr>\n",
380
+ " <tr>\n",
381
+ " <th>3</th>\n",
382
+ " <td>MO Rev Stat Β§ 1.028 (2021)</td>\n",
383
+ " <td>2021 Missouri Revised Statutes|Title I - Laws ...</td>\n",
384
+ " <td>missouri</td>\n",
385
+ " <td>Effective - 28 Aug 1999 1.028. English is th...</td>\n",
386
+ " <td>3</td>\n",
387
+ " </tr>\n",
388
+ " <tr>\n",
389
+ " <th>4</th>\n",
390
+ " <td>MO Rev Stat Β§ 1.030 (2021)</td>\n",
391
+ " <td>2021 Missouri Revised Statutes|Title I - Laws ...</td>\n",
392
+ " <td>missouri</td>\n",
393
+ " <td>Effective - 28 Aug 1957 1.030. Plural includ...</td>\n",
394
+ " <td>4</td>\n",
395
+ " </tr>\n",
396
+ " </tbody>\n",
397
+ "</table>\n",
398
+ "</div>"
399
+ ],
400
+ "text/plain": [
401
+ " citation \\\n",
402
+ "0 MO Rev Stat Β§ 1.010 (2021) \n",
403
+ "1 MO Rev Stat Β§ 1.020 (2021) \n",
404
+ "2 MO Rev Stat Β§ 1.025 (2021) \n",
405
+ "3 MO Rev Stat Β§ 1.028 (2021) \n",
406
+ "4 MO Rev Stat Β§ 1.030 (2021) \n",
407
+ "\n",
408
+ " path state \\\n",
409
+ "0 2021 Missouri Revised Statutes|Title I - Laws ... missouri \n",
410
+ "1 2021 Missouri Revised Statutes|Title I - Laws ... missouri \n",
411
+ "2 2021 Missouri Revised Statutes|Title I - Laws ... missouri \n",
412
+ "3 2021 Missouri Revised Statutes|Title I - Laws ... missouri \n",
413
+ "4 2021 Missouri Revised Statutes|Title I - Laws ... missouri \n",
414
+ "\n",
415
+ " text idx \n",
416
+ "0 Effective - 28 Aug 2015 1.010. Common law in... 0 \n",
417
+ "1 Effective - 28 Aug 2009 1.020. Definitions. ... 1 \n",
418
+ "2 Effective - 28 Aug 1958 1.025. Registered ma... 2 \n",
419
+ "3 Effective - 28 Aug 1999 1.028. English is th... 3 \n",
420
+ "4 Effective - 28 Aug 1957 1.030. Plural includ... 4 "
421
+ ]
422
+ },
423
+ "execution_count": 12,
424
+ "metadata": {},
425
+ "output_type": "execute_result"
426
  }
427
  ],
428
  "source": [
429
  "statutes = load_dataset(\"reglab/housing_qa\", \"statutes\")\n",
430
+ "statutes[\"corpus\"].to_pandas().head(5)"
431
  ]
 
 
 
 
 
 
 
 
432
  }
433
  ],
434
  "metadata": {