Datasets:

Languages:
Romanian
ArXiv:
License:
system HF staff commited on
Commit
588dd39
0 Parent(s):

Update files from the datasets library (from 1.5.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.5.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - found
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - ro
8
+ licenses:
9
+ - cc-by-4-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - n=15K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - sentiment-classification
20
+ ---
21
+
22
+ # Dataset Card for LaRoSeDa
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+ - [Contributions](#contributions)
47
+
48
+ ## Dataset Description
49
+
50
+ - **Homepage:** [Github](https://github.com/ancatache/LaRoSeDa)
51
+ - **Repository:** [Github](https://github.com/ancatache/LaRoSeDa)
52
+ - **Paper:** [Arxiv](https://arxiv.org/pdf/2101.04197.pdf)
53
+ - **Leaderboard:** [Needs More Information]
54
+ - **Point of Contact:** raducu.ionescu@gmail.com
55
+
56
+ ### Dataset Summary
57
+
58
+ LaRoSeDa - A **La**rge and **Ro**manian **Se**ntiment **Da**ta Set. LaRoSeDa contains 15,000 reviews written in Romanian, of which 7,500 are positive and 7,500 negative.
59
+ The samples have one of four star ratings: 1 or 2 - for reviews that can be considered of negative polarity, and 4 or 5 for the positive ones.
60
+ The 15,000 samples featured in the corpus and labelled with the star rating, are splitted in a train and test subsets, with 12,000 and 3,000 samples in each subset.
61
+
62
+ ### Supported Tasks and Leaderboards
63
+
64
+ [LiRo Benchmark and Leaderboard](https://eemlcommunity.github.io/ro_benchmark_leaderboard/site/)
65
+
66
+ ### Languages
67
+
68
+ The text dataset is in Romanian (`ro`).
69
+
70
+ ## Dataset Structure
71
+
72
+ ### Data Instances
73
+
74
+ Below we have an example of sample from LaRoSeDa:
75
+
76
+ ```
77
+ {
78
+ "index": "9675",
79
+ "title": "Nu recomand",
80
+ "content": "probleme cu localizarea, mari...",
81
+ "starRating": 1,
82
+ }
83
+ ```
84
+
85
+ where "9675" is the sample index, followed by the title of the review, review content and then the star rating given by the user.
86
+
87
+
88
+ ### Data Fields
89
+
90
+ - `index`: string, the unique indentifier of a sample.
91
+ - `title`: string, the review title.
92
+ - `content`: string, the content of the review.
93
+ - `starRating`: integer, with values in the following set {1, 2, 4, 5}.
94
+
95
+ ### Data Splits
96
+
97
+ The train/test split contains 12,000/3,000 samples tagged with the star rating assigned to each sample in the dataset.
98
+
99
+ ## Dataset Creation
100
+
101
+ ### Curation Rationale
102
+
103
+ The samples are preprocessed in order to eliminate named entities. This is required to prevent classifiers from taking the decision based on features that are not related to the topics.
104
+ For example, named entities that refer to politicians or football players names can provide clues about the topic. For more details, please read the [paper](https://arxiv.org/abs/1901.06543).
105
+
106
+ ### Source Data
107
+
108
+
109
+ #### Data Collection and Normalization
110
+
111
+ For the data collection, one of the largest Romanian e-commerce platform was targetted. Along with the textual content of each review, the associated star ratings was also collected in order to automatically assign labels to
112
+ the collected text samples.
113
+
114
+
115
+ #### Who are the source language producers?
116
+
117
+ The original text comes from one of the largest e-commerce platforms in Romania.
118
+
119
+ ### Annotations
120
+
121
+ #### Annotation process
122
+
123
+ As mentioned above, LaRoSeDa is composed of product reviews from one of the largest e-commerce websites in Romania. The resulting samples are automatically tagged with the star rating assigned by the users.
124
+
125
+ #### Who are the annotators?
126
+
127
+ N/A
128
+
129
+ ### Personal and Sensitive Information
130
+
131
+ The textual data collected for LaRoSeDa consists in product reviews freely available on the Internet.
132
+ To the best of authors' knowledge, there is no personal or sensitive information that needed to be considered in the said textual inputs collected.
133
+
134
+ ## Considerations for Using the Data
135
+
136
+ ### Social Impact of Dataset
137
+
138
+ This dataset is part of an effort to encourage text classification research in languages other than English. Such work increases the accessibility of natural language technology to more regions and cultures.
139
+ In the past three years there was a growing interest for studying Romanian from a Computational Linguistics perspective. However, we are far from having enough datasets and resources in this particular language.
140
+
141
+ ### Discussion of Biases
142
+
143
+ *We note that most of the negative reviews (5,561) are rated with one star. Similarly, most of the positive reviews (6,238) are rated with five stars. Hence, the corpus is highly polarized.*
144
+
145
+ ### Other Known Limitations
146
+
147
+ *The star rating might not always reflect the polarity of the text. We thus acknowledge that the automatic labeling process is not optimal, i.e. some labels might be noisy.*
148
+
149
+ ## Additional Information
150
+
151
+ ### Dataset Curators
152
+
153
+ Published and managed by Anca Tache, Mihaela Gaman and Radu Tudor Ionescu.
154
+
155
+ ### Licensing Information
156
+
157
+ CC BY-SA 4.0 License
158
+
159
+ ### Citation Information
160
+
161
+ ```
162
+ @article{
163
+ tache2101clustering,
164
+ title={Clustering Word Embeddings with Self-Organizing Maps. Application on LaRoSeDa -- A Large Romanian Sentiment Data Set},
165
+ author={Anca Maria Tache and Mihaela Gaman and Radu Tudor Ionescu},
166
+ journal={ArXiv},
167
+ year = {2021}
168
+ }
169
+ ```
170
+
171
+ ### Contributions
172
+
173
+ Thanks to [@MihaelaGaman](https://github.com/MihaelaGaman) for adding this dataset.
174
+
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"laroseda": {"description": " LaRoSeDa (A Large Romanian Sentiment Data Set) contains 15,000 reviews written in Romanian, of which 7,500 are positive and 7,500 negative.\n Star ratings of 1 and 2 and of 4 and 5 are provided for negative and positive reviews respectively.\n The current dataset uses star rating as the label for multi-class classification.\n", "citation": "@article{\n tache2101clustering,\n title={Clustering Word Embeddings with Self-Organizing Maps. Application on LaRoSeDa -- A Large Romanian Sentiment Data Set},\n author={Anca Maria Tache and Mihaela Gaman and Radu Tudor Ionescu},\n journal={ArXiv},\n year = {2021}\n}\n", "homepage": "https://github.com/ancatache/LaRoSeDa", "license": "CC BY-SA 4.0 License", "features": {"index": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "starRating": {"dtype": "int64", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "laroseda", "config_name": "laroseda", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2932819, "num_examples": 12000, "dataset_name": "laroseda"}, "test": {"name": "test", "num_bytes": 700834, "num_examples": 3000, "dataset_name": "laroseda"}}, "download_checksums": {"https://raw.githubusercontent.com/ancatache/LaRoSeDa/main/data_splitted/laroseda_train.json": {"num_bytes": 4231664, "checksum": "808ae4c9c17d6d75801c48e838d8a700fd950ec9654ab60c386e38193b8f1b8e"}, "https://raw.githubusercontent.com/ancatache/LaRoSeDa/main/data_splitted/laroseda_test.json": {"num_bytes": 1025519, "checksum": "6084cabe923da9f71413357eaa84f3ea4523ef5ff0e81e2c3ac3861405e2151a"}}, "download_size": 5257183, "post_processing_size": null, "dataset_size": 3633653, "size_in_bytes": 8890836}}
dummy/laroseda/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3825f6ee3316fdad0281026937b9f533950706d17f37042038f44064b5df1f2c
3
+ size 1806
laroseda.py ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """LaRoSeDa: A Large Romanian Sentiment Data Set"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import json
20
+
21
+ import datasets
22
+
23
+
24
+ # Find for instance the citation on arxiv or on the dataset repo/website
25
+ _CITATION = """\
26
+ @article{
27
+ tache2101clustering,
28
+ title={Clustering Word Embeddings with Self-Organizing Maps. Application on LaRoSeDa -- A Large Romanian Sentiment Data Set},
29
+ author={Anca Maria Tache and Mihaela Gaman and Radu Tudor Ionescu},
30
+ journal={ArXiv},
31
+ year = {2021}
32
+ }
33
+ """
34
+
35
+ # You can copy an official description
36
+ _DESCRIPTION = """\
37
+ LaRoSeDa (A Large Romanian Sentiment Data Set) contains 15,000 reviews written in Romanian, of which 7,500 are positive and 7,500 negative.
38
+ Star ratings of 1 and 2 and of 4 and 5 are provided for negative and positive reviews respectively.
39
+ The current dataset uses star rating as the label for multi-class classification.
40
+ """
41
+
42
+ _HOMEPAGE = "https://github.com/ancatache/LaRoSeDa"
43
+
44
+ _LICENSE = "CC BY-SA 4.0 License"
45
+
46
+ # The HuggingFace dataset library don't host the datasets but only point to the original files
47
+ # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
48
+ _URL = "https://raw.githubusercontent.com/ancatache/LaRoSeDa/main/data_splitted/"
49
+
50
+ _TRAIN_FILE = "laroseda_train.json"
51
+ _TEST_FILE = "laroseda_test.json"
52
+
53
+
54
+ class LarosedaConfig(datasets.BuilderConfig):
55
+ """BuilderConfig for the LaRoSeDa dataset"""
56
+
57
+ def __init__(self, **kwargs):
58
+ super(LarosedaConfig, self).__init__(**kwargs)
59
+
60
+
61
+ class Laroseda(datasets.GeneratorBasedBuilder):
62
+ """LaRoSeDa dataset"""
63
+
64
+ VERSION = datasets.Version("1.0.0")
65
+ BUILDER_CONFIGS = [
66
+ LarosedaConfig(name="laroseda", version=VERSION, description="LaRoSeDa dataset"),
67
+ ]
68
+
69
+ def _info(self):
70
+
71
+ features = datasets.Features(
72
+ {
73
+ "index": datasets.Value("string"),
74
+ "title": datasets.Value("string"),
75
+ "content": datasets.Value("string"),
76
+ "starRating": datasets.Value("int64"),
77
+ }
78
+ )
79
+
80
+ return datasets.DatasetInfo(
81
+ # This is the description that will appear on the datasets page.
82
+ description=_DESCRIPTION,
83
+ # This defines the different columns of the dataset and their types
84
+ features=features, # Here we define them above because they are different between the two configurations
85
+ # If there's a common (input, target) tuple from the features,
86
+ # specify them here. They'll be used if as_supervised=True in
87
+ # builder.as_dataset.
88
+ supervised_keys=None,
89
+ # Homepage of the dataset for documentation
90
+ homepage=_HOMEPAGE,
91
+ # License for the dataset if available
92
+ license=_LICENSE,
93
+ # Citation for the dataset
94
+ citation=_CITATION,
95
+ )
96
+
97
+ def _split_generators(self, dl_manager):
98
+ """Returns SplitGenerators."""
99
+
100
+ urls_to_download = {
101
+ "train": _URL + _TRAIN_FILE,
102
+ "test": _URL + _TEST_FILE,
103
+ }
104
+
105
+ downloaded_files = dl_manager.download(urls_to_download)
106
+
107
+ return [
108
+ datasets.SplitGenerator(
109
+ name=datasets.Split.TRAIN,
110
+ # These kwargs will be passed to _generate_examples
111
+ gen_kwargs={
112
+ "filepath": downloaded_files["train"],
113
+ },
114
+ ),
115
+ datasets.SplitGenerator(
116
+ name=datasets.Split.TEST,
117
+ # These kwargs will be passed to _generate_examples
118
+ gen_kwargs={
119
+ "filepath": downloaded_files["test"],
120
+ },
121
+ ),
122
+ ]
123
+
124
+ def _generate_examples(self, filepath):
125
+ """This function returns the examples in the raw (text) form."""
126
+
127
+ with open(filepath, "r", encoding="utf-8") as f:
128
+ data_list = json.load(f)["reviews"]
129
+
130
+ for i, d in enumerate(data_list):
131
+ yield i, {
132
+ "index": d["index"],
133
+ "title": d["title"],
134
+ "content": d["content"],
135
+ "starRating": int(d["starRating"]),
136
+ }