Datasets:

Modalities:
Text
Formats:
json
ArXiv:
Libraries:
Datasets
pandas
License:
wanng commited on
Commit
7f361be
1 Parent(s): 6704e3f

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +182 -95
README.md CHANGED
@@ -5,18 +5,18 @@ language:
5
  - zh
6
  ---
7
 
8
- # PIN-10M
9
 
10
  A mini version of "PIN: A Knowledge-Intensive Dataset for Paired and Interleaved Multimodal Documents"
11
 
12
- This dataset contains 10M samples with PIN format.
13
 
14
  <img src="assets/intro.png">
15
 
16
 
17
  ## 0 Usage
18
 
19
- 解压缩
20
 
21
  ```bash
22
  cat data.tar.part* > data.tar
@@ -25,35 +25,45 @@ tar -xvf data.tar
25
 
26
  ## 1 Dataset statistics
27
 
28
- Total: 9,755,961
 
 
 
 
 
 
 
 
 
 
29
 
30
- chinese markdown: 168, 323
31
 
32
- DocLayNet: 68, 757
33
 
34
- leetcode: 2, 360
35
 
36
- linux-cn: 9, 564
37
 
38
- pg19: 2, 612, 906
39
 
40
- OBELICS: 4, 315, 776
41
 
42
- mmc4-core-ff: 2, 578, 275
43
 
44
- ## 2 Data Structure
45
 
46
- ### 2.1 Folder Structure
47
 
48
  ```
49
  example_dataset/
50
 
51
- ├── content_image/ - 包含内容里面的图片。
52
- ├── overall_image/ - 包含每一个多模态文档的整体概览的图片。
53
- └── example_dataset.jsonl - 包含数据集元数据的JSON Lines文件。
54
  ```
55
 
56
- 值得注意的是,单个文件夹下的文件数量最好不要超过 100,000个(10万)。假如是分part的话,我们可以考虑多个文件夹,如下:
57
 
58
  ```
59
  example_dataset/
@@ -61,74 +71,21 @@ example_dataset/
61
  ├── part00/
62
  │ ├── content_image/
63
  │ ├── overall_image/
64
- │ └── part00.jsonl - 包含第一部分数据集元数据的JSON Lines文件。
65
 
66
- ├── part01/ - 数据集的第二部分,结构与part00相同。
67
  │ ├── content_image/
68
  │ ├── overall_image/
69
  │ └── part01.jsonl
70
 
71
- ... - 更多类似的部分。
72
  ```
73
 
74
- ### 2.2 JSON Lines Format
75
-
76
- 该名称我们可以根据情况不同而进行讨论确定。不过我个人倾向于与父文件夹保持一致。
77
 
78
- 其中一条数据:
79
 
80
- 该名称我们可以根据情况不同而进行讨论确定。不过我个人倾向于与父文件夹保持一致。
81
-
82
- 其中一条数据:
83
-
84
- ```
85
- {
86
- "id": 0,
87
- "meta": {
88
- "language": "en",
89
- "doc_id": "NYSE_F_2004.pdf",
90
- "oi_exist": true,
91
- "ori_meta": null,
92
- "date_download": "2024-03-16",
93
- "source_dataset": "DocLayNet",
94
- "page_id": "72"
95
- },
96
- "quality_signals": null,
97
- "license": "https://cdla.io/permissive-1-0/",
98
- "overall_image": "overall_image/c6effb847ae7e4a80431696984fa90c98bb08c266481b9a03842422459c43bdd.png",
99
- "md": "markdown file"
100
- "content_image": [
101
- "content_image/13.jpg",
102
- "content_image/14.jpg"
103
- ]
104
- }
105
- ```
106
-
107
- 解释:
108
-
109
- - id: 每一个条数据的唯一id。
110
- - meta: 每条数据(多模态文档)的meta信息。
111
- + language: 语言,中文(zh),英文(en)等。
112
- + source_dataset: 假如该文档是转换而来的,则在此标注出原始的数据集名称,如不是则为None。
113
- + doc_id: 一个唯一的document id,标识该文档的名称信息等。
114
- + page_id: 一个唯一的page id,标识该文档所在页码位置。如只有一个页码,那就为None,只有多文档的时候才会有page_id,一般从1开始。
115
- + date_download: date (download), 下载日期。
116
- + ori_meta: 原始的数据集也许会包含meta信息,所以在此保留了,假如无则为None。
117
- + oi_exist: 是否存在overall image。True or False。假如是True,则意味着overall image来自于数据集本身,假如为False则是通过我们的代码的编译结果。
118
- + ...
119
- - quality_signals: 质量信号,参考了redpajama v2的设计。
120
- + doc_length: 文档长度。
121
- + ...
122
- - content_image: 存放该文档内提到的images的列表,如无则为None。有的话,[image1, image2, image3, ...]。
123
- - overall_image: 存放对应的overall image的路径。
124
- - md:存放markdown内容本身。
125
- - license:存放license。
126
-
127
- ### 2.3 content_image 文件夹
128
-
129
- 存放各个文档里面用到的图片。
130
-
131
- 注:需要全部都转换成png格式。文件名只要是文件夹内唯一即可。
132
 
133
  ```
134
  content_image/
@@ -138,11 +95,11 @@ content_image/
138
  ...
139
  ```
140
 
141
- ### 2.4 overall_image 文件夹
142
 
143
- 存放各个文档对应的overall图片。
144
 
145
- 注:需要全部都转换成png格式。文件名只要是文件夹内唯一即可。
146
 
147
  ```
148
  overall_image/
@@ -152,18 +109,80 @@ overall_image/
152
  ...
153
  ```
154
 
155
- ### 2.5 Examples of jsonl files
156
 
157
- 考虑到文章的长度有限,所以我们特地选择了比较短的markdown文件的样例。
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
159
- An example of DocLynet:
160
  ```json
161
  {
162
  "id": 0,
163
  "meta": {
164
  "language": "en",
165
  "oi_exist": true,
166
- "source_dateset": "DocLayNet",
 
167
  "ori_meta": null,
168
  "doc_id": "NYSE_F_2004.pdf",
169
  "page_id": "0",
@@ -179,14 +198,16 @@ An example of DocLynet:
179
  }
180
  ```
181
 
182
- An example of OBELICS:
 
183
  ```json
184
  {
185
  "id": 466502,
186
  "meta": {
187
  "language": "en",
188
  "oi_exist": true,
189
- "source_dateset": "OBELICS",
 
190
  "ori_meta": {
191
  "document_url": "https://www.donegaldaily.com/2022/02/21/watch-incredible-storm-surge-at-portsalon-golf-club/",
192
  "unformatted_src": "https://www.donegaldaily.com/wp-content/uploads/2022/02/Screenshot-2022-02-21-at-17.54.30.jpg",
@@ -218,7 +239,7 @@ An example of OBELICS:
218
  }
219
  ```
220
 
221
- An example of chinese-markdown:
222
 
223
  ```json
224
  {
@@ -226,7 +247,8 @@ An example of chinese-markdown:
226
  "meta": {
227
  "language": "zh",
228
  "oi_exist": true,
229
- "source_dateset": "chinese-markdown",
 
230
  "ori_meta": null,
231
  "doc_id": 7,
232
  "page_id": null,
@@ -242,7 +264,7 @@ An example of chinese-markdown:
242
  }
243
  ```
244
 
245
- An example of leetcode:
246
 
247
  ```json
248
  {
@@ -252,6 +274,7 @@ An example of leetcode:
252
  "doc_id": 1,
253
  "page_id": null,
254
  "oi_exist": true,
 
255
  "source_dataset": "leetcode",
256
  "date_download": "2024-05-05",
257
  "ori_meta": {
@@ -267,7 +290,7 @@ An example of leetcode:
267
  }
268
  ```
269
 
270
- An example of linux-cn:
271
 
272
  ```json
273
  {
@@ -277,6 +300,7 @@ An example of linux-cn:
277
  "doc_id": 134,
278
  "page_id": null,
279
  "oi_exist": true,
 
280
  "source_dataset": "linux-cn",
281
  "date_download": "2024-05-06",
282
  "ori_meta": {
@@ -331,16 +355,17 @@ An example of linux-cn:
331
  }
332
  ```
333
 
334
- An example of mmc-core-ff:
335
 
336
  ```json
337
  {
338
  "meta": {
339
  "language": "en",
340
  "oi_exist": true,
 
341
  "doc_id": 11,
342
  "page_id": 0,
343
- "source_dateset": "mmc4-core-ff",
344
  "source_jsonl": "mmc4-core-ff/docs_no_face_shard_10375_v3.jsonl",
345
  "ori_meta": {
346
  "url": "http://position-light.blogspot.com/2015/06/whats-up-with-reading-and-northern.html",
@@ -466,11 +491,73 @@ An example of mmc-core-ff:
466
  }
467
  ```
468
 
469
- TODO
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
470
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
 
472
- ## License
473
 
474
- 混合License
475
 
476
- 如,该数据来自我们的工作,请遵循Apache 2.0 License。如,该数据来自第三方,请遵循该第三方的License。
 
5
  - zh
6
  ---
7
 
8
+ # PIN-14M
9
 
10
  A mini version of "PIN: A Knowledge-Intensive Dataset for Paired and Interleaved Multimodal Documents"
11
 
12
+ This dataset contains 14M samples with PIN format.
13
 
14
  <img src="assets/intro.png">
15
 
16
 
17
  ## 0 Usage
18
 
19
+ Decompression
20
 
21
  ```bash
22
  cat data.tar.part* > data.tar
 
25
 
26
  ## 1 Dataset statistics
27
 
28
+ | Subsect | Documents (#) | Overall images (#) | Content images (#) | Documents (GB) | Overall images (GB) | Content images (GB) |
29
+ |-----------------|-----------|----------------|----------------|---------------------|--------------------------|--------------------------|
30
+ | pg19 | 2,612,285 | 2,608,029 | 0 | 12.3 | 1,418.1 | 0.0 |
31
+ | OBELICS | 5,795,198 | 5,770,432 | 5,840,658 | 13.0 | 3,141.4 | 3,305.3 |
32
+ | mmc4-core-ff | 5,351,628 | 5,277,983 | 9,014,579 | 33.7 | 3,232.0 | 5,605.0 |
33
+ | chinese-markdown| 168,323 | 167,989 | 106,768 | 1.3 | 773.2 | 15.0 |
34
+ | leetcode | 2,360 | 2,360 | 0 | 0.016 | 1.3 | 0.0 |
35
+ | linux-cn | 9,564 | 9,564 | 38,960 | 0.082 | 11.9 | 1.8 |
36
+ | DocLayNet | 68,757 | 69,375 | 90,259 | 0.18 | 25.9 | 1.6 |
37
+ | PIN-PMC | 99,157 | 1,074,799 | 454,482 | 2.8 | 724.2 | 29.5 |
38
+ | **Total** | 14,107,272| 14,980,531 | 15,545,706 | 63.4 | 9,328.0 | 8,958.3 |
39
 
40
+ Storage space statistics may have some error, so these values are for reference only.
41
 
42
+ ## 2 Data Structure
43
 
44
+ ### 2.1 Subsets
45
 
46
+ We process 8 subsets, including PIN-PMC, DocLayNet, Linux-CN, chinese-markdown, OBELICS, MMC4, leetcode, and PG19.
47
 
48
+ <img src="assets/dataset-example.png">
49
 
50
+ Note: We do not release the PIN-arXiv subset in the preview version.
51
 
52
+ ### 2.2 Folder Structure
53
 
54
+ The directory `content images` holds the images mentioned within the markdown text, and `overall images` display the overall visual representation of the markdown files. Moreover, the `JSONL` file encapsulate the textual content along with associated data details.
55
 
56
+ An example subset:
57
 
58
  ```
59
  example_dataset/
60
 
61
+ ├── content_image/
62
+ ├── overall_image/
63
+ └── example_dataset.jsonl
64
  ```
65
 
66
+ A subset with multiple parts:
67
 
68
  ```
69
  example_dataset/
 
71
  ├── part00/
72
  │ ├── content_image/
73
  │ ├── overall_image/
74
+ │ └── part00.jsonl
75
 
76
+ ├── part01/
77
  │ ├── content_image/
78
  │ ├── overall_image/
79
  │ └── part01.jsonl
80
 
81
+ ... - More similar parts
82
  ```
83
 
84
+ ### 2.3 content_image Folder
 
 
85
 
86
+ This folder contains all the content images used in the markdown files.
87
 
88
+ Note: All images need to be converted to PNG format. The filename should be unique within the folder.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
 
90
  ```
91
  content_image/
 
95
  ...
96
  ```
97
 
98
+ ### 2.4 overall_image Folder
99
 
100
+ This folder contains all the overall images for each sample.
101
 
102
+ Note: All images need to be converted to PNG format. The filename should be unique within the folder.
103
 
104
  ```
105
  overall_image/
 
109
  ...
110
  ```
111
 
112
+ #### 2.5 JSON Lines Format
113
 
114
+ we provide a detailed example of the annotations included with each data entry.
115
+
116
+ ```
117
+ {
118
+ "id": 1919,
119
+ "meta": {
120
+ "language": "en",
121
+ "oi_exist": true,
122
+ "oi_source": "compiling",
123
+ "source_dataset": "example_source (e.g. OBELICS)",
124
+ "ori_meta": {
125
+ "document_url": "https://www.example.com/2022/02/21/example/",
126
+ ...
127
+ }
128
+ },
129
+ "doc_id": 1997,
130
+ "page_id": 0,
131
+ "date_download": "2024-03-01"
132
+ },
133
+ "license": "CC-BY-4.0",
134
+ "quality_signals": {
135
+ "doc_length": 100,
136
+ ...
137
+ },
138
+ "content_image": [
139
+ "content_image/1997-0.png",
140
+ "content_image/1997-1.png"
141
+ ],
142
+ "md": "<img src='content_image/1997-0.png'>\n\nThis is a fake sample data line, just for show.\n\nThis is a fake sample data line, just for show.\n\n<img src='content_image/1997-1.png'>\n\nThis is a fake sample data line, just for show.",
143
+ "overall_image": "overall_image/1997.png"
144
+ }
145
+ ```
146
+
147
+ Field Descriptions:
148
+
149
+ **Field Descriptions:**
150
+
151
+ - **id**: Unique identifier for each entry.
152
+ - **meta**: Metadata for each multimodal document entry.
153
+ - **language**: The document's language, such as Chinese (zh) or English (en).
154
+ - **source_dataset**: If the document is converted from another dataset, the original dataset name is noted here; otherwise, it is None.
155
+ - **doc_id**: A unique document identifier providing name and other details.
156
+ - **page_id**: A unique page identifier indicating the document's page number. If there is only one page, this is None. Page IDs are usually numbered starting from 1 in multi-page documents.
157
+ - **date_download**: date (download), the date the document was downloaded.
158
+ - **ori_meta**: Original metadata from the dataset, if available; otherwise, None.
159
+ - **oi_exist**: Indicates whether an overall image exists. True or False.
160
+ - **oi_source**: Source of the overall image; 'ori' for images taken from the original dataset and 'compiling' for images generated through code compilation. If this tag is missing, the image is likely compiled.
161
+ - ...
162
+ - **quality_signals**: Quality indicators inspired by the design of redpajama v2.
163
+ - **doc_length**: Length of the document.
164
+ - ...
165
+ - **content_image**: List of images mentioned in the document; None if no images are present.
166
+ - **overall_image**: Path to the corresponding overall image. (A list or a single path)
167
+ - **md**: Contains the markdown content.
168
+ - **license**: License information for the current sample.
169
+
170
+ ## 3 Examples of jsonl files
171
+
172
+ We selected samples consisting of short markdown documents.
173
+
174
+ ### 3.1 An example of DocLynet
175
+
176
+ Notably, the dataset's overall images are converted from the original dataset's PDFs into PNG format.
177
 
 
178
  ```json
179
  {
180
  "id": 0,
181
  "meta": {
182
  "language": "en",
183
  "oi_exist": true,
184
+ "oi_source": "ori",
185
+ "source_dataset": "DocLayNet",
186
  "ori_meta": null,
187
  "doc_id": "NYSE_F_2004.pdf",
188
  "page_id": "0",
 
198
  }
199
  ```
200
 
201
+ ### 3.2 An example of OBELICS
202
+
203
  ```json
204
  {
205
  "id": 466502,
206
  "meta": {
207
  "language": "en",
208
  "oi_exist": true,
209
+ "oi_source": "compiling",
210
+ "source_dataset": "OBELICS",
211
  "ori_meta": {
212
  "document_url": "https://www.donegaldaily.com/2022/02/21/watch-incredible-storm-surge-at-portsalon-golf-club/",
213
  "unformatted_src": "https://www.donegaldaily.com/wp-content/uploads/2022/02/Screenshot-2022-02-21-at-17.54.30.jpg",
 
239
  }
240
  ```
241
 
242
+ ### 3.3 An example of chinese-markdown
243
 
244
  ```json
245
  {
 
247
  "meta": {
248
  "language": "zh",
249
  "oi_exist": true,
250
+ "oi_source": "compiling",
251
+ "source_dataset": "chinese-markdown",
252
  "ori_meta": null,
253
  "doc_id": 7,
254
  "page_id": null,
 
264
  }
265
  ```
266
 
267
+ ### 3.4 An example of leetcode
268
 
269
  ```json
270
  {
 
274
  "doc_id": 1,
275
  "page_id": null,
276
  "oi_exist": true,
277
+ "oi_source": "compiling",
278
  "source_dataset": "leetcode",
279
  "date_download": "2024-05-05",
280
  "ori_meta": {
 
290
  }
291
  ```
292
 
293
+ ### 3.5 An example of linux-cn
294
 
295
  ```json
296
  {
 
300
  "doc_id": 134,
301
  "page_id": null,
302
  "oi_exist": true,
303
+ "oi_source": "compiling",
304
  "source_dataset": "linux-cn",
305
  "date_download": "2024-05-06",
306
  "ori_meta": {
 
355
  }
356
  ```
357
 
358
+ ### 3.6 An example of mmc-core-ff
359
 
360
  ```json
361
  {
362
  "meta": {
363
  "language": "en",
364
  "oi_exist": true,
365
+ "oi_source": "compiling",
366
  "doc_id": 11,
367
  "page_id": 0,
368
+ "source_dataset": "mmc4-core-ff",
369
  "source_jsonl": "mmc4-core-ff/docs_no_face_shard_10375_v3.jsonl",
370
  "ori_meta": {
371
  "url": "http://position-light.blogspot.com/2015/06/whats-up-with-reading-and-northern.html",
 
491
  }
492
  ```
493
 
494
+ ### 3.7 An example of PG19
495
+
496
+ ```json
497
+ {
498
+ "meta": {
499
+ "language": "en",
500
+ "oi_exist": true,
501
+ "oi_source": "compiling",
502
+ "doc_id": 871,
503
+ "page_id": 0,
504
+ "source_dataset": "pg19",
505
+ "split": "train",
506
+ "ori_meta": {
507
+ "url": "http://www.gutenberg.org/ebooks/9304",
508
+ "short_book_title": "Initiation into Philosophy by Emile Faguet",
509
+ "publication_date": 1914
510
+ },
511
+ "date_download": "2024-05-10"
512
+ },
513
+ "md": "# Initiation into Philosophy by Emile Faguet \n\n Produced by Ted Garvin, Thomas Hutchinson and PG Distributed Proofreaders \n\n \n\n \n\n \n\n \n\n INITIATION INTO PHILOSOPHY \n\n \nBy Emile Faguet \n\n Of the French Academy \n\n \nAuthor of \"The Cult Of Incompetence,\" \"Initiation Into Literature,\" etc. \n\n \nTranslated from the French by Sir Homer Gordon, Bart. \n\n 1914 \n\n \n\n \nPREFACE \n\n This volume, as indicated by the title, is designed to show the way to the beginner, to satisfy and more espec ially to excite his initial curiosity. It affords an adequate idea of the march of facts and of ideas. The rea der is led, somewhat rapidly, from the remote origins to the most recent efforts of the human mind. \n\n It should be a convenient repertory to which the mind may revert in order to see broadly the general opinion o f an epoch--and what connected it with those that followed or preceded it. It aims above all at being _a frame _ in which can conveniently be inscribed, in the course of further studies, new conceptions more detailed and more thoroughly examined. \n\n It will have fulfilled its design should it incite to research and meditation, and if it prepares for them cor rectly. \n\n E. FAGUET. \n\n \n\n \nCONTENTS \n\n \nPART I ANTIQUITY \n\n \nCHAPTER I BEFORE SOCRATES \n\n Philosophical Interpreters of the Universe, of the Creation and Constitution of the World. \n\n \nCHAPTER II THE SOPHISTS \n\n Logicians and Professors of Logic, and of the Analysis of Ideas, and of Discussion. \n\n \nCHAPTER III SOCRATES \n\n Philosophy Entirely Reduced to Morality, and Morality Considered as the End of all Intellectual Activity. \n\n \nCHAPTER IV PLATO \n\n Plato, like Socrates, is Pre-eminently a Moralist, but he Reverts to General Consideration of the Universe, an d Deals with Politics and Legislation. \n\n \nCHAPTER V ARISTOTLE",
514
+ "license": "Apache 2.0",
515
+ "quality_signals": null,
516
+ "content_image": null,
517
+ "overall_image": "overall_image/871-0.png"
518
+ }
519
+ ```
520
+
521
+ ### 3.8 An example of PIN-PMC
522
 
523
+ ```json
524
+ {
525
+ "meta": {
526
+ "language": "en",
527
+ "doc_id": "PMC3015258",
528
+ "oi_exist": true,
529
+ "oi_source": "ori",
530
+ "source_dataset": "PIN-PMC",
531
+ "ori_meta": null,
532
+ "page_id": null,
533
+ "date_download": "2024-05-28"
534
+ },
535
+ "md": "# A Simple Stereoscopic Endoscope\n\n## Abstract\n\nA very simple method is described for producing and viewing stereoscopic endoscopic images.\nThe addition of two simple prisms to the end of a conventional television-monitored endoscope with a simple viewing device produces a stereoscopic endoscope which appears to be suitable for surgical use......",
536
+ "license": [
537
+ "https://www.ncbi.nlm.nih.gov/pmc/tools/textmining/"
538
+ ],
539
+ "quality_signals": {
540
+ "doc_length": 8269
541
+ },
542
+ "content_image": [
543
+ "content_image/PMC3015258/jsls-2-1-67-g03.jpg",
544
+ "content_image/PMC3015258/jsls-2-1-67-g04.jpg",
545
+ "content_image/PMC3015258/jsls-2-1-67-g01.jpg",
546
+ "content_image/PMC3015258/jsls-2-1-67-g02.jpg",
547
+ "content_image/PMC3015258/jsls-2-1-67-g05.jpg"
548
+ ],
549
+ "overall_image": [
550
+ "overall_image/PMC3015258/jsls-2-1-67_3.png",
551
+ "overall_image/PMC3015258/jsls-2-1-67_0.png",
552
+ "overall_image/PMC3015258/jsls-2-1-67_1.png",
553
+ "overall_image/PMC3015258/jsls-2-1-67_2.png"
554
+ ],
555
+ "id": 60827
556
+ }
557
+ ```
558
 
559
+ ## 4 License
560
 
561
+ For data generated or produced by us, please adhere to the Apache 2.0 License.
562
 
563
+ For data sourced from third parties, compliance with the respective third-party licenses is required.