Datasets:
Tasks:
Table to Text
Modalities:
Text
Languages:
English
Size:
10K - 100K
Tags:
data-to-text
License:
ratishsp commited on
Commit ·
7026ad6
1
Parent(s): e8fa5a7
combined tar.bz2
Browse files47 unmodified lines4849505152535455565758175 unmodified lines2342352362372382392402412422432442452462472481 unmodified line2502512522532542552561 unmodified line25825926026126226326447 unmodified lines_LICENSE = ""_URLs = {"train": "train.jsonl.bz2","validation": "validation.jsonl.bz2","test": "test.jsonl.bz2"}class MlbDataToText(datasets.GeneratorBasedBuilder):175 unmodified lines# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archivetrain_dir = dl_manager.download_and_extract(_URLs["train"])validation_dir = dl_manager.download_and_extract(_URLs["validation"])test_dir = dl_manager.download_and_extract(_URLs["test"])return [datasets.SplitGenerator(name=datasets.Split.TRAIN,# These kwargs will be passed to _generate_examplesgen_kwargs={"filepath": train_dir,"split": "train",},),1 unmodified linename=datasets.Split.TEST,# These kwargs will be passed to _generate_examplesgen_kwargs={"filepath": test_dir,"split": "test"},),1 unmodified linename=datasets.Split.VALIDATION,# These kwargs will be passed to _generate_examplesgen_kwargs={"filepath": validation_dir,"split": "validation",},),47 unmodified lines48495051525354175 unmodified lines2302312322332342352362372382392402412421 unmodified line2442452462472482492501 unmodified line25225325425525625725847 unmodified lines_LICENSE = ""_URL = "data.tar.bz2"class MlbDataToText(datasets.GeneratorBasedBuilder):175 unmodified lines# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archivedata_dir = dl_manager.download_and_extract(_URL)return [datasets.SplitGenerator(name=datasets.Split.TRAIN,# These kwargs will be passed to _generate_examplesgen_kwargs={"filepath": os.path.join(data_dir, "train.jsonl"),"split": "train",},),1 unmodified linename=datasets.Split.TEST,# These kwargs will be passed to _generate_examplesgen_kwargs={"filepath": os.path.join(data_dir, "test.jsonl"),"split": "test"},),1 unmodified linename=datasets.Split.VALIDATION,# These kwargs will be passed to _generate_examplesgen_kwargs={"filepath": os.path.join(data_dir, "validation.jsonl"),"split": "validation",},),
mlb_data_to_text.py+5-11