Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
parquet
Sub-tasks:
language-modeling
Languages:
Danish
Size:
1M - 10M
License:
File size: 359 Bytes
7b54871 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from pathlib import Path
from typing import cast
from datasets import Dataset, load_dataset
def test_ensure_ids_are_unique():
repo = Path(__file__).parent.parent
name = str(repo.resolve()) # "danish-foundation-models/danish-gigaword-2"
ds = load_dataset(name, split="train")
ds = cast(Dataset, ds)
assert len(set(ds["id"])) == len(ds)
|