File size: 4,491 Bytes
9c57079
667f30c
 
 
 
 
 
 
9c57079
 
 
 
 
 
667f30c
 
9c57079
 
 
 
667f30c
9c57079
667f30c
 
9c57079
 
 
 
 
 
45bca85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3fb244c
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
---
language:
- th
license: cc0-1.0
size_categories:
- 10K<n<100K
task_categories:
- text-generation
dataset_info:
  features:
  - name: title
    dtype: string
  - name: context
    dtype: string
  - name: raw
    dtype: string
  - name: url
    dtype: string
  splits:
  - name: train
    num_bytes: 517445225
    num_examples: 28555
  download_size: 173349955
  dataset_size: 517445225
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---

# ThaiGov corpus

GitHub: [https://github.com/PyThaiNLP/thaigov-corpus](https://github.com/PyThaiNLP/thaigov-corpus)

## English
- Data from Thai government website. https://www.thaigov.go.th
- This part of PyThaiNLP Project.
- Compiled by Mr.Wannaphong Phatthiyaphaibun
- License Dataset is public domain.

## Data format

- 1 file, 1 news, which is extracted from 1 url.

```
topic
(Blank line)
content
content
content
content
content
(Blank line)
ที่มา (URL source) : http://www.thaigov.go.th/news/contents/details/NNN
```

## Thai
- เป็นข้อมูลที่รวบรวมข่าวสารจากเว็บไซต์รัฐบาลไทย https://www.thaigov.go.th
- โครงการนี้เป็นส่วนหนึ่งในแผนพัฒนา [PyThaiNLP](https://github.com/PyThaiNLP/)
- รวบรวมโดย นาย วรรณพงษ์  ภัททิยไพบูลย์
- ข้อมูลที่รวบรวมในคลังข้อความนี้เป็นสาธารณสมบัติ (public domain) ตามพ.ร.บ.ลิขสิทธิ์ พ.ศ. 2537 มาตรา 7 (สิ่งต่อไปนี้ไม่ถือว่าเป็นงานอันมีลิขสิทธิ์ตามพระราชบัญญัตินี้ (1) ข่าวประจำวัน และข้อเท็จจริงต่างๆ ที่มีลักษณะเป็นเพียงข่าวสารอันมิใช่งานในแผนกวรรณคดี แผนกวิทยาศาสตร์ หรือแผนกศิลปะ [...] (3) ระเบียบ ข้อบังคับ ประกาศ คำสั่ง คำชี้แจง และหนังสือตอบโต้ของกระทรวง ทบวง กรม หรือหน่วยงานอื่นใดของรัฐหรือของท้องถิ่น [...])

**สามารถติดตามประวัติการแก้ไขคลังข้อความนี้ได้ผ่านระบบ Git**

### จำนวนข่าว

- วันเริ่มต้นโครงการ 14 ก.พ. 2561
- รวบรวมครั้งล่าสุด 01.50 น. วันที่ 18 มีนาคม พ.ศ.2563

### รูปแบบข้อมูล

- 1 ไฟล์ 1 ข่าว ซึ่งดึงมาจาก 1 url

```
หัวเรื่อง
(บรรทัดว่าง)
เนื้อความ
เนื้อความ
เนื้อความ
เนื้อความ
เนื้อความ
(บรรทัดว่าง)
ที่มา : http://www.thaigov.go.th/news/contents/details/NNN
```

### รายละเอียดชื่อไฟล์

- ชื่อหมวดหมู่_จำนวนที่ของข่าว.txt
- มีโฟลเดอร์ 1 - 24 (ไม่มีโฟลเดอร์ที่ 13)

### Script

- run.py สำหรับเก็บข้อมูลจากหน้าเว็บ โดยจะดึงหน้าเว็บจาก url ```http://www.thaigov.go.th/news/contents/details/NNN``` โดยที่ NNN คือเลขจำนวนเต็ม
    - เปลี่ยนค่าตัวแปร i ในไฟล์เป็นเลขที่ต้องการเริ่มเก็บ
- clean.py สำหรับทำความสะอาดข้อมูลเบื้องต้น โดยจะลบช่องว่างหน้าและท้ายบรรทัด ลบบรรทัดว่าง
    - ```clean.py ชื่อไฟล์```
    - ```clean.py ชื่อไฟล์1 ชื่อไฟล์2```
    - ```clean.py *.txt```



We build Thai NLP.

PyThaiNLP