Dataset Viewer
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code: StreamingRowsError
Exception: TypeError
Message: Couldn't cast array of type
struct<sectionId: int64, sectionTypeId: int64, contentNo: int64, content: string, sectionNo: string, sectionName: string>
to
{'sectionId': Value('int64'), 'sectionTypeId': Value('int64'), 'contentNo': Value('int64'), 'content': Value('string')}
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 99, in get_rows_or_raise
return get_rows(
^^^^^^^^^
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/utils.py", line 77, in get_rows
rows_plus_one = list(itertools.islice(ds, rows_max_number + 1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2690, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2227, in __iter__
for key, pa_table in self._iter_arrow():
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2251, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 494, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 384, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 299, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 128, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2321, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2255, in cast_table_to_schema
cast_array_to_feature(
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 1804, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2061, in cast_array_to_feature
casted_array_values = _c(array.values, feature.feature)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 1806, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2101, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")
TypeError: Couldn't cast array of type
struct<sectionId: int64, sectionTypeId: int64, contentNo: int64, content: string, sectionNo: string, sectionName: string>
to
{'sectionId': Value('int64'), 'sectionTypeId': Value('int64'), 'contentNo': Value('int64'), 'content': Value('string')}Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Open Law Data Thailand: OCS Krisdika Dataset
ชุดข้อมูลกฎหมายจาก สำนักงานคณะกรรมการกฤษฎีกา (Office of the Council of State) รวบรวมและจัดทำโดยโครงการ Open Law Data Thailand เพื่อส่งเสริมการเข้าถึงข้อมูลกฎหมายในรูปแบบที่เครื่องอ่านได้ (Machine-Readable)
Dataset Structure
ข้อมูลถูกจัดเก็บในรูปแบบ JSON Lines (.jsonl) แบ่งไฟล์ตาม ปีและเดือน (YYYY/YYYY-MM.jsonl) เพื่อความสะดวกในการดาวน์โหลดและบริหารจัดการ
Data Fields
แต่ละบรรทัด (Row) ประกอบด้วยข้อมูลดังนี้:
title(string): ชื่อกฎหมาย (เช่น "พระราชบัญญัติเจ้าพนักงานตำรวจศาล พ.ศ. 2562")category(string): ประเภทกฎหมาย (เช่น "1B" หรือ พระราชบัญญัติ)law_code(string): รหัสกลุ่มกฎหมายtimeline_code(string): รหัสลำดับเวลาของกฎหมายis_latest(boolean):trueหากเป็นเวอร์ชันล่าสุดที่มีผลบังคับใช้publish_date(string): วันที่ประกาศ (Format: YYYY-MM-DD)reference_url(string): ลิงก์อ้างอิงไปยังหน้าเว็บต้นทาง (searchlaw.ocs.go.th) สำหรับตรวจสอบความถูกต้องsections(list of objects): เนื้อหากฎหมาย แบ่งตามมาตรา/ส่วนsectionId(int): ID อ้างอิงภายในcontent(string): เนื้อหาข้อความ
Example Usage
from datasets import load_dataset
# Load entire dataset
dataset = load_dataset("open-law-data-thailand/ocs-krisdika", split="train")
# Print first example
print(dataset[0])
Disclaimer & License
- Source: ข้อมูลต้นทางมาจาก สำนักงานคณะกรรมการกฤษฎีกา
- License: CC-BY 4.0 (Attribution) - กรุณาอ้างอิงแหล่งที่มาเมื่อนำไปใช้งาน
- Note: ข้อมูลชุดนี้จัดทำขึ้นเพื่อการศึกษาและพัฒนาเทคโนโลยี ไม่สามารถใช้อ้างอิงในทางกฎหมายอย่างเป็นทางการได้ กรุณาตรวจสอบกับเอกสารต้นฉบับอีกครั้ง
Maintained by: Open Law Data Thailand
- Downloads last month
- 24