Malaysia-textbook-cleaned
收藏资源简介:
该数据集是马来西亚教育部(KPM)出版的KSSR和KSSM教材的清洗版文本。原始数据来自Scicom-intl/Malaysia-Textbook,该数据集将PDF格式的教材通过Qwen3-235B-A22B-Instruct-2507模型转换为文本,涵盖马来语、中文、英语、泰米尔语和阿拉伯语/爪夷文科目。清洗过程移除了CamScanner水印、借书承诺表(Saya Berjanji)、页脚(包括页码、出版社标记、课程标准代码、InDesign导出痕迹等)、重复行以及纯模板页面(如Rukun Negara国家原则页、封面/版权页、标题页、学校所有权印章等)。最终数据集包含25,368个页面(行),来自142本教材,内容总字节数约33.4MB。每条记录包含三个字段:page(页面编号)、content(清洗后的页面文本)、book(教材标题)。该数据集适用于文本生成任务,如教育文本分析与语言模型训练。
This dataset is a cleaned version of the KSSR and KSSM textbooks published by the Ministry of Education Malaysia (KPM). The original data comes from Scicom-intl/Malaysia-Textbook, where PDF textbooks were converted to text using the Qwen3-235B-A22B-Instruct-2507 model, covering subjects in Malay, Chinese, English, Tamil, and Arabic/Jawi. The cleaning process removed CamScanner watermarks, book borrowing pledge forms (Saya Berjanji), footers (including page numbers, publisher marks, curriculum standard codes, InDesign export traces, etc.), duplicate lines, and purely template pages (such as Rukun Negara pages, cover/copyright pages, title pages, school ownership stamps, etc.). The final dataset contains 25,368 pages (rows) from 142 textbooks, with a total content size of approximately 33.4 MB. Each record includes three fields: page (page number), content (cleaned page text), and book (textbook title). This dataset is suitable for text generation tasks such as educational text analysis and language model training.
数据集概述:Malaysia-textbook-cleaned
基本信息
- 数据集名称:Malaysia-textbook-cleaned
- 维护者:Kureiwa
- 许可证:其他(归属马来西亚教育部)
- 语言:马来语(ms)、中文(zh)、英语(en)、阿拉伯语(ar)、泰米尔语(ta)
- 任务类别:文本生成(text-generation)
- 数据集来源:由 Scicom-intl/Malaysia-Textbook 清洗而来,源数据集收集了马来西亚KSSR和KSSM教材的PDF并利用 Qwen/Qwen3-235B-A22B-Instruct-2507 转换为文本。
数据规模
| 指标 | 数值 |
|---|---|
| 保留行数 | 25,368 |
| 删除行数(模板内容) | 279 |
| 教材数量 | 142 |
| 内容大小 | 33,402,678 字节 |
| Parquet 文件(zstd压缩) | 10,921,845 字节 |
字段结构
| 字段 | 类型 | 描述 |
|---|---|---|
page |
int64 | 源教材中的页码 |
content |
string | 清洗后的页面文本 |
book |
string | 源教材标题(共142个唯一值) |
清洗流程
数据集通过 scripts/clean.py 脚本进行清洗,主要包括以下步骤:
- CamScanner水印移除:删除“Scanned (with|by) CamScanner”及之后的全部内容。
- 教材贷款计划承诺书移除:删除固定的“SAYA BERJANJI akan menjaga buku ini ...”模板文本块及其后全部内容。
- 页脚/印刷前行移除:删除纯页脚内容的行,包括四类数字系统(ASCII、阿拉伯-印度数字、爪夷文、泰米尔文)的页码、出版商标记(KPM或泰米尔文标记)、课程标准代码(如
5.2.3、B1S815)、InDesign/PDF导出痕迹(.indb/.indd文件名和打印时间戳)以及阿拉伯/爪夷文页码页脚。 - 页内重复折叠:将连续≥3行完全相同的内容折叠为一行。
- 尾部页脚清理:从尾部向前删除纯页脚内容。
- 空白整理:去除行尾空格、合并空行、修剪首尾空白。
此外,纯为模板内容且无课程内容的整页被删除,包括国家原则(Rukun Negara)页面、封面/版权页、扉页、学校所有权印章声明页等。
使用方式
python from datasets import load_dataset
ds = load_dataset("Kureiwa/Malaysia-textbook-cleaned", split="train")
数据划分
数据集中包含一个 train 划分,包含 25,368 条样本,占用 33,402,678 字节。
许可说明
教材由马来西亚教育部(KPM)出版,重用前请检查源PDF的许可条款。





