albertvillanova HF staff commited on
Commit
0db688b
1 Parent(s): 5b2c764

Convert dataset to Parquet (#4)

Browse files

- Convert dataset to Parquet (7ab16fd1fdfff0d254056ca270f2d2618c4cbd56)
- Delete loading script (0180a3d26030661a4d48b56e9f8bf5283bb52441)

README.md CHANGED
@@ -32,13 +32,20 @@ dataset_info:
32
  '1': '1'
33
  splits:
34
  - name: train
35
- num_bytes: 5026582
36
  num_examples: 4302
37
  - name: test
38
- num_bytes: 1292103
39
  num_examples: 1078
40
- download_size: 2357808
41
- dataset_size: 6318685
 
 
 
 
 
 
 
42
  ---
43
 
44
  # Dataset Card for [Dataset Name]
 
32
  '1': '1'
33
  splits:
34
  - name: train
35
+ num_bytes: 5026574
36
  num_examples: 4302
37
  - name: test
38
+ num_bytes: 1292095
39
  num_examples: 1078
40
+ download_size: 2668724
41
+ dataset_size: 6318669
42
+ configs:
43
+ - config_name: default
44
+ data_files:
45
+ - split: train
46
+ path: data/train-*
47
+ - split: test
48
+ path: data/test-*
49
  ---
50
 
51
  # Dataset Card for [Dataset Name]
data/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0130f17031e4b7aee6a7e5fa6074f4f74f6d66b9ccfd85639fd99cc2847e2cd
3
+ size 423232
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed0f18412ca7f1aebae46d5fd312e1499b7c3f4c44882596426e9cdccd076333
3
+ size 2245492
psc.py DELETED
@@ -1,91 +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
- """Polish Summaries Corpus"""
16
-
17
-
18
- import csv
19
- import os
20
-
21
- import datasets
22
-
23
-
24
- _CITATION = """\
25
- @inproceedings{ogro:kop:14:lrec,
26
- title={The {P}olish {S}ummaries {C}orpus},
27
- author={Ogrodniczuk, Maciej and Kope{\'c}, Mateusz},
28
- booktitle = "Proceedings of the Ninth International {C}onference on {L}anguage {R}esources and {E}valuation, {LREC}~2014",
29
- year = "2014",
30
- }
31
- """
32
-
33
- _DESCRIPTION = """\
34
- The Polish Summaries Corpus contains news articles and their summaries. We used summaries of the same article as positive pairs and sampled the most similar summaries of different articles as negatives.
35
- """
36
-
37
- _HOMEPAGE = "http://zil.ipipan.waw.pl/PolishSummariesCorpus"
38
-
39
- _LICENSE = "CC BY-SA 3.0"
40
-
41
- _URLs = "https://klejbenchmark.com/static/data/klej_psc.zip"
42
-
43
-
44
- class PSC(datasets.GeneratorBasedBuilder):
45
- """Polish Summaries Corpus"""
46
-
47
- VERSION = datasets.Version("1.1.0")
48
-
49
- def _info(self):
50
- return datasets.DatasetInfo(
51
- description=_DESCRIPTION,
52
- features=datasets.Features(
53
- {
54
- "extract_text": datasets.Value("string"),
55
- "summary_text": datasets.Value("string"),
56
- "label": datasets.ClassLabel(names=["0", "1"]),
57
- }
58
- ),
59
- supervised_keys=None,
60
- homepage=_HOMEPAGE,
61
- license=_LICENSE,
62
- citation=_CITATION,
63
- )
64
-
65
- def _split_generators(self, dl_manager):
66
- """Returns SplitGenerators."""
67
- data_dir = dl_manager.download_and_extract(_URLs)
68
- return [
69
- datasets.SplitGenerator(
70
- name=datasets.Split.TRAIN,
71
- gen_kwargs={
72
- "filepath": os.path.join(data_dir, "train.tsv"),
73
- "split": "train",
74
- },
75
- ),
76
- datasets.SplitGenerator(
77
- name=datasets.Split.TEST,
78
- gen_kwargs={"filepath": os.path.join(data_dir, "test_features.tsv"), "split": "test"},
79
- ),
80
- ]
81
-
82
- def _generate_examples(self, filepath, split):
83
- """Yields examples."""
84
- with open(filepath, encoding="utf-8") as f:
85
- reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
86
- for id_, row in enumerate(reader):
87
- yield id_, {
88
- "extract_text": row["extract_text"],
89
- "summary_text": row["summary_text"],
90
- "label": -1 if split == "test" else row["label"],
91
- }