Datasets:
Tasks:
Text Classification
Modalities:
Text
Sub-tasks:
sentiment-classification
Size:
10K - 100K
License:
from datasets import ( | |
load_dataset, | |
disable_caching, | |
get_dataset_split_names, | |
get_dataset_config_names, | |
) | |
from transformers import AutoTokenizer | |
disable_caching() | |
SCRIPT = "./imdb_dutch.py" | |
def test_get_split_names(): | |
splits = get_dataset_split_names(SCRIPT, "plain_text") | |
assert splits == ["train", "test", "unsupervised"] | |
def test_get_config_names(): | |
configs = get_dataset_config_names(SCRIPT) | |
assert configs == ["plain_text"] | |
def test_streaming_dataset(): | |
datasets = load_dataset(SCRIPT, streaming=True) | |
train_ds = datasets["train"] | |
i = iter(train_ds) | |
e = next(i) | |
val_ds = datasets["test"] | |
i = iter(val_ds) | |
e = next(i) | |
unsup_ds = datasets["unsupervised"] | |
i = iter(unsup_ds) | |
e = next(i) | |