Datasets:
Tasks:
Summarization
Sub-tasks:
news-articles-summarization
Languages:
Dutch
Size:
100K<n<1M
License:
Yeb Havinga
commited on
Commit
·
f57670f
1
Parent(s):
09cfb3d
Move datafiles
Browse files
{3.0.0 → cnn_dailymail_dutch/3.0.0}/test.json.gz
RENAMED
File without changes
|
{3.0.0 → cnn_dailymail_dutch/3.0.0}/train.json.gz
RENAMED
File without changes
|
{3.0.0 → cnn_dailymail_dutch/3.0.0}/validation.json.gz
RENAMED
File without changes
|
test_cnn_dailymail_dutch.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from itertools import chain
|
2 |
+
|
3 |
+
import pytest
|
4 |
+
from datasets import load_dataset
|
5 |
+
|
6 |
+
|
7 |
+
def test_streaming_dataset():
|
8 |
+
datasets = load_dataset('./cnn_dailymail_dutch', streaming=True)
|
9 |
+
assert set(datasets.keys()) == {'train', 'validation', 'test'}
|
10 |
+
|
11 |
+
for split in ['train', 'validation', 'test']:
|
12 |
+
ds = datasets[split]
|
13 |
+
for i, e in enumerate(ds):
|
14 |
+
assert 10 <= len(e['article']) <= 11000
|
15 |
+
assert 10 <= len(e['highlights']) <= 500
|
16 |
+
if i == 100:
|
17 |
+
break
|