eurlex_resources / test_eurlex_resources.py
joelniklaus's picture
added first version of eurlex_resources
8d2e0ec
raw
history blame
644 Bytes
import datasets
from datasets import load_dataset, get_dataset_config_names
dataset_name = "joelito/lextreme"
dataset_name = "Multi_Legal_Pile.py"
type = "caselaw"
test = load_dataset(dataset_name, type, )
print(test)
exit()
configs = get_dataset_config_names(dataset_name)
print(configs)
for config in configs:
lextreme_subset = load_dataset(dataset_name, config)
splits = [datasets.Split.TRAIN, datasets.Split.VALIDATION, datasets.Split.TEST]
assert [split in lextreme_subset for split in splits]
assert [lextreme_subset[split].num_rows > 0 for split in splits]
print(dataset_name, config)
print(lextreme_subset)