parquet-converter commited on
Commit
7708894
·
1 Parent(s): 4458e86

Update parquet files

Browse files
.gitattributes DELETED
@@ -1,27 +0,0 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bin.* filter=lfs diff=lfs merge=lfs -text
5
- *.bz2 filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.model filter=lfs diff=lfs merge=lfs -text
12
- *.msgpack filter=lfs diff=lfs merge=lfs -text
13
- *.onnx filter=lfs diff=lfs merge=lfs -text
14
- *.ot filter=lfs diff=lfs merge=lfs -text
15
- *.parquet filter=lfs diff=lfs merge=lfs -text
16
- *.pb filter=lfs diff=lfs merge=lfs -text
17
- *.pt filter=lfs diff=lfs merge=lfs -text
18
- *.pth filter=lfs diff=lfs merge=lfs -text
19
- *.rar filter=lfs diff=lfs merge=lfs -text
20
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
- *.tar.* filter=lfs diff=lfs merge=lfs -text
22
- *.tflite filter=lfs diff=lfs merge=lfs -text
23
- *.tgz filter=lfs diff=lfs merge=lfs -text
24
- *.xz filter=lfs diff=lfs merge=lfs -text
25
- *.zip filter=lfs diff=lfs merge=lfs -text
26
- *.zstandard filter=lfs diff=lfs merge=lfs -text
27
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md DELETED
@@ -1,207 +0,0 @@
1
- ---
2
- pretty_name: DBRD
3
- annotations_creators:
4
- - found
5
- language_creators:
6
- - found
7
- language:
8
- - nl
9
- license:
10
- - cc-by-nc-sa-4.0
11
- multilinguality:
12
- - monolingual
13
- size_categories:
14
- - 100K<n<1M
15
- source_datasets:
16
- - original
17
- task_categories:
18
- - text-generation
19
- - fill-mask
20
- - text-classification
21
- task_ids:
22
- - language-modeling
23
- - masked-language-modeling
24
- - sentiment-classification
25
- paperswithcode_id: dbrd
26
- dataset_info:
27
- features:
28
- - name: text
29
- dtype: string
30
- - name: label
31
- dtype:
32
- class_label:
33
- names:
34
- 0: neg
35
- 1: pos
36
- config_name: plain_text
37
- splits:
38
- - name: train
39
- num_bytes: 29496333
40
- num_examples: 20028
41
- - name: test
42
- num_bytes: 3246243
43
- num_examples: 2224
44
- - name: unsupervised
45
- num_bytes: 152733031
46
- num_examples: 96264
47
- download_size: 79065872
48
- dataset_size: 185475607
49
- ---
50
-
51
- # Dataset Card for DBRD
52
-
53
- ## Table of Contents
54
- - [Dataset Description](#dataset-description)
55
- - [Dataset Summary](#dataset-summary)
56
- - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
57
- - [Languages](#languages)
58
- - [Dataset Structure](#dataset-structure)
59
- - [Data Instances](#data-instances)
60
- - [Data Fields](#data-fields)
61
- - [Data Splits](#data-splits)
62
- - [Dataset Creation](#dataset-creation)
63
- - [Curation Rationale](#curation-rationale)
64
- - [Source Data](#source-data)
65
- - [Annotations](#annotations)
66
- - [Personal and Sensitive Information](#personal-and-sensitive-information)
67
- - [Considerations for Using the Data](#considerations-for-using-the-data)
68
- - [Social Impact of Dataset](#social-impact-of-dataset)
69
- - [Discussion of Biases](#discussion-of-biases)
70
- - [Other Known Limitations](#other-known-limitations)
71
- - [Additional Information](#additional-information)
72
- - [Dataset Curators](#dataset-curators)
73
- - [Licensing Information](#licensing-information)
74
- - [Citation Information](#citation-information)
75
- - [Contributions](#contributions)
76
-
77
- ## Dataset Description
78
-
79
- - **Homepage:** [Dutch Book Review Dataset (DBRD) homepage](https://benjaminvdb.github.io/DBRD)
80
- - **Repository:** https://github.com/benjaminvdb/DBRD
81
- - **Paper:** [The merits of Universal Language Model Fine-tuning for Small Datasets - a case with Dutch book reviews](https://arxiv.org/abs/1910.00896)
82
- - **Leaderboard:**
83
- - **Point of Contact:** [Benjamin van der Burgh](mailto:[email protected])
84
-
85
- ### Dataset Summary
86
-
87
- The DBRD (pronounced *dee-bird*) dataset contains over 110k book reviews of which 22k have associated binary sentiment polarity labels. It is intended as a benchmark for sentiment classification in Dutch and was created due to a lack of annotated datasets in Dutch that are suitable for this task.
88
-
89
- ### Supported Tasks and Leaderboards
90
-
91
- - `text-generation`: The dataset can be used to train a model for sequence modeling, more specifically language modeling.
92
- - `text-classification`: The dataset can be used to train a model for text classification, more specifically sentiment classification, using the provided positive/negative sentiment polarity labels.
93
-
94
- ### Languages
95
-
96
- Non-Dutch reviews were filtered out using [langdetect](https://github.com/Mimino666/langdetect), and all reviews should therefore be in Dutch (nl). They are written by reviewers on [Hebban](https://www.hebban.nl), a Dutch website for book reviews.
97
-
98
- ## Dataset Structure
99
-
100
- ### Data Instances
101
-
102
- The dataset contains three subsets: train, test, and unsupervised. The `train` and `test` sets contain labels, while the `unsupervised` set doesn't (the label value is -1 for each instance in `unsupervised`). Here's an example of a positive review, indicated with a label value of `1`.
103
-
104
- ```
105
- {
106
- 'label': 1,
107
- 'text': 'Super om te lezen hoe haar leven is vergaan.\nBijzonder dat ze zo openhartig is geweest.'
108
- }
109
- ```
110
-
111
- ### Data Fields
112
-
113
- - `label`: either 0 (negative) or 1 (positive) in the supervised sets `train` and `test`. These are always -1 for the unsupervised set.
114
- - `text`: book review as a utf-8 encoded string.
115
-
116
- ### Data Splits
117
-
118
- The `train` and `test` sets were constructed by extracting all non-neutral reviews because we want to assign either a positive or negative polarity label to each instance. Furthermore, the positive (pos) and negative (neg) labels were balanced in both train and test sets. The remainder was added to the unsupervised set.
119
-
120
- | | Train | Test | Unsupervised |
121
- | ----- | ------ | ----- | ----------- |
122
- | # No. texts | 20028 | 2224 | 96264 |
123
- | % of total | 16.9% | 1.9% | 81.2% |
124
-
125
- ## Dataset Creation
126
-
127
- ### Curation Rationale
128
-
129
- This dataset was created due to a lack of annotated Dutch text that is suitable for sentiment classification. Non-Dutch texts were therefore removed, but other than that, no curation was done.
130
-
131
- ### Source Data
132
-
133
- The book reviews were taken from [Hebban](https://www.hebban.nl), a Dutch platform for book reviews.
134
-
135
- #### Initial Data Collection and Normalization
136
-
137
- The source code of the scraper and preprocessing process can be found in the [DBRD GitHub repository](https://github.com/benjaminvdb/DBRD).
138
-
139
- #### Who are the source language producers?
140
-
141
- The reviews are written by users of [Hebban](https://www.hebban.nl) and are of varying quality. Some are short, others long, and many contain spelling mistakes and other errors.
142
-
143
- ### Annotations
144
-
145
- Each book review was accompanied by a 1 to 5-star rating. The annotations are produced by mapping the user-provided ratings to either a positive or negative label. 1 and 2-star ratings are given the negative label `0` and 4 and 5-star ratings the positive label `1`. Reviews with a rating of 3 stars are considered neutral and left out of the `train`/`test` sets and added to the unsupervised set.
146
-
147
- #### Annotation process
148
-
149
- Users of [Hebban](https://www.hebban.nl) were unaware that their reviews would be used in the creation of this dataset.
150
-
151
- #### Who are the annotators?
152
-
153
- The annotators are the [Hebban](https://www.hebban.nl) users who wrote the book reviews associated with the annotation. Anyone can register on [Hebban](https://www.hebban.nl) and it's impossible to know the demographics of this group.
154
-
155
- ### Personal and Sensitive Information
156
-
157
- The book reviews and ratings are publicly available on [Hebban](https://www.hebban.nl) and no personal or otherwise sensitive information is contained in this dataset.
158
-
159
- ## Considerations for Using the Data
160
-
161
- ### Social Impact of Dataset
162
-
163
- While predicting sentiment of book reviews in itself is not that interesting, the value of this dataset lies in its usage for benchmarking models. The dataset contains some challenges that are common to outings on the internet, such as spelling mistakes and other errors. It is therefore very useful for validating models for their real-world performance. These datasets are abundant for English but are harder to find for Dutch, making them a valuable resource for ML tasks in this language.
164
-
165
- ### Discussion of Biases
166
-
167
- [More Information Needed]
168
-
169
- ### Other Known Limitations
170
-
171
- Reviews on [Hebban](https://www.hebban.nl) are usually written in Dutch, but some have been written in English and possibly in other languages. While we've done our best to filter out non-Dutch texts, it's hard to do this without errors. For example, some reviews are in multiple languages, and these might slip through. Also be aware that some commercial outings can appear in the text, making them different from other reviews and influencing your models. While this doesn't pose a major issue in most cases, we just wanted to mention it briefly.
172
-
173
- ## Additional Information
174
-
175
- ### Dataset Curators
176
-
177
- This dataset was created by [Benjamin van der Burgh](mailto:[email protected]), who was working at [Leiden Institute of Advanced Computer Science (LIACS)](https://liacs.leidenuniv.nl/) at the time.
178
-
179
- ### Licensing Information
180
-
181
- The dataset is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/).
182
-
183
- ### Citation Information
184
-
185
- Please use the following citation when making use of this dataset in your work.
186
-
187
- ```
188
- @article{DBLP:journals/corr/abs-1910-00896,
189
- author = {Benjamin van der Burgh and
190
- Suzan Verberne},
191
- title = {The merits of Universal Language Model Fine-tuning for Small Datasets
192
- - a case with Dutch book reviews},
193
- journal = {CoRR},
194
- volume = {abs/1910.00896},
195
- year = {2019},
196
- url = {http://arxiv.org/abs/1910.00896},
197
- archivePrefix = {arXiv},
198
- eprint = {1910.00896},
199
- timestamp = {Fri, 04 Oct 2019 12:28:06 +0200},
200
- biburl = {https://dblp.org/rec/journals/corr/abs-1910-00896.bib},
201
- bibsource = {dblp computer science bibliography, https://dblp.org}
202
- }
203
- ```
204
-
205
- ### Contributions
206
-
207
- Thanks to [@benjaminvdb](https://github.com/benjaminvdb) for adding this dataset.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"plain_text": {"description": "The Dutch Book Review Dataset (DBRD) contains over 110k book reviews of which 22k have associated binary sentiment polarity labels. It is intended as a benchmark for sentiment classification in Dutch and created due to a lack of annotated datasets in Dutch that are suitable for this task.\n", "citation": "@article{DBLP:journals/corr/abs-1910-00896,\n author = {Benjamin van der Burgh and\n Suzan Verberne},\n title = {The merits of Universal Language Model Fine-tuning for Small Datasets\n - a case with Dutch book reviews},\n journal = {CoRR},\n volume = {abs/1910.00896},\n year = {2019},\n url = {http://arxiv.org/abs/1910.00896},\n archivePrefix = {arXiv},\n eprint = {1910.00896},\n timestamp = {Fri, 04 Oct 2019 12:28:06 +0200},\n biburl = {https://dblp.org/rec/journals/corr/abs-1910-00896.bib},\n bibsource = {dblp computer science bibliography, https://dblp.org}\n}\n", "homepage": "https://github.com/benjaminvdb/DBRD", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["neg", "pos"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": [{"task": "text-classification", "text_column": "text", "label_column": "label", "labels": ["neg", "pos"]}], "builder_name": "dbrd", "config_name": "plain_text", "version": {"version_str": "3.0.0", "description": "", "major": 3, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 29496333, "num_examples": 20028, "dataset_name": "dbrd"}, "test": {"name": "test", "num_bytes": 3246243, "num_examples": 2224, "dataset_name": "dbrd"}, "unsupervised": {"name": "unsupervised", "num_bytes": 152733031, "num_examples": 96264, "dataset_name": "dbrd"}}, "download_checksums": {"https://github.com/benjaminvdb/DBRD/releases/download/v3.0/DBRD_v3.tgz": {"num_bytes": 79065872, "checksum": "2d7eed5a2c56b19fec22f1656722b6036569aa542d362e576bd761eb91e1e76a"}}, "download_size": 79065872, "post_processing_size": null, "dataset_size": 185475607, "size_in_bytes": 264541479}}
 
 
dbrd.py DELETED
@@ -1,112 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
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
-
16
- # Lint as: python3
17
- """Dutch Book Review Dataset"""
18
-
19
-
20
- import datasets
21
- from datasets.tasks import TextClassification
22
-
23
-
24
- _DESCRIPTION = """\
25
- The Dutch Book Review Dataset (DBRD) contains over 110k book reviews of which \
26
- 22k have associated binary sentiment polarity labels. It is intended as a \
27
- benchmark for sentiment classification in Dutch and created due to a lack of \
28
- annotated datasets in Dutch that are suitable for this task.
29
- """
30
-
31
- _CITATION = """\
32
- @article{DBLP:journals/corr/abs-1910-00896,
33
- author = {Benjamin van der Burgh and
34
- Suzan Verberne},
35
- title = {The merits of Universal Language Model Fine-tuning for Small Datasets
36
- - a case with Dutch book reviews},
37
- journal = {CoRR},
38
- volume = {abs/1910.00896},
39
- year = {2019},
40
- url = {http://arxiv.org/abs/1910.00896},
41
- archivePrefix = {arXiv},
42
- eprint = {1910.00896},
43
- timestamp = {Fri, 04 Oct 2019 12:28:06 +0200},
44
- biburl = {https://dblp.org/rec/journals/corr/abs-1910-00896.bib},
45
- bibsource = {dblp computer science bibliography, https://dblp.org}
46
- }
47
- """
48
-
49
- _DOWNLOAD_URL = "https://github.com/benjaminvdb/DBRD/releases/download/v3.0/DBRD_v3.tgz"
50
-
51
-
52
- class DBRDConfig(datasets.BuilderConfig):
53
- """BuilderConfig for DBRD."""
54
-
55
- def __init__(self, **kwargs):
56
- """BuilderConfig for DBRD.
57
-
58
- Args:
59
- **kwargs: keyword arguments forwarded to super.
60
- """
61
- super(DBRDConfig, self).__init__(version=datasets.Version("3.0.0", ""), **kwargs)
62
-
63
-
64
- class DBRD(datasets.GeneratorBasedBuilder):
65
- """Dutch Book Review Dataset."""
66
-
67
- BUILDER_CONFIGS = [
68
- DBRDConfig(
69
- name="plain_text",
70
- description="Plain text",
71
- )
72
- ]
73
-
74
- def _info(self):
75
- return datasets.DatasetInfo(
76
- description=_DESCRIPTION,
77
- features=datasets.Features(
78
- {"text": datasets.Value("string"), "label": datasets.features.ClassLabel(names=["neg", "pos"])}
79
- ),
80
- supervised_keys=None,
81
- homepage="https://github.com/benjaminvdb/DBRD",
82
- citation=_CITATION,
83
- task_templates=[TextClassification(text_column="text", label_column="label")],
84
- )
85
-
86
- def _split_generators(self, dl_manager):
87
- archive = dl_manager.download(_DOWNLOAD_URL)
88
- return [
89
- datasets.SplitGenerator(
90
- name=datasets.Split.TRAIN, gen_kwargs={"files": dl_manager.iter_archive(archive), "split": "train"}
91
- ),
92
- datasets.SplitGenerator(
93
- name=datasets.Split.TEST, gen_kwargs={"files": dl_manager.iter_archive(archive), "split": "test"}
94
- ),
95
- datasets.SplitGenerator(
96
- name=datasets.Split("unsupervised"),
97
- gen_kwargs={"files": dl_manager.iter_archive(archive), "split": "unsup", "labeled": False},
98
- ),
99
- ]
100
-
101
- def _generate_examples(self, files, split, labeled=True):
102
- """Generate DBRD examples."""
103
- # For labeled examples, extract the label from the path.
104
- if labeled:
105
- for path, f in files:
106
- if path.startswith(f"DBRD/{split}"):
107
- label = {"pos": 1, "neg": 0}[path.split("/")[2]]
108
- yield path, {"text": f.read().decode("utf-8"), "label": label}
109
- else:
110
- for path, f in files:
111
- if path.startswith(f"DBRD/{split}"):
112
- yield path, {"text": f.read().decode("utf-8"), "label": -1}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plain_text/dbrd-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8dec953f9eaba20cbc7afd1eae487bfe2efb5e586acae66c53a31a6400073b10
3
+ size 2057596
plain_text/dbrd-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4636bc8f06f0370f461aa7ae3e7a71300221e9d3fc28c00ca8730f375479c4a0
3
+ size 18558995
plain_text/dbrd-unsupervised.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab724d1257449a8c4175a28a9e7ac9d6e13909dce129bb4fd9ffad6de8312234
3
+ size 95872679