Dataset Viewer
The dataset viewer is not available for this split.
Cannot extract the features (columns) for the split 'train' of the config 'default' of the dataset.
Error code:   FeaturesError
Exception:    ArrowInvalid
Message:      Schema at index 1 was different: 
filename: string
law_code: string
timeline_code: string
category: null
title: string
is_latest: bool
publish_date: timestamp[s]
year: string
month: string
reference_url: string
sections: list<item: struct<sectionId: int64, sectionTypeId: int64, contentNo: int64, content: string>>
raw_enc_id: string
vs
filename: string
law_code: string
timeline_code: string
category: null
title: string
is_latest: bool
publish_date: timestamp[s]
year: string
month: string
reference_url: string
sections: list<item: struct<sectionId: int64, sectionTypeId: int64, contentNo: int64, content: string, sectionNo: string, sectionName: string>>
raw_enc_id: string
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 249, in compute_first_rows_from_streaming_response
                  iterable_dataset = iterable_dataset._resolve_features()
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 3496, in _resolve_features
                  features = _infer_features_from_batch(self.with_format(None)._head())
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2257, in _head
                  return next(iter(self.iter(batch_size=n)))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2461, in iter
                  for key, example in iterator:
                                      ^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 1952, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 1974, in _iter_arrow
                  yield from self.ex_iterable._iter_arrow()
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 531, in _iter_arrow
                  yield new_key, pa.Table.from_batches(chunks_buffer)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "pyarrow/table.pxi", line 5039, in pyarrow.lib.Table.from_batches
                File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
              pyarrow.lib.ArrowInvalid: Schema at index 1 was different: 
              filename: string
              law_code: string
              timeline_code: string
              category: null
              title: string
              is_latest: bool
              publish_date: timestamp[s]
              year: string
              month: string
              reference_url: string
              sections: list<item: struct<sectionId: int64, sectionTypeId: int64, contentNo: int64, content: string>>
              raw_enc_id: string
              vs
              filename: string
              law_code: string
              timeline_code: string
              category: null
              title: string
              is_latest: bool
              publish_date: timestamp[s]
              year: string
              month: string
              reference_url: string
              sections: list<item: struct<sectionId: int64, sectionTypeId: int64, contentNo: int64, content: string, sectionNo: string, sectionName: string>>
              raw_enc_id: 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
35