File size: 7,324 Bytes
1983de0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
license: cc-by-4.0
task_categories:
- text-retrieval
- text-generation
- question-answering
language:
- th
pretty_name: Royal Gazette Thailand (Ratchakitcha)
size_categories:
- 1M<n<10M
tags:
- law
- thailand
- government
- open-data

---

# Royal Gazette Thailand (Ratchakitcha) Dataset
**ชุดข้อมูลราชกิจจานุเบกษา (แบบ Machine Readable)**

โครงการ **Open Law Data Thailand** ร่วมกับคณะกรรมาธิการการพาณิชย์และการอุตสาหกรรม วุฒิสภา ได้รับความอนุเคราะห์ข้อมูลจาก **สำนักเลขาธิการคณะรัฐมนตรี (สลค.)** เพื่อเผยแพร่ข้อมูลกฎหมายไทยสู่สาธารณะในรูปแบบที่ประมวลผลได้ด้วยคอมพิวเตอร์ (Machine Readable) เพื่อส่งเสริมนวัตกรรม Legal Tech และ AI ของประเทศไทย

## Dataset Description

ชุดข้อมูลนี้รวบรวมรายการประกาศในราชกิจจานุเบกษา ประกอบด้วยชื่อเรื่อง เล่ม ตอน วันที่ประกาศ และลิงก์ไปยังต้นฉบับ PDF เหมาะสำหรับการทำ RAG (Retrieval-Augmented Generation), การสืบค้นกฎหมาย, และการวิเคราะห์ข้อมูลภาครัฐ

- **Source:** สำนักเลขาธิการคณะรัฐมนตรี (The Secretariat of the Cabinet)
- **Official Collaboration Reference:** หนังสือด่วนที่สุด ที่ นร ๐๕๐๓/๑๘๗๓๙ (29 ก.ค. 2568)
- **Homepage:** [Open Law Data Thailand](https://www.openlawdatathailand.org/)

## Usage Instruction

ท่านสามารถเลือกดาวน์โหลดข้อมูลได้หลายรูปแบบผ่าน Library `datasets` ของ Hugging Face โดยระบุชื่อ `name` ในพารามิเตอร์ (Config)

### 1. สำหรับงาน AI / NLP (แนะนำ) ⭐
หากต้องการข้อความ (Text) เพื่อนำไปเทรนโมเดล หรือทำ Search Engine ท่านสามารถเลือกโหลดข้อมูลแยกเป็น **"รายทศวรรษ"** (Decade Subsets) ได้ ซึ่งจะได้ทั้งไฟล์ OCR และ Metadata ควบคู่กัน


**ตัวอย่างการ Download สำหรับปี 2024**
```bash
hf download open-law-data-thailand/soc-ratchakitcha --repo-type dataset --include "meta/2024/*" --local-dir "downloads"
hf download open-law-data-thailand/soc-ratchakitcha --repo-type dataset --include "ocr/*/2024/*" --local-dir "downloads"
```

**ตัวอย่างการ Download สำหรับ 2020s (2020-2029)**
```bash
hf download open-law-data-thailand/soc-ratchakitcha --repo-type dataset --include "meta/202?/*" --local-dir "downloads"
hf download open-law-data-thailand/soc-ratchakitcha --repo-type dataset --include "ocr/*/202?/*" --local-dir "downloads"
```

### 2\. สำหรับการวิเคราะห์ข้อมูล

หากต้องการวิเคราะห์สถิติ เช่น จำนวนกฎหมายในแต่ละปี หรือค้นหาชื่อเรื่อง โดยไม่ต้องการเนื้อหา Text

**โหลดเฉพาะ Metadata ทั้งหมด** (`--include "meta/*/*"`; meta/year/year-month-files)
```bash
hf download open-law-data-thailand/soc-ratchakitcha --repo-type dataset --include "meta/*/*" --local-dir "downloads"
```

**โหลดเฉพาะ OCR ทั้งหมด** (`--include "ocr/*/*/*"`; ocr/engine/year/year-month-files)
```bash
hf download open-law-data-thailand/soc-ratchakitcha --repo-type dataset --include "ocr/*/*/*" --local-dir "downloads"
```


### 3\. สำหรับการดึงไฟล์ต้นฉบับ (PDF)

ชุดข้อมูลนี้จัดเก็บไฟล์ PDF แบบ **Hot/Cold Storage** เพื่อประสิทธิภาพ:

**`pdf`**: ไฟล์ PDF รายฉบับ **เฉพาะ 3 เดือนล่าสุด** (Hot Data) (`--include "pdf/*/*/*"`, pdf/year/year-month/files)
```bash
hf download open-law-data-thailand/soc-ratchakitcha --repo-type dataset --include "pdf/*/*/*" --local-dir "downloads"
```

**`zip`**: ไฟล์ PDF ย้อนหลังตั้งแต่ปี 1884 ที่ถูกบีบอัดเป็น **ZIP รายเดือน** (Cold Data) (`--include "zip/*/*"`, pdf/year/year-month-files)
```bash
hf download open-law-data-thailand/soc-ratchakitcha --repo-type dataset --include "zip/*/*" --local-dir "downloads"
```

## Data Fields

| Field Name | Description (TH) | Description (EN) |
| :--- | :--- | :--- |
| `no` | ลำดับที่เอกสาร | Document ID / Number |
| `doctitle` | ชื่อเรื่องหรือหัวข้อของเอกสาร | Title or topic of the document |
| `bookNo` | เล่มของราชกิจจานุเบกษา | Book number |
| `section` | ตอนของราชกิจจานุเบกษา | Section number |
| `category` | ประเภท (เช่น ก, ข, ง) | Category (e.g., A, B, D) |
| `publishDate` | วันที่ประกาศในราชกิจจานุเบกษา | Publication date |
| `pageNo` | หมายเลขหน้า | Page number |
| `pdf_file` | ชื่อไฟล์ PDF ต้นฉบับ | Filename of the source PDF |

## Legal & License

ข้อมูลนี้ได้รับการสนับสนุนจาก **สำนักเลขาธิการคณะรัฐมนตรี** ตามหนังสือตอบข้อหารือ "ด่วนที่สุด ที่ นร ๐๕๐๓/๑๘๗๓๙" ลงวันที่ 29 กรกฎาคม 2568 เพื่อประโยชน์สาธารณะและการพัฒนาเทคโนโลยีปัญญาประดิษฐ์ (AI)

**Disclaimer:** ข้อมูลนี้จัดทำขึ้นเพื่อความสะดวกในการเข้าถึงและวิเคราะห์ข้อมูลเท่านั้น การอ้างอิงทางกฎหมายอย่างเป็นทางการควรตรวจสอบกับต้นฉบับ PDF จากเว็บไซต์ [ratchakitcha.soc.go.th](https://ratchakitcha.soc.go.th/) โดยตรง

## Contact

  - **Project:** Open Law Data Thailand
  - **Website:** https://www.openlawdatathailand.org/