parquet-converter commited on
Commit
c4e3f0d
·
verified ·
1 Parent(s): 2ca19bc

Update parquet files

Browse files
README.md DELETED
@@ -1,259 +0,0 @@
1
- ---
2
- annotations_creators:
3
- - no-annotation
4
- language_creators:
5
- - found
6
- language:
7
- - ar
8
- - da
9
- - de
10
- - fi
11
- - fr
12
- - lb
13
- - nl
14
- - pt
15
- license:
16
- - cc0-1.0
17
- multilinguality:
18
- - multilingual
19
- pretty_name: BnL Historical Newspapers
20
- size_categories:
21
- - 100K<n<1M
22
- source_datasets:
23
- - original
24
- task_categories:
25
- - text-generation
26
- - fill-mask
27
- task_ids:
28
- - language-modeling
29
- - masked-language-modeling
30
- dataset_info:
31
- features:
32
- - name: id
33
- dtype: string
34
- - name: source
35
- dtype: string
36
- - name: url
37
- dtype: string
38
- - name: title
39
- dtype: string
40
- - name: ispartof
41
- dtype: string
42
- - name: text
43
- dtype: string
44
- - name: pub_date
45
- dtype: timestamp[s]
46
- - name: publisher
47
- dtype: string
48
- - name: language
49
- dtype: string
50
- - name: article_type
51
- dtype:
52
- class_label:
53
- names:
54
- 0: ADVERTISEMENT_SECTION
55
- 1: BIBLIOGRAPHY
56
- 2: CHAPTER
57
- 3: INDEX
58
- 4: CONTRIBUTION
59
- 5: TABLE_OF_CONTENTS
60
- 6: WEATHER
61
- 7: SHIPPING
62
- 8: SECTION
63
- 9: ARTICLE
64
- 10: TITLE_SECTION
65
- 11: DEATH_NOTICE
66
- 12: SUPPLEMENT
67
- 13: TABLE
68
- 14: ADVERTISEMENT
69
- 15: CHART_DIAGRAM
70
- 16: ILLUSTRATION
71
- 17: ISSUE
72
- - name: extent
73
- dtype: int32
74
- config_name: processed
75
- splits:
76
- - name: train
77
- num_bytes: 1611620156
78
- num_examples: 537558
79
- download_size: 1224029060
80
- dataset_size: 1611620156
81
- ---
82
-
83
- # Dataset Card for BnL Historical Newspapers
84
-
85
- ## Table of Contents
86
- - [Table of Contents](#table-of-contents)
87
- - [Dataset Description](#dataset-description)
88
- - [Dataset Summary](#dataset-summary)
89
- - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
90
- - [Languages](#languages)
91
- - [Dataset Structure](#dataset-structure)
92
- - [Data Instances](#data-instances)
93
- - [Data Fields](#data-fields)
94
- - [Data Splits](#data-splits)
95
- - [Dataset Creation](#dataset-creation)
96
- - [Curation Rationale](#curation-rationale)
97
- - [Source Data](#source-data)
98
- - [Annotations](#annotations)
99
- - [Personal and Sensitive Information](#personal-and-sensitive-information)
100
- - [Considerations for Using the Data](#considerations-for-using-the-data)
101
- - [Social Impact of Dataset](#social-impact-of-dataset)
102
- - [Discussion of Biases](#discussion-of-biases)
103
- - [Other Known Limitations](#other-known-limitations)
104
- - [Additional Information](#additional-information)
105
- - [Dataset Curators](#dataset-curators)
106
- - [Licensing Information](#licensing-information)
107
- - [Citation Information](#citation-information)
108
- - [Contributions](#contributions)
109
-
110
- ## Dataset Description
111
-
112
- - **Homepage:** https://data.bnl.lu/data/historical-newspapers/
113
- - **Repository:**
114
- - **Paper:**
115
- - **Leaderboard:**
116
- - **Point of Contact:** opendata@bnl.etat.lu
117
-
118
- ### Dataset Summary
119
-
120
- The BnL has digitised over 800.000 pages of Luxembourg newspapers. This dataset currently has one configuration covering a subset of these newspapers, which sit under the "Processed Datasets" collection. The BNL:
121
-
122
- > processed all newspapers and monographs that are in the public domain and extracted the full text and associated meta data of every single article, section, advertisement… The result is a large number of small, easy to use XML files formatted using Dublin Core.
123
-
124
- [More Information Needed]
125
-
126
- ### Supported Tasks and Leaderboards
127
-
128
- [More Information Needed]
129
-
130
- ### Languages
131
-
132
- [More Information Needed]
133
-
134
- ## Dataset Structure
135
-
136
- The dataset currently contains a single configuration.
137
-
138
- ### Data Instances
139
-
140
- An example instance from the datasets:
141
-
142
- ``` python
143
- {'id': 'https://persist.lu/ark:/70795/wx8r4c/articles/DTL47',
144
- 'article_type': 8,
145
- 'extent': 49,
146
- 'ispartof': 'Luxemburger Wort',
147
- 'pub_date': datetime.datetime(1853, 3, 23, 0, 0),
148
- 'publisher': 'Verl. der St-Paulus-Druckerei',
149
- 'source': 'newspaper/luxwort/1853-03-23',
150
- 'text': 'Asien. Eine neue Nedcrland-Post ist angekommen mil Nachrichten aus Calcutta bis zum 5. Febr.; Vom» vay, 12. Febr. ; Nangun und HongKong, 13. Jan. Die durch die letzte Post gebrachle Nachricht, der König von Ava sei durch seinen Bruder enlhronl worden, wird bestätigt. (K. Z.) Verantwortl. Herausgeber, F. Schümann.',
151
- 'title': 'Asien.',
152
- 'url': 'http://www.eluxemburgensia.lu/webclient/DeliveryManager?pid=209701#panel:pp|issue:209701|article:DTL47',
153
- 'language': 'de'
154
- }
155
- ```
156
-
157
-
158
- ### Data Fields
159
-
160
- - 'id': This is a unique and persistent identifier using ARK.
161
- - 'article_type': The type of the exported data, possible values ('ADVERTISEMENT_SECTION',
162
- 'BIBLIOGRAPHY',
163
- 'CHAPTER',
164
- 'INDEX',
165
- 'CONTRIBUTION',
166
- 'TABLE_OF_CONTENTS',
167
- 'WEATHER',
168
- 'SHIPPING',
169
- 'SECTION',
170
- 'ARTICLE',
171
- 'TITLE_SECTION',
172
- 'DEATH_NOTICE',
173
- 'SUPPLEMENT',
174
- 'TABLE',
175
- 'ADVERTISEMENT',
176
- 'CHART_DIAGRAM',
177
- 'ILLUSTRATION',
178
- 'ISSUE')
179
- - 'extent': The number of words in the text field
180
- - 'ispartof: The complete title of the source document e.g. “Luxemburger Wort”.
181
- - 'pub_date': The publishing date of the document e.g “1848-12-15���
182
- - 'publisher':The publisher of the document e.g. “Verl. der St-Paulus-Druckerei”.
183
- - 'source': Describes the source of the document. For example
184
- <dc:source>newspaper/luxwort/1848-12-15</dc:source> means that this article comes from the newspaper “luxwort” (ID for Luxemburger Wort) issued on 15.12.1848.
185
- - 'text': The full text of the entire article, section, advertisement etc. It includes any titles and subtitles as well. The content does not contain layout information, such as headings, paragraphs or lines.
186
- - 'title': The main title of the article, section, advertisement, etc.
187
- - 'url': The link to the BnLViewer on eluxemburgensia.lu to view the resource online.
188
- - 'language': The language of the text, possible values ('ar', 'da', 'de', 'fi', 'fr', 'lb', 'nl', 'pt')
189
-
190
- ### Data Splits
191
-
192
- This dataset contains a single split `train`.
193
-
194
- ## Dataset Creation
195
-
196
- ### Curation Rationale
197
-
198
- [More Information Needed]
199
-
200
- ### Source Data
201
-
202
- #### Initial Data Collection and Normalization
203
-
204
- [More Information Needed]
205
-
206
- #### Who are the source language producers?
207
-
208
- [More Information Needed]
209
-
210
- ### Annotations
211
-
212
- #### Annotation process
213
-
214
- [More Information Needed]
215
-
216
- #### Who are the annotators?
217
-
218
- [More Information Needed]
219
-
220
- ### Personal and Sensitive Information
221
-
222
- [More Information Needed]
223
-
224
- ## Considerations for Using the Data
225
-
226
- ### Social Impact of Dataset
227
-
228
- [More Information Needed]
229
-
230
- ### Discussion of Biases
231
-
232
- [More Information Needed]
233
-
234
- ### Other Known Limitations
235
-
236
- [More Information Needed]
237
-
238
- ## Additional Information
239
-
240
- ### Dataset Curators
241
-
242
- [More Information Needed]
243
-
244
- ### Licensing Information
245
-
246
- [More Information Needed]
247
-
248
- ### Citation Information
249
-
250
- ```
251
- @misc{bnl_newspapers,
252
- title={Historical Newspapers},
253
- url={https://data.bnl.lu/data/historical-newspapers/},
254
- author={ Bibliothèque nationale du Luxembourg},
255
- ```
256
-
257
- ### Contributions
258
-
259
- Thanks to [@davanstrien](https://github.com/davanstrien) for adding this dataset.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bnl_newspapers.py DELETED
@@ -1,183 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2021 The HuggingFace Datasets Authors and the current dataset script contributor.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- """Digitised historic newspapers from the BNL"""
16
-
17
- import os
18
- import xml.etree.ElementTree as ET
19
- from datetime import datetime
20
-
21
- import datasets
22
- from datasets.tasks import LanguageModeling
23
-
24
-
25
- _CITATION = """\
26
- @misc{bnl_newspapers,
27
- title={Historical Newspapers},
28
- url={https://data.bnl.lu/data/historical-newspapers/},
29
- author={ Bibliothèque nationale du Luxembourg},
30
- """
31
-
32
- _DESCRIPTION = """\
33
- Digitised historic newspapers from the Bibliothèque nationale (BnL) - the National Library of Luxembourg.
34
- """
35
-
36
- _HOMEPAGE = "https://data.bnl.lu/data/historical-newspapers/"
37
-
38
- _LICENSE = "CC0"
39
-
40
-
41
- _URLs = {"processed": "https://data.bnl.lu/open-data/digitization/newspapers/export01-newspapers1841-1878.zip"}
42
-
43
-
44
- class BNLNewspapersConfig(datasets.BuilderConfig):
45
- """Builder config for BNLNewspapers"""
46
-
47
- def __init__(self, data_url, citation, url, **kwargs):
48
- """
49
- Args:
50
- data_url: `string`, url to download the zip file from.
51
- citation: `string`, citation for the data set.
52
- url: `string`, url for information about the data set.
53
- **kwargs: keyword arguments forwarded to super.
54
- """
55
- super(BNLNewspapersConfig, self).__init__(version=datasets.Version("1.17.0"), **kwargs)
56
- self.data_url = data_url
57
- self.citation = citation
58
- self.url = url
59
-
60
-
61
- class BNLNewspapers(datasets.GeneratorBasedBuilder):
62
- """Historic newspapers from the BNL"""
63
-
64
- BUILDER_CONFIGS = [
65
- BNLNewspapersConfig(
66
- name="processed",
67
- description="""This dataset covers the 'processed newspapers' portion of the BnL newspapers.
68
- These newspapers cover 38 years of news (1841-1878) and include 510,505 extracted articles.
69
- """,
70
- data_url=_URLs["processed"],
71
- citation=_CITATION,
72
- url=_HOMEPAGE,
73
- ),
74
- ]
75
-
76
- DEFAULT_CONFIG_NAME = "processed"
77
-
78
- def _info(self):
79
- features = datasets.Features(
80
- {
81
- "id": datasets.Value("string"),
82
- "source": datasets.Value("string"),
83
- "url": datasets.Value("string"),
84
- "title": datasets.Value("string"),
85
- "ispartof": datasets.Value("string"),
86
- "text": datasets.Value("string"),
87
- "pub_date": datasets.Value("timestamp[s]"),
88
- "publisher": datasets.Value("string"),
89
- "language": datasets.Value("string"),
90
- "article_type": datasets.ClassLabel(
91
- names=[
92
- "ADVERTISEMENT_SECTION",
93
- "BIBLIOGRAPHY",
94
- "CHAPTER",
95
- "INDEX",
96
- "CONTRIBUTION",
97
- "TABLE_OF_CONTENTS",
98
- "WEATHER",
99
- "SHIPPING",
100
- "SECTION",
101
- "ARTICLE",
102
- "TITLE_SECTION",
103
- "DEATH_NOTICE",
104
- "SUPPLEMENT",
105
- "TABLE",
106
- "ADVERTISEMENT",
107
- "CHART_DIAGRAM",
108
- "ILLUSTRATION",
109
- "ISSUE",
110
- ]
111
- ),
112
- "extent": datasets.Value("int32"),
113
- }
114
- )
115
- return datasets.DatasetInfo(
116
- description=_DESCRIPTION,
117
- features=features,
118
- homepage=_HOMEPAGE,
119
- license=_LICENSE,
120
- citation=_CITATION,
121
- task_templates=[LanguageModeling(text_column="text")],
122
- )
123
-
124
- def _split_generators(self, dl_manager):
125
- _URL = self.config.data_url
126
- data_dir = dl_manager.download_and_extract(_URL)
127
- return [
128
- datasets.SplitGenerator(
129
- name=datasets.Split.TRAIN,
130
- gen_kwargs={
131
- "paths": dl_manager.iter_files([data_dir]),
132
- },
133
- ),
134
- ]
135
-
136
- def _generate_examples(self, paths):
137
- key = 0
138
- for path in paths:
139
- if os.path.basename(path).endswith(".xml"):
140
- data = parse_xml(path)
141
- yield key, data
142
- key += 1
143
-
144
-
145
- def parse_xml(path):
146
- ns = {
147
- "": "http://www.openarchives.org/OAI/2.0/",
148
- "xsi": "http://www.w3.org/2001/XMLSchema-instance",
149
- "oai_dc": "http://www.openarchives.org/OAI/2.0/oai_dc/",
150
- "dc": "http://purl.org/dc/elements/1.1/",
151
- "dcterms": "http://purl.org/dc/terms/",
152
- }
153
- tree = ET.parse(path)
154
- source = tree.find(".//dc:source", ns).text
155
- ark_id = tree.find(".//dc:identifier", ns).text
156
- ispartof = tree.find(".//dcterms:isPartOf", ns).text
157
- date = tree.find(".//dc:date", ns).text
158
- if date:
159
- date = datetime.strptime(date, "%Y-%m-%d")
160
- publisher = tree.find(".//dc:publisher", ns)
161
- if publisher is not None:
162
- publisher = publisher.text
163
- hasversion = tree.find(".//dcterms:hasVersion", ns).text
164
- description = tree.find(".//dc:description", ns).text
165
- title = tree.find(".//dc:title", ns).text
166
- article_type = tree.find(".//dc:type", ns).text
167
- extent = tree.find(".//dcterms:extent", ns).text
168
- language = tree.find(".//dc:language", ns)
169
- if language is not None:
170
- language = language.text
171
- return {
172
- "id": ark_id,
173
- "source": source,
174
- "url": hasversion,
175
- "title": title,
176
- "text": description,
177
- "pub_date": date,
178
- "publisher": publisher,
179
- "article_type": article_type,
180
- "extent": extent,
181
- "ispartof": ispartof,
182
- "language": language,
183
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"processed": {"description": "Digitised historic newspapers from the Biblioth\u00e8que nationale (BnL) - the National Library of Luxembourg.\n", "citation": "@misc{bnl_newspapers,\ntitle={Historical Newspapers},\nurl={https://data.bnl.lu/data/historical-newspapers/},\nauthor={ Biblioth\u00e8que nationale du Luxembourg},\n", "homepage": "https://data.bnl.lu/data/historical-newspapers/", "license": "CC0", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "url": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "ispartof": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "pub_date": {"dtype": "timestamp[s]", "id": null, "_type": "Value"}, "publisher": {"dtype": "string", "id": null, "_type": "Value"}, "language": {"dtype": "string", "id": null, "_type": "Value"}, "article_type": {"num_classes": 18, "names": ["ADVERTISEMENT_SECTION", "BIBLIOGRAPHY", "CHAPTER", "INDEX", "CONTRIBUTION", "TABLE_OF_CONTENTS", "WEATHER", "SHIPPING", "SECTION", "ARTICLE", "TITLE_SECTION", "DEATH_NOTICE", "SUPPLEMENT", "TABLE", "ADVERTISEMENT", "CHART_DIAGRAM", "ILLUSTRATION", "ISSUE"], "names_file": null, "id": null, "_type": "ClassLabel"}, "extent": {"dtype": "int32", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": [{"task": "language-modeling", "text_column": "text"}], "builder_name": "bnl_newspapers", "config_name": "processed", "version": {"version_str": "1.17.0", "description": null, "major": 1, "minor": 17, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1611620156, "num_examples": 537558, "dataset_name": "bnl_newspapers"}}, "download_checksums": {"https://data.bnl.lu/open-data/digitization/newspapers/export01-newspapers1841-1878.zip": {"num_bytes": 1224029060, "checksum": "72032d30d93eb367c567651db970bdb6f645fa6377b2d6a2453d30cf870df946"}}, "download_size": 1224029060, "post_processing_size": null, "dataset_size": 1611620156, "size_in_bytes": 2835649216}}
 
 
processed/train/0000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24f4b6b59284f334268cd35bb4dcf0c24a569f20368a4f2addea32092aeefa13
3
+ size 258201852
processed/train/0001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec530099cea0d255cdfe968c2bf72686a24130824ad5849f63bea634ba3d83fc
3
+ size 260525746
processed/train/0002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c81a729be9c75a86368dda2a3770e05ec21ed453a49a2ae329824272db4e85bc
3
+ size 258528289
processed/train/0003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5eeac8a900ec0f08b749f9817ec6464e48a2d2192d94afd551d3c2fe3157636
3
+ size 256201369