parquet-converter
commited on
Commit
•
c1116a1
1
Parent(s):
8f7568a
Update parquet files
Browse files- README.md +0 -3
- data.zip → default/newshead-test.parquet +2 -2
- default/newshead-train-00000-of-00005.parquet +3 -0
- default/newshead-train-00001-of-00005.parquet +3 -0
- default/newshead-train-00002-of-00005.parquet +3 -0
- default/newshead-train-00003-of-00005.parquet +3 -0
- default/newshead-train-00004-of-00005.parquet +3 -0
- default/newshead-validation.parquet +3 -0
- newshead.py +0 -52
README.md
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
---
|
|
|
|
|
|
|
|
data.zip → default/newshead-test.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:701a9bec099f0b43258c1509f7cc54a25ac4d140ffaa538a0bad60078e500e59
|
3 |
+
size 17953291
|
default/newshead-train-00000-of-00005.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e07225fdd3d42d349b09e2a2e40433388463e898758c6458c7720e79914943b5
|
3 |
+
size 299009869
|
default/newshead-train-00001-of-00005.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b9352e646885061689a5795b953393354ef053c7f0909aec1909b56f0ccbdbf4
|
3 |
+
size 298863668
|
default/newshead-train-00002-of-00005.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cd3ffb8e2f78c4264e6c4551142df4010183e42b0be7e2b881a4e186349ce106
|
3 |
+
size 298713120
|
default/newshead-train-00003-of-00005.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b7413ad7769fb81f693368a2cb8300cc6e145ec5b4a8d0333c279808ee8d9519
|
3 |
+
size 298477908
|
default/newshead-train-00004-of-00005.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6d62966b622d553d4c05080216ebd567666abdfd214951fb036c68d8bc579b6b
|
3 |
+
size 94236070
|
default/newshead-validation.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:701a9bec099f0b43258c1509f7cc54a25ac4d140ffaa538a0bad60078e500e59
|
3 |
+
size 17953291
|
newshead.py
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
import os
|
2 |
-
import json
|
3 |
-
import datasets
|
4 |
-
from datasets import DownloadManager
|
5 |
-
_URL = "data.zip"
|
6 |
-
|
7 |
-
class NewsHeadDataset(datasets.GeneratorBasedBuilder):
|
8 |
-
def _info(self):
|
9 |
-
return datasets.DatasetInfo(
|
10 |
-
description = "newshead multi document summarisation dataset",
|
11 |
-
features = datasets.Features(
|
12 |
-
{
|
13 |
-
"documents": datasets.Value("string"),
|
14 |
-
"summary": datasets.Value("string")
|
15 |
-
}
|
16 |
-
)
|
17 |
-
)
|
18 |
-
|
19 |
-
def _split_generators(self, dl_manager: DownloadManager):
|
20 |
-
data_dir = dl_manager.download_and_extract(_URL)
|
21 |
-
return [
|
22 |
-
datasets.SplitGenerator(
|
23 |
-
name=datasets.Split.TRAIN,
|
24 |
-
gen_kwargs = {
|
25 |
-
"filepath": os.path.join(data_dir, "train.jsonl"),
|
26 |
-
"split": "train"
|
27 |
-
}
|
28 |
-
),
|
29 |
-
datasets.SplitGenerator(
|
30 |
-
name=datasets.Split.VALIDATION,
|
31 |
-
gen_kwargs = {
|
32 |
-
"filepath": os.path.join(data_dir, "validation.jsonl"),
|
33 |
-
"split": "validation"
|
34 |
-
}
|
35 |
-
),
|
36 |
-
datasets.SplitGenerator(
|
37 |
-
name=datasets.Split.TEST,
|
38 |
-
gen_kwargs = {
|
39 |
-
"filepath": os.path.join(data_dir, "validation.jsonl"),
|
40 |
-
"split": "test"
|
41 |
-
}
|
42 |
-
)
|
43 |
-
]
|
44 |
-
|
45 |
-
def _generate_examples(self, filepath, split):
|
46 |
-
with open(filepath, encoding="utf-8") as f:
|
47 |
-
for id_, row in enumerate(f):
|
48 |
-
data = json.loads(row)
|
49 |
-
yield id_, {
|
50 |
-
"documents": data["text"],
|
51 |
-
"summary": data["summary"]
|
52 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|