albertvillanova HF staff commited on
Commit
71593d1
1 Parent(s): 640d5c0

Convert dataset to Parquet (#2)

Browse files

- Convert dataset to Parquet (c88016b48a09dd53b4cd8354227dd3e632903239)
- Delete loading script (58d2590115fd2507987be352c2eff5f2ee311f0a)
- Delete legacy dataset_infos.json (8dab326df9f464781ecc5bf77b00291fa0b76481)

README.md CHANGED
@@ -28,16 +28,25 @@ dataset_info:
28
  dtype: float32
29
  splits:
30
  - name: train
31
- num_bytes: 4899539
32
  num_examples: 9577
33
  - name: test
34
- num_bytes: 514527
35
  num_examples: 1006
36
  - name: validation
37
- num_bytes: 515785
38
  num_examples: 1002
39
- download_size: 2314847
40
- dataset_size: 5929851
 
 
 
 
 
 
 
 
 
41
  ---
42
 
43
  # Dataset Card for [Dataset Name]
 
28
  dtype: float32
29
  splits:
30
  - name: train
31
+ num_bytes: 4899535
32
  num_examples: 9577
33
  - name: test
34
+ num_bytes: 514523
35
  num_examples: 1006
36
  - name: validation
37
+ num_bytes: 515781
38
  num_examples: 1002
39
+ download_size: 3923657
40
+ dataset_size: 5929839
41
+ configs:
42
+ - config_name: default
43
+ data_files:
44
+ - split: train
45
+ path: data/train-*
46
+ - split: test
47
+ path: data/test-*
48
+ - split: validation
49
+ path: data/validation-*
50
  ---
51
 
52
  # Dataset Card for [Dataset Name]
allegro_reviews.py DELETED
@@ -1,109 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2020 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
- """Allegro Reviews dataset"""
16
-
17
-
18
- import csv
19
- import os
20
-
21
- import datasets
22
-
23
-
24
- _CITATION = """\
25
- @inproceedings{rybak-etal-2020-klej,
26
- title = "{KLEJ}: Comprehensive Benchmark for Polish Language Understanding",
27
- author = "Rybak, Piotr and Mroczkowski, Robert and Tracz, Janusz and Gawlik, Ireneusz",
28
- booktitle = "Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics",
29
- month = jul,
30
- year = "2020",
31
- address = "Online",
32
- publisher = "Association for Computational Linguistics",
33
- url = "https://www.aclweb.org/anthology/2020.acl-main.111",
34
- pages = "1191--1201",
35
- }
36
- """
37
-
38
- _DESCRIPTION = """\
39
- Allegro Reviews is a sentiment analysis dataset, consisting of 11,588 product reviews written in Polish and extracted
40
- from Allegro.pl - a popular e-commerce marketplace. Each review contains at least 50 words and has a rating on a scale
41
- from one (negative review) to five (positive review).
42
-
43
- We recommend using the provided train/dev/test split. The ratings for the test set reviews are kept hidden.
44
- You can evaluate your model using the online evaluation tool available on klejbenchmark.com.
45
- """
46
-
47
- _HOMEPAGE = "https://github.com/allegro/klejbenchmark-allegroreviews"
48
-
49
- _LICENSE = "CC BY-SA 4.0"
50
-
51
- _URLs = "https://klejbenchmark.com/static/data/klej_ar.zip"
52
-
53
-
54
- class AllegroReviews(datasets.GeneratorBasedBuilder):
55
- """
56
- Allegro Reviews is a sentiment analysis dataset, consisting of 11,588 product reviews written in Polish
57
- and extracted from Allegro.pl - a popular e-commerce marketplace.
58
- """
59
-
60
- VERSION = datasets.Version("1.1.0")
61
-
62
- def _info(self):
63
- return datasets.DatasetInfo(
64
- description=_DESCRIPTION,
65
- features=datasets.Features(
66
- {
67
- "text": datasets.Value("string"),
68
- "rating": datasets.Value("float"),
69
- }
70
- ),
71
- supervised_keys=None,
72
- homepage=_HOMEPAGE,
73
- license=_LICENSE,
74
- citation=_CITATION,
75
- )
76
-
77
- def _split_generators(self, dl_manager):
78
- """Returns SplitGenerators."""
79
- data_dir = dl_manager.download_and_extract(_URLs)
80
- return [
81
- datasets.SplitGenerator(
82
- name=datasets.Split.TRAIN,
83
- gen_kwargs={
84
- "filepath": os.path.join(data_dir, "train.tsv"),
85
- "split": "train",
86
- },
87
- ),
88
- datasets.SplitGenerator(
89
- name=datasets.Split.TEST,
90
- gen_kwargs={"filepath": os.path.join(data_dir, "test_features.tsv"), "split": "test"},
91
- ),
92
- datasets.SplitGenerator(
93
- name=datasets.Split.VALIDATION,
94
- gen_kwargs={
95
- "filepath": os.path.join(data_dir, "dev.tsv"),
96
- "split": "dev",
97
- },
98
- ),
99
- ]
100
-
101
- def _generate_examples(self, filepath, split):
102
- """Yields examples."""
103
- with open(filepath, encoding="utf-8") as f:
104
- reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
105
- for id_, row in enumerate(reader):
106
- yield id_, {
107
- "text": row["text"],
108
- "rating": "-1" if split == "test" else row["rating"],
109
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5586790a8ab19ab5a01f54572553303216b6d58b3627bbb8dbcd1731ce9a982b
3
+ size 349137
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:647cde0312a6f659fdc3d4942f595b3c058e560fc298bd3fc91736e48a1bb8c7
3
+ size 3225749
data/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:013fb16adbebebc0546a0459868303a216542aaea1c07696e5a66fedd272f03e
3
+ size 348771
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"default": {"description": "Allegro Reviews is a sentiment analysis dataset, consisting of 11,588 product reviews written in Polish and extracted \nfrom Allegro.pl - a popular e-commerce marketplace. Each review contains at least 50 words and has a rating on a scale \nfrom one (negative review) to five (positive review).\n\nWe recommend using the provided train/dev/test split. The ratings for the test set reviews are kept hidden. \nYou can evaluate your model using the online evaluation tool available on klejbenchmark.com.\n", "citation": "@inproceedings{rybak-etal-2020-klej,\n title = \"{KLEJ}: Comprehensive Benchmark for Polish Language Understanding\",\n author = \"Rybak, Piotr and Mroczkowski, Robert and Tracz, Janusz and Gawlik, Ireneusz\",\n booktitle = \"Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics\",\n month = jul,\n year = \"2020\",\n address = \"Online\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://www.aclweb.org/anthology/2020.acl-main.111\",\n pages = \"1191--1201\",\n}\n", "homepage": "https://github.com/allegro/klejbenchmark-allegroreviews", "license": "CC BY-SA 4.0", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "rating": {"dtype": "float32", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "allegro_reviews", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 4899539, "num_examples": 9577, "dataset_name": "allegro_reviews"}, "test": {"name": "test", "num_bytes": 514527, "num_examples": 1006, "dataset_name": "allegro_reviews"}, "validation": {"name": "validation", "num_bytes": 515785, "num_examples": 1002, "dataset_name": "allegro_reviews"}}, "download_checksums": {"https://klejbenchmark.com/static/data/klej_ar.zip": {"num_bytes": 2314847, "checksum": "7c74bdb440e15c36b0a66f32500decd86f29380fc42b28752f1335de143a99fc"}}, "download_size": 2314847, "post_processing_size": null, "dataset_size": 5929851, "size_in_bytes": 8244698}}