11 lines
No EOL
284 B
Python
11 lines
No EOL
284 B
Python
from datasets import load_dataset
|
|
from os.path import curdir, join
|
|
|
|
class EnWik9DataSet:
|
|
def __init__(self):
|
|
path = join(curdir, "data")
|
|
self.data = load_dataset("haukur/enwik9", cache_dir=path, split="train")
|
|
|
|
|
|
def __len__(self):
|
|
return len(self.data) |